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
