Consider the following code snippet:
template <typename T>
struct foo
{
foo(T) { }
};
int main()
{
foo{0};
}
g ++ 7 happily creates a temporary type object foo, inferring T = int.
clang ++ 5 and 6 refuse to compile code:
error: expected unqualified-id
foo{0};
^
live example in wandbox
Is this a clang error or is there something in the standard that prevents the template template argument from being subtracted for unnamed time series?
source
share