ndnboost: Also rename BOOST_ to NDNBOOST_
diff --git a/include/ndnboost/type_traits/detail/has_binary_operator.hpp b/include/ndnboost/type_traits/detail/has_binary_operator.hpp
index a18f00d..c10ef10 100644
--- a/include/ndnboost/type_traits/detail/has_binary_operator.hpp
+++ b/include/ndnboost/type_traits/detail/has_binary_operator.hpp
@@ -38,7 +38,7 @@
// cannot find another implementation -> declared as system header to suppress these warnings.
#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
# pragma GCC system_header
-#elif defined(BOOST_MSVC)
+#elif defined(NDNBOOST_MSVC)
# pragma warning ( push )
# pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913 )
#endif
@@ -47,7 +47,7 @@
namespace detail {
// This namespace ensures that argument-dependent name lookup does not mess things up.
-namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
+namespace NDNBOOST_JOIN(NDNBOOST_TT_TRAIT_NAME,_impl) {
// 1. a function to have an instance of type T without requiring T to be default
// constructible
@@ -56,7 +56,7 @@
// 2. we provide our operator definition for types that do not have one already
-// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
+// a type returned from operator NDNBOOST_TT_TRAIT_OP when no such operator is
// found in the type's own namespace (our own operator is used) so that we have
// a means to know that our operator was used
struct no_operator { };
@@ -66,33 +66,33 @@
// via argument-dependent name lookup
struct any { template <class T> any(T const&); };
-// when operator BOOST_TT_TRAIT_OP is not available, this one is used
-no_operator operator BOOST_TT_TRAIT_OP (const any&, const any&);
+// when operator NDNBOOST_TT_TRAIT_OP is not available, this one is used
+no_operator operator NDNBOOST_TT_TRAIT_OP (const any&, const any&);
// 3. checks if the operator returns void or not
// conditions: Lhs!=void and Rhs!=void
// we first redefine "operator," so that we have no compilation error if
-// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of
-// (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if
-// operator BOOST_TT_TRAIT_OP returns void or not:
-// - operator BOOST_TT_TRAIT_OP returns void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t
-// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int
+// operator NDNBOOST_TT_TRAIT_OP returns void and we can use the return type of
+// (lhs NDNBOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if
+// operator NDNBOOST_TT_TRAIT_OP returns void or not:
+// - operator NDNBOOST_TT_TRAIT_OP returns void -> (lhs NDNBOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t
+// - operator NDNBOOST_TT_TRAIT_OP returns !=void -> (lhs NDNBOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int
struct returns_void_t { };
template <typename T> int operator,(const T&, returns_void_t);
template <typename T> int operator,(const volatile T&, returns_void_t);
// this intermediate trait has member value of type bool:
-// - value==true -> operator BOOST_TT_TRAIT_OP returns void
-// - value==false -> operator BOOST_TT_TRAIT_OP does not return void
+// - value==true -> operator NDNBOOST_TT_TRAIT_OP returns void
+// - value==false -> operator NDNBOOST_TT_TRAIT_OP does not return void
template < typename Lhs, typename Rhs >
struct operator_returns_void {
// overloads of function returns_void make the difference
// yes_type and no_type have different size by construction
static ::ndnboost::type_traits::yes_type returns_void(returns_void_t);
static ::ndnboost::type_traits::no_type returns_void(int);
- BOOST_STATIC_CONSTANT(bool, value = (sizeof(::ndnboost::type_traits::yes_type)==sizeof(returns_void((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>(),returns_void_t())))));
+ NDNBOOST_STATIC_CONSTANT(bool, value = (sizeof(::ndnboost::type_traits::yes_type)==sizeof(returns_void((make<Lhs>() NDNBOOST_TT_TRAIT_OP make<Rhs>(),returns_void_t())))));
};
@@ -106,27 +106,27 @@
template < typename Lhs, typename Rhs >
struct operator_returns_Ret < Lhs, Rhs, dont_care, true > {
- BOOST_STATIC_CONSTANT(bool, value = true);
+ NDNBOOST_STATIC_CONSTANT(bool, value = true);
};
template < typename Lhs, typename Rhs >
struct operator_returns_Ret < Lhs, Rhs, dont_care, false > {
- BOOST_STATIC_CONSTANT(bool, value = true);
+ NDNBOOST_STATIC_CONSTANT(bool, value = true);
};
template < typename Lhs, typename Rhs >
struct operator_returns_Ret < Lhs, Rhs, void, true > {
- BOOST_STATIC_CONSTANT(bool, value = true);
+ NDNBOOST_STATIC_CONSTANT(bool, value = true);
};
template < typename Lhs, typename Rhs >
struct operator_returns_Ret < Lhs, Rhs, void, false > {
- BOOST_STATIC_CONSTANT(bool, value = false);
+ NDNBOOST_STATIC_CONSTANT(bool, value = false);
};
template < typename Lhs, typename Rhs, typename Ret >
struct operator_returns_Ret < Lhs, Rhs, Ret, true > {
- BOOST_STATIC_CONSTANT(bool, value = false);
+ NDNBOOST_STATIC_CONSTANT(bool, value = false);
};
// otherwise checks if it is convertible to Ret using the sizeof trick
@@ -137,14 +137,14 @@
static ::ndnboost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret
static ::ndnboost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise
- BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()))==sizeof(::ndnboost::type_traits::yes_type)));
+ NDNBOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make<Lhs>() NDNBOOST_TT_TRAIT_OP make<Rhs>()))==sizeof(::ndnboost::type_traits::yes_type)));
};
// 5. checks for operator existence
// condition: Lhs!=void and Rhs!=void
-// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other
+// checks if our definition of operator NDNBOOST_TT_TRAIT_OP is used or an other
// existing one;
// this is done with redefinition of "operator," that returns no_operator or has_operator
struct has_operator { };
@@ -155,15 +155,15 @@
static ::ndnboost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists
static ::ndnboost::type_traits::no_type check(no_operator); // this version is used otherwise
- BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::ndnboost::type_traits::yes_type)));
+ NDNBOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() NDNBOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::ndnboost::type_traits::yes_type)));
};
// 6. main trait: to avoid any compilation error, this class behaves
-// differently when operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the
+// differently when operator NDNBOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the
// standard.
// Forbidden_if is a bool that is:
-// - true when the operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the standard
+// - true when the operator NDNBOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the standard
// (would yield compilation error if used)
// - false otherwise
template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if >
@@ -171,12 +171,12 @@
template < typename Lhs, typename Rhs, typename Ret >
struct trait_impl1 < Lhs, Rhs, Ret, true > {
- BOOST_STATIC_CONSTANT(bool, value = false);
+ NDNBOOST_STATIC_CONSTANT(bool, value = false);
};
template < typename Lhs, typename Rhs, typename Ret >
struct trait_impl1 < Lhs, Rhs, Ret, false > {
- BOOST_STATIC_CONSTANT(bool,
+ NDNBOOST_STATIC_CONSTANT(bool,
value = (
::ndnboost::type_traits::ice_and<
operator_exists < Lhs, Rhs >::value,
@@ -189,17 +189,17 @@
// some specializations needs to be declared for the special void case
template < typename Rhs, typename Ret >
struct trait_impl1 < void, Rhs, Ret, false > {
- BOOST_STATIC_CONSTANT(bool, value = false);
+ NDNBOOST_STATIC_CONSTANT(bool, value = false);
};
template < typename Lhs, typename Ret >
struct trait_impl1 < Lhs, void, Ret, false > {
- BOOST_STATIC_CONSTANT(bool, value = false);
+ NDNBOOST_STATIC_CONSTANT(bool, value = false);
};
template < typename Ret >
struct trait_impl1 < void, void, Ret, false > {
- BOOST_STATIC_CONSTANT(bool, value = false);
+ NDNBOOST_STATIC_CONSTANT(bool, value = false);
};
// defines some typedef for convenience
@@ -211,18 +211,18 @@
typedef typename ::ndnboost::remove_cv<Rhs_noref>::type Rhs_nocv;
typedef typename ::ndnboost::remove_cv< typename ::ndnboost::remove_reference< typename ::ndnboost::remove_pointer<Lhs_noref>::type >::type >::type Lhs_noptr;
typedef typename ::ndnboost::remove_cv< typename ::ndnboost::remove_reference< typename ::ndnboost::remove_pointer<Rhs_noref>::type >::type >::type Rhs_noptr;
- BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
+ NDNBOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, NDNBOOST_TT_FORBIDDEN_IF >::value));
};
} // namespace impl
} // namespace detail
// this is the accessible definition of the trait to end user
-BOOST_TT_AUX_BOOL_TRAIT_DEF3(BOOST_TT_TRAIT_NAME, Lhs, Rhs=Lhs, Ret=::ndnboost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::ndnboost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl < Lhs, Rhs, Ret >::value))
+NDNBOOST_TT_AUX_BOOL_TRAIT_DEF3(NDNBOOST_TT_TRAIT_NAME, Lhs, Rhs=Lhs, Ret=::ndnboost::detail::NDNBOOST_JOIN(NDNBOOST_TT_TRAIT_NAME,_impl)::dont_care, (::ndnboost::detail::NDNBOOST_JOIN(NDNBOOST_TT_TRAIT_NAME,_impl)::trait_impl < Lhs, Rhs, Ret >::value))
} // namespace ndnboost
-#if defined(BOOST_MSVC)
+#if defined(NDNBOOST_MSVC)
# pragma warning ( pop )
#endif