forked from boostorg/function
Don't omit template parameter names (Markus Schöpflin)
[SVN r17333]
This commit is contained in:
@ -295,44 +295,33 @@ namespace boost {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
# if BOOST_WORKAROUND(__HP_aCC, <= 33900)
|
|
||||||
template<bool cond, typename T> struct enable_if;
|
template<bool cond, typename T> struct enable_if;
|
||||||
# else
|
|
||||||
template<bool, typename> struct enable_if;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
template<typename T> struct enable_if<true, T> { typedef T type; };
|
template<typename T> struct enable_if<true, T> { typedef T type; };
|
||||||
template<typename T> struct enable_if<false, T> {};
|
template<typename T> struct enable_if<false, T> {};
|
||||||
#else
|
|
||||||
|
|
||||||
# if BOOST_WORKAROUND(__HP_aCC, <= 33900)
|
template<bool x>
|
||||||
template<bool x>
|
struct enabled
|
||||||
# else
|
{
|
||||||
template<bool>
|
template<typename T>
|
||||||
# endif
|
struct base
|
||||||
struct enabled
|
|
||||||
{
|
{
|
||||||
template<typename T>
|
typedef T type;
|
||||||
struct base
|
|
||||||
{
|
|
||||||
typedef T type;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct enabled<false>
|
struct enabled<false>
|
||||||
{
|
{
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct base
|
struct base
|
||||||
{
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
template<bool Enabled, typename T>
|
|
||||||
struct enable_if : public enabled<Enabled>::template base<T>
|
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
template<bool Enabled, typename T>
|
||||||
|
struct enable_if : public enabled<Enabled>::template base<T>
|
||||||
|
{
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// A type that is only used for comparisons against zero
|
// A type that is only used for comparisons against zero
|
||||||
|
Reference in New Issue
Block a user