queue<T, decreasing_order >uncoveredSetQueue( decreasing_order(tab) );/*2*/
is an example of the Most Vexing Parse: it declares a function named uncoveredSetQueue
which takes an argument (here named tab
) of type decreasing_order
and returning queue<T, decreasing_order>
. As you found, adding parentheses avoids the Most Vexing Parse. You could also replace the parentheses with {}
to use uniform initialization syntax.
The clang error message looks like a compiler bug to me. Most likely it doesn't correctly handle some consequences of using a local type as a template parameter (which was not allowed in C++03, and is a new C++11 feature).