Wednesday, 11 September 2013

Porting C++ code from windows to linux about template specification in a nested struct

Porting C++ code from windows to linux about template specification in a
nested struct

There is a section codes which work well in windows. But it can not be
compiled in linux.
template< class p_true, class p_false >
struct sic
{
template< bool b >
struct condition { typedef p_true ctype; };
template<>
struct condition < p_false > { typedef p_false ctype; };
};
I recevied compile error:explicit specialization in non-namespace scope
'struct sic' Anyone have any idea how to resolve it? Thanks very much.

No comments:

Post a Comment