ndnboost: Also rename BOOST_ to NDNBOOST_
diff --git a/include/ndnboost/any.hpp b/include/ndnboost/any.hpp
index 5127932..eeefb64 100644
--- a/include/ndnboost/any.hpp
+++ b/include/ndnboost/any.hpp
@@ -1,7 +1,7 @@
// See http://www.boost.org/libs/any for Documentation.
-#ifndef BOOST_ANY_INCLUDED
-#define BOOST_ANY_INCLUDED
+#ifndef NDNBOOST_ANY_INCLUDED
+#define NDNBOOST_ANY_INCLUDED
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
@@ -26,13 +26,13 @@
#include <ndnboost/type_traits/is_same.hpp>
// See ndnboost/python/type_id.hpp
-// TODO: add BOOST_TYPEID_COMPARE_BY_NAME to config.hpp
+// TODO: add NDNBOOST_TYPEID_COMPARE_BY_NAME to config.hpp
# if (defined(__GNUC__) && __GNUC__ >= 3) \
|| defined(_AIX) \
|| ( defined(__sgi) && defined(__host_mips)) \
|| (defined(__hpux) && defined(__HP_aCC)) \
|| (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC))
-# define BOOST_AUX_ANY_TYPE_ID_NAME
+# define NDNBOOST_AUX_ANY_TYPE_ID_NAME
#include <cstring>
# endif
@@ -42,7 +42,7 @@
{
public: // structors
- any() BOOST_NOEXCEPT
+ any() NDNBOOST_NOEXCEPT
: content(0)
{
}
@@ -58,9 +58,9 @@
{
}
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+#ifndef NDNBOOST_NO_CXX11_RVALUE_REFERENCES
// Move constructor
- any(any&& other) BOOST_NOEXCEPT
+ any(any&& other) NDNBOOST_NOEXCEPT
: content(other.content)
{
other.content = 0;
@@ -74,21 +74,21 @@
}
#endif
- ~any() BOOST_NOEXCEPT
+ ~any() NDNBOOST_NOEXCEPT
{
delete content;
}
public: // modifiers
- any & swap(any & rhs) BOOST_NOEXCEPT
+ any & swap(any & rhs) NDNBOOST_NOEXCEPT
{
std::swap(content, rhs.content);
return *this;
}
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+#ifdef NDNBOOST_NO_CXX11_RVALUE_REFERENCES
template<typename ValueType>
any & operator=(const ValueType & rhs)
{
@@ -110,7 +110,7 @@
}
// move assignement
- any & operator=(any&& rhs) BOOST_NOEXCEPT
+ any & operator=(any&& rhs) NDNBOOST_NOEXCEPT
{
rhs.swap(*this);
any().swap(rhs);
@@ -128,7 +128,7 @@
public: // queries
- bool empty() const BOOST_NOEXCEPT
+ bool empty() const NDNBOOST_NOEXCEPT
{
return !content;
}
@@ -138,7 +138,7 @@
return content ? content->type() : typeid(void);
}
-#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+#ifndef NDNBOOST_NO_MEMBER_TEMPLATE_FRIENDS
private: // types
#else
public: // types (public so any_cast can be non-friend)
@@ -170,7 +170,7 @@
{
}
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+#ifndef NDNBOOST_NO_CXX11_RVALUE_REFERENCES
holder(ValueType&& value)
: held(static_cast< ValueType&& >(value))
{
@@ -196,15 +196,15 @@
holder & operator=(const holder &);
};
-#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+#ifndef NDNBOOST_NO_MEMBER_TEMPLATE_FRIENDS
private: // representation
template<typename ValueType>
- friend ValueType * any_cast(any *) BOOST_NOEXCEPT;
+ friend ValueType * any_cast(any *) NDNBOOST_NOEXCEPT;
template<typename ValueType>
- friend ValueType * unsafe_any_cast(any *) BOOST_NOEXCEPT;
+ friend ValueType * unsafe_any_cast(any *) NDNBOOST_NOEXCEPT;
#else
@@ -216,7 +216,7 @@
};
- inline void swap(any & lhs, any & rhs) BOOST_NOEXCEPT
+ inline void swap(any & lhs, any & rhs) NDNBOOST_NOEXCEPT
{
lhs.swap(rhs);
}
@@ -232,10 +232,10 @@
};
template<typename ValueType>
- ValueType * any_cast(any * operand) BOOST_NOEXCEPT
+ ValueType * any_cast(any * operand) NDNBOOST_NOEXCEPT
{
return operand &&
-#ifdef BOOST_AUX_ANY_TYPE_ID_NAME
+#ifdef NDNBOOST_AUX_ANY_TYPE_ID_NAME
std::strcmp(operand->type().name(), typeid(ValueType).name()) == 0
#else
operand->type() == typeid(ValueType)
@@ -245,7 +245,7 @@
}
template<typename ValueType>
- inline const ValueType * any_cast(const any * operand) BOOST_NOEXCEPT
+ inline const ValueType * any_cast(const any * operand) NDNBOOST_NOEXCEPT
{
return any_cast<ValueType>(const_cast<any *>(operand));
}
@@ -253,16 +253,16 @@
template<typename ValueType>
ValueType any_cast(any & operand)
{
- typedef BOOST_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
+ typedef NDNBOOST_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
-#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#ifdef NDNBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// If 'nonref' is still reference type, it means the user has not
// specialized 'remove_reference'.
- // Please use BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION macro
+ // Please use NDNBOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION macro
// to generate specialization of remove_reference for your class
// See type traits library documentation for details
- BOOST_STATIC_ASSERT(!is_reference<nonref>::value);
+ NDNBOOST_STATIC_ASSERT(!is_reference<nonref>::value);
#endif
nonref * result = any_cast<nonref>(&operand);
@@ -274,12 +274,12 @@
template<typename ValueType>
inline ValueType any_cast(const any & operand)
{
- typedef BOOST_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
+ typedef NDNBOOST_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
-#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#ifdef NDNBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// The comment in the above version of 'any_cast' explains when this
// assert is fired and what to do.
- BOOST_STATIC_ASSERT(!is_reference<nonref>::value);
+ NDNBOOST_STATIC_ASSERT(!is_reference<nonref>::value);
#endif
return any_cast<const nonref &>(const_cast<any &>(operand));
@@ -291,13 +291,13 @@
// use typeid() comparison, e.g., when our types may travel across
// different shared libraries.
template<typename ValueType>
- inline ValueType * unsafe_any_cast(any * operand) BOOST_NOEXCEPT
+ inline ValueType * unsafe_any_cast(any * operand) NDNBOOST_NOEXCEPT
{
return &static_cast<any::holder<ValueType> *>(operand->content)->held;
}
template<typename ValueType>
- inline const ValueType * unsafe_any_cast(const any * operand) BOOST_NOEXCEPT
+ inline const ValueType * unsafe_any_cast(const any * operand) NDNBOOST_NOEXCEPT
{
return unsafe_any_cast<ValueType>(const_cast<any *>(operand));
}