Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 // Boost enable_if library
3 // Copyright 2003 © The Trustees of Indiana University.
5 // Use, modification, and distribution is subject to the Boost Software
6 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 // Authors: Jaakko Järvi (jajarvi at osl.iu.edu)
10 // Jeremiah Willcock (jewillco at osl.iu.edu)
11 // Andrew Lumsdaine (lums at osl.iu.edu)
14 #ifndef BOOST_UTILITY_ENABLE_IF_HPP
15 #define BOOST_UTILITY_ENABLE_IF_HPP
17 #include "boost/config.hpp"
19 // Even the definition of enable_if causes problems on some compilers,
20 // so it's macroed out for all compilers that do not support SFINAE
22 #ifndef BOOST_NO_SFINAE
27 template <bool B, class T = void>
33 struct enable_if_c<false, T> {};
35 template <class Cond, class T = void>
36 struct enable_if : public enable_if_c<Cond::value, T> {};
38 template <bool B, class T>
39 struct lazy_enable_if_c {
40 typedef typename T::type type;
44 struct lazy_enable_if_c<false, T> {};
46 template <class Cond, class T>
47 struct lazy_enable_if : public lazy_enable_if_c<Cond::value, T> {};
50 template <bool B, class T = void>
56 struct disable_if_c<true, T> {};
58 template <class Cond, class T = void>
59 struct disable_if : public disable_if_c<Cond::value, T> {};
61 template <bool B, class T>
62 struct lazy_disable_if_c {
63 typedef typename T::type type;
67 struct lazy_disable_if_c<true, T> {};
69 template <class Cond, class T>
70 struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {};
78 namespace detail { typedef void enable_if_default_T; }
81 struct enable_if_does_not_work_on_this_compiler;
83 template <bool B, class T = detail::enable_if_default_T>
84 struct enable_if_c : enable_if_does_not_work_on_this_compiler<T>
87 template <bool B, class T = detail::enable_if_default_T>
88 struct disable_if_c : enable_if_does_not_work_on_this_compiler<T>
91 template <bool B, class T = detail::enable_if_default_T>
92 struct lazy_enable_if_c : enable_if_does_not_work_on_this_compiler<T>
95 template <bool B, class T = detail::enable_if_default_T>
96 struct lazy_disable_if_c : enable_if_does_not_work_on_this_compiler<T>
99 template <class Cond, class T = detail::enable_if_default_T>
100 struct enable_if : enable_if_does_not_work_on_this_compiler<T>
103 template <class Cond, class T = detail::enable_if_default_T>
104 struct disable_if : enable_if_does_not_work_on_this_compiler<T>
107 template <class Cond, class T = detail::enable_if_default_T>
108 struct lazy_enable_if : enable_if_does_not_work_on_this_compiler<T>
111 template <class Cond, class T = detail::enable_if_default_T>
112 struct lazy_disable_if : enable_if_does_not_work_on_this_compiler<T>
117 #endif // BOOST_NO_SFINAE