summaryrefslogtreecommitdiff
path: root/boost/type_traits/integral_promotion.hpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:33:54 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:36:09 +0900
commitd9ec475d945d3035377a0d89ed42e382d8988891 (patch)
tree34aff2cee4b209906243ab5499d61f3edee2982f /boost/type_traits/integral_promotion.hpp
parent71d216b90256936a9638f325af9bc69d720e75de (diff)
downloadboost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.gz
boost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.bz2
boost-d9ec475d945d3035377a0d89ed42e382d8988891.zip
Imported Upstream version 1.60.0
Change-Id: Ie709530d6d5841088ceaba025cbe175a4ef43050 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/type_traits/integral_promotion.hpp')
-rw-r--r--boost/type_traits/integral_promotion.hpp33
1 files changed, 10 insertions, 23 deletions
diff --git a/boost/type_traits/integral_promotion.hpp b/boost/type_traits/integral_promotion.hpp
index 9c5514b115..0478f56349 100644
--- a/boost/type_traits/integral_promotion.hpp
+++ b/boost/type_traits/integral_promotion.hpp
@@ -7,18 +7,12 @@
#define FILE_boost_type_traits_integral_promotion_hpp_INCLUDED
#include <boost/config.hpp>
-
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/identity.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_enum.hpp>
#include <boost/type_traits/is_volatile.hpp>
#include <boost/type_traits/remove_cv.hpp>
-// Should be the last #include
-#include <boost/type_traits/detail/type_trait_def.hpp>
-
namespace boost {
namespace type_traits { namespace detail {
@@ -168,27 +162,20 @@ struct integral_promotion_impl
>::type type;
};
-template<class T>
-struct integral_promotion
- : public boost::mpl::eval_if<
- need_promotion<BOOST_DEDUCED_TYPENAME remove_cv<T>::type>
- , integral_promotion_impl<T>
- , boost::mpl::identity<T>
- >
-{
-};
+template<class T, bool b> struct integral_promotion { typedef T type; };
+template<class T> struct integral_promotion<T, true> : public integral_promotion_impl<T>{};
} }
-BOOST_TT_AUX_TYPE_TRAIT_DEF1(
- integral_promotion
- , T
- , BOOST_DEDUCED_TYPENAME
- boost::type_traits::detail::integral_promotion<T>::type
- )
-}
+template <class T> struct integral_promotion
+{
+private:
+ typedef boost::type_traits::detail::need_promotion<typename remove_cv<T>::type> tag_type;
+public:
+ typedef typename boost::type_traits::detail::integral_promotion<T, tag_type::value>::type type;
+};
-#include <boost/type_traits/detail/type_trait_undef.hpp>
+}
#endif // #ifndef FILE_boost_type_traits_integral_promotion_hpp_INCLUDED