mirror of
https://github.com/boostorg/utility.git
synced 2025-08-02 06:15:22 +02:00
added dummy versions of enable_if templates for platforms that
have BOOST_NO_SFINAE defined [SVN r21154]
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
#define BOOST_UTILITY_ENABLE_IF_HPP
|
#define BOOST_UTILITY_ENABLE_IF_HPP
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
#include <boost/static_assert.hpp>
|
||||||
|
|
||||||
// Even the definition of enable_if causes problems on some compilers,
|
// Even the definition of enable_if causes problems on some compilers,
|
||||||
// so it's macroed out for all compilers that do not support SFINAE
|
// so it's macroed out for all compilers that do not support SFINAE
|
||||||
@@ -71,6 +72,46 @@ namespace boost
|
|||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
|
||||||
|
BOOST_STATIC_CONSTANT(bool, enable_if_does_not_work_on_this_compiler = false);
|
||||||
|
|
||||||
|
template <bool B, class T = void>
|
||||||
|
struct enable_if_c
|
||||||
|
{ BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); };
|
||||||
|
|
||||||
|
template <bool B, class T = void>
|
||||||
|
struct disable_if_c
|
||||||
|
{ BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); };
|
||||||
|
|
||||||
|
template <bool B, class T = void>
|
||||||
|
struct lazy_enable_if_c
|
||||||
|
{ BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); };
|
||||||
|
|
||||||
|
template <bool B, class T = void>
|
||||||
|
struct lazy_disable_if_c
|
||||||
|
{ BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); };
|
||||||
|
|
||||||
|
template <class Cond, class T = void>
|
||||||
|
struct enable_if
|
||||||
|
{ BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); };
|
||||||
|
|
||||||
|
template <class Cond, class T = void>
|
||||||
|
struct disable_if
|
||||||
|
{ BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); };
|
||||||
|
|
||||||
|
template <class Cond, class T = void>
|
||||||
|
struct lazy_enable_if
|
||||||
|
{ BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); };
|
||||||
|
|
||||||
|
template <class Cond, class T = void>
|
||||||
|
struct lazy_disable_if
|
||||||
|
{ BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); };
|
||||||
|
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
#endif // BOOST_NO_SFINAE
|
#endif // BOOST_NO_SFINAE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user