ndnboost: Also rename BOOST_ to NDNBOOST_
diff --git a/include/ndnboost/smart_ptr/weak_ptr.hpp b/include/ndnboost/smart_ptr/weak_ptr.hpp
index 0e268a8..08fc4bd 100644
--- a/include/ndnboost/smart_ptr/weak_ptr.hpp
+++ b/include/ndnboost/smart_ptr/weak_ptr.hpp
@@ -1,5 +1,5 @@
-#ifndef BOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED
-#define BOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED
+#ifndef NDNBOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED
+#define NDNBOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED
//
// weak_ptr.hpp
@@ -31,21 +31,21 @@
typedef typename ndnboost::detail::sp_element< T >::type element_type;
- weak_ptr() BOOST_NOEXCEPT : px(0), pn() // never throws in 1.30+
+ weak_ptr() NDNBOOST_NOEXCEPT : px(0), pn() // never throws in 1.30+
{
}
// generated copy constructor, assignment, destructor are fine...
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+#if !defined( NDNBOOST_NO_CXX11_RVALUE_REFERENCES )
// ... except in C++0x, move disables the implicit copy
- weak_ptr( weak_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
+ weak_ptr( weak_ptr const & r ) NDNBOOST_NOEXCEPT : px( r.px ), pn( r.pn )
{
}
- weak_ptr & operator=( weak_ptr const & r ) BOOST_NOEXCEPT
+ weak_ptr & operator=( weak_ptr const & r ) NDNBOOST_NOEXCEPT
{
px = r.px;
pn = r.pn;
@@ -72,7 +72,7 @@
//
template<class Y>
-#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+#if !defined( NDNBOOST_SP_NO_SP_CONVERTIBLE )
weak_ptr( weak_ptr<Y> const & r, typename ndnboost::detail::sp_enable_if_convertible<Y,T>::type = ndnboost::detail::sp_empty() )
@@ -81,15 +81,15 @@
weak_ptr( weak_ptr<Y> const & r )
#endif
- BOOST_NOEXCEPT : px(r.lock().get()), pn(r.pn)
+ NDNBOOST_NOEXCEPT : px(r.lock().get()), pn(r.pn)
{
ndnboost::detail::sp_assert_convertible< Y, T >();
}
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+#if !defined( NDNBOOST_NO_CXX11_RVALUE_REFERENCES )
template<class Y>
-#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+#if !defined( NDNBOOST_SP_NO_SP_CONVERTIBLE )
weak_ptr( weak_ptr<Y> && r, typename ndnboost::detail::sp_enable_if_convertible<Y,T>::type = ndnboost::detail::sp_empty() )
@@ -98,7 +98,7 @@
weak_ptr( weak_ptr<Y> && r )
#endif
- BOOST_NOEXCEPT : px( r.lock().get() ), pn( static_cast< ndnboost::detail::weak_count && >( r.pn ) )
+ NDNBOOST_NOEXCEPT : px( r.lock().get() ), pn( static_cast< ndnboost::detail::weak_count && >( r.pn ) )
{
ndnboost::detail::sp_assert_convertible< Y, T >();
r.px = 0;
@@ -106,13 +106,13 @@
// for better efficiency in the T == Y case
weak_ptr( weak_ptr && r )
- BOOST_NOEXCEPT : px( r.px ), pn( static_cast< ndnboost::detail::weak_count && >( r.pn ) )
+ NDNBOOST_NOEXCEPT : px( r.px ), pn( static_cast< ndnboost::detail::weak_count && >( r.pn ) )
{
r.px = 0;
}
// for better efficiency in the T == Y case
- weak_ptr & operator=( weak_ptr && r ) BOOST_NOEXCEPT
+ weak_ptr & operator=( weak_ptr && r ) NDNBOOST_NOEXCEPT
{
this_type( static_cast< weak_ptr && >( r ) ).swap( *this );
return *this;
@@ -122,7 +122,7 @@
#endif
template<class Y>
-#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+#if !defined( NDNBOOST_SP_NO_SP_CONVERTIBLE )
weak_ptr( shared_ptr<Y> const & r, typename ndnboost::detail::sp_enable_if_convertible<Y,T>::type = ndnboost::detail::sp_empty() )
@@ -131,15 +131,15 @@
weak_ptr( shared_ptr<Y> const & r )
#endif
- BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
+ NDNBOOST_NOEXCEPT : px( r.px ), pn( r.pn )
{
ndnboost::detail::sp_assert_convertible< Y, T >();
}
-#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1300)
+#if !defined(NDNBOOST_MSVC) || (NDNBOOST_MSVC >= 1300)
template<class Y>
- weak_ptr & operator=( weak_ptr<Y> const & r ) BOOST_NOEXCEPT
+ weak_ptr & operator=( weak_ptr<Y> const & r ) NDNBOOST_NOEXCEPT
{
ndnboost::detail::sp_assert_convertible< Y, T >();
@@ -149,10 +149,10 @@
return *this;
}
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+#if !defined( NDNBOOST_NO_CXX11_RVALUE_REFERENCES )
template<class Y>
- weak_ptr & operator=( weak_ptr<Y> && r ) BOOST_NOEXCEPT
+ weak_ptr & operator=( weak_ptr<Y> && r ) NDNBOOST_NOEXCEPT
{
this_type( static_cast< weak_ptr<Y> && >( r ) ).swap( *this );
return *this;
@@ -161,7 +161,7 @@
#endif
template<class Y>
- weak_ptr & operator=( shared_ptr<Y> const & r ) BOOST_NOEXCEPT
+ weak_ptr & operator=( shared_ptr<Y> const & r ) NDNBOOST_NOEXCEPT
{
ndnboost::detail::sp_assert_convertible< Y, T >();
@@ -173,17 +173,17 @@
#endif
- shared_ptr<T> lock() const BOOST_NOEXCEPT
+ shared_ptr<T> lock() const NDNBOOST_NOEXCEPT
{
return shared_ptr<T>( *this, ndnboost::detail::sp_nothrow_tag() );
}
- long use_count() const BOOST_NOEXCEPT
+ long use_count() const NDNBOOST_NOEXCEPT
{
return pn.use_count();
}
- bool expired() const BOOST_NOEXCEPT
+ bool expired() const NDNBOOST_NOEXCEPT
{
return pn.use_count() == 0;
}
@@ -193,12 +193,12 @@
return pn.empty();
}
- void reset() BOOST_NOEXCEPT // never throws in 1.30+
+ void reset() NDNBOOST_NOEXCEPT // never throws in 1.30+
{
this_type().swap(*this);
}
- void swap(this_type & other) BOOST_NOEXCEPT
+ void swap(this_type & other) NDNBOOST_NOEXCEPT
{
std::swap(px, other.px);
pn.swap(other.pn);
@@ -211,12 +211,12 @@
pn = r.pn;
}
- template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const BOOST_NOEXCEPT
+ template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const NDNBOOST_NOEXCEPT
{
return pn < rhs.pn;
}
- template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const BOOST_NOEXCEPT
+ template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const NDNBOOST_NOEXCEPT
{
return pn < rhs.pn;
}
@@ -224,7 +224,7 @@
// Tasteless as this may seem, making all members public allows member templates
// to work in the absence of member template friends. (Matthew Langston)
-#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+#ifndef NDNBOOST_NO_MEMBER_TEMPLATE_FRIENDS
private:
@@ -238,16 +238,16 @@
}; // weak_ptr
-template<class T, class U> inline bool operator<(weak_ptr<T> const & a, weak_ptr<U> const & b) BOOST_NOEXCEPT
+template<class T, class U> inline bool operator<(weak_ptr<T> const & a, weak_ptr<U> const & b) NDNBOOST_NOEXCEPT
{
return a.owner_before( b );
}
-template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b) BOOST_NOEXCEPT
+template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b) NDNBOOST_NOEXCEPT
{
a.swap(b);
}
} // namespace ndnboost
-#endif // #ifndef BOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED
+#endif // #ifndef NDNBOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED