const qualifier for function type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



GCC compiles the following code without error:

template<typename>
struct S;

template <>
struct S<void()>;

template <>
struct S<void() const>;


However, both Comeau C++ and clang give the following error:

error: type qualifier is not allowed on this function
struct S<void() const>;


Is the code ill-formed and gcc thus non-conforming?

I ask because libstdc++ uses specializations like this for std::is_function in <type_traits>, 
and as a result, clang refuses to compile anything that includes <type_traits>.

Thanks,
Nate.
 		 	   		  



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux