diff --git a/ndn-cpp/common.hpp b/ndn-cpp/common.hpp
index 8908c3d..56b1aa4 100644
--- a/ndn-cpp/common.hpp
+++ b/ndn-cpp/common.hpp
@@ -21,7 +21,7 @@
 #else
 // Use the boost header files in this distribution that were extracted with:
 // cd <INCLUDE DIRECTORY WITH boost SUBDIRECTORY>
-// dist/bin/bcp --namespace=ndnboost shared_ptr make_shared weak_ptr functional <NDN-CPP ROOT>
+// dist/bin/bcp --namespace=ndnboost shared_ptr make_shared weak_ptr function bind <NDN-CPP ROOT>
 // cd <NDN-CPP ROOT>
 // mv boost ndnboost
 // cd ndnboost
@@ -39,10 +39,12 @@
 namespace ndn { namespace func_lib = std; }
 #elif HAVE_BOOST_FUNCTION
 #include <boost/function.hpp>
+#include <boost/bind.hpp>
 namespace ndn { namespace func_lib = boost; }
 #else
 // Use the boost header files in this distribution that were extracted as above:
 #include <ndnboost/function.hpp>
+#include <ndnboost/bind.hpp>
 namespace ndn { namespace func_lib = ndnboost; }
 #endif
 
diff --git a/ndnboost/algorithm/string/compare.hpp b/ndnboost/algorithm/string/compare.hpp
new file mode 100644
index 0000000..e963120
--- /dev/null
+++ b/ndnboost/algorithm/string/compare.hpp
@@ -0,0 +1,199 @@
+//  Boost string_algo library compare.hpp header file  -------------------------//
+
+//  Copyright Pavol Droba 2002-2006.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_COMPARE_HPP
+#define BOOST_STRING_COMPARE_HPP
+
+#include <ndnboost/algorithm/string/config.hpp>
+#include <locale>
+
+/*! \file
+    Defines element comparison predicates. Many algorithms in this library can
+    take an additional argument with a predicate used to compare elements.
+    This makes it possible, for instance, to have case insensitive versions
+    of the algorithms.
+*/
+
+namespace ndnboost {
+    namespace algorithm {
+
+        //  is_equal functor  -----------------------------------------------//
+
+        //! is_equal functor
+        /*!
+            Standard STL equal_to only handle comparison between arguments
+            of the same type. This is a less restrictive version which wraps operator ==.
+        */
+        struct is_equal
+        {
+            //! Function operator
+            /*!
+                Compare two operands for equality
+            */
+            template< typename T1, typename T2 >
+                bool operator()( const T1& Arg1, const T2& Arg2 ) const
+            {
+                return Arg1==Arg2;
+            }
+        };
+
+        //! case insensitive version of is_equal
+        /*!
+            Case insensitive comparison predicate. Comparison is done using
+            specified locales.
+        */
+        struct is_iequal
+        {
+            //! Constructor
+            /*!
+                \param Loc locales used for comparison
+            */
+            is_iequal( const std::locale& Loc=std::locale() ) :
+                m_Loc( Loc ) {}
+
+            //! Function operator
+            /*!
+                Compare two operands. Case is ignored.
+            */
+            template< typename T1, typename T2 >
+                bool operator()( const T1& Arg1, const T2& Arg2 ) const
+            {
+                #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
+                    return std::toupper(Arg1)==std::toupper(Arg2);
+                #else
+                    return std::toupper<T1>(Arg1,m_Loc)==std::toupper<T2>(Arg2,m_Loc);
+                #endif
+            }
+
+        private:
+            std::locale m_Loc;
+        };
+
+        //  is_less functor  -----------------------------------------------//
+
+        //! is_less functor
+        /*!
+            Convenient version of standard std::less. Operation is templated, therefore it is 
+            not required to specify the exact types upon the construction
+         */
+        struct is_less
+        {
+            //! Functor operation
+            /*!
+                Compare two operands using > operator
+             */
+            template< typename T1, typename T2 >
+                bool operator()( const T1& Arg1, const T2& Arg2 ) const
+            {
+                return Arg1<Arg2;
+            }
+        };
+
+
+        //! case insensitive version of is_less
+        /*!
+            Case insensitive comparison predicate. Comparison is done using
+            specified locales.
+        */
+        struct is_iless
+        {
+            //! Constructor
+            /*!
+                \param Loc locales used for comparison
+            */
+            is_iless( const std::locale& Loc=std::locale() ) :
+                m_Loc( Loc ) {}
+
+            //! Function operator
+            /*!
+                Compare two operands. Case is ignored.
+            */
+            template< typename T1, typename T2 >
+                bool operator()( const T1& Arg1, const T2& Arg2 ) const
+            {
+                #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
+                    return std::toupper(Arg1)<std::toupper(Arg2);
+                #else
+                    return std::toupper<T1>(Arg1,m_Loc)<std::toupper<T2>(Arg2,m_Loc);
+                #endif
+            }
+
+        private:
+            std::locale m_Loc;
+        };
+
+        //  is_not_greater functor  -----------------------------------------------//
+
+        //! is_not_greater functor
+        /*!
+            Convenient version of standard std::not_greater_to. Operation is templated, therefore it is 
+            not required to specify the exact types upon the construction
+         */
+        struct is_not_greater
+        {
+            //! Functor operation
+            /*!
+                Compare two operands using > operator
+             */
+            template< typename T1, typename T2 >
+                bool operator()( const T1& Arg1, const T2& Arg2 ) const
+            {
+                return Arg1<=Arg2;
+            }
+        };
+
+
+        //! case insensitive version of is_not_greater
+        /*!
+            Case insensitive comparison predicate. Comparison is done using
+            specified locales.
+        */
+        struct is_not_igreater
+        {
+            //! Constructor
+            /*!
+                \param Loc locales used for comparison
+            */
+            is_not_igreater( const std::locale& Loc=std::locale() ) :
+                m_Loc( Loc ) {}
+
+            //! Function operator
+            /*!
+                Compare two operands. Case is ignored.
+            */
+            template< typename T1, typename T2 >
+                bool operator()( const T1& Arg1, const T2& Arg2 ) const
+            {
+                #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
+                    return std::toupper(Arg1)<=std::toupper(Arg2);
+                #else
+                    return std::toupper<T1>(Arg1,m_Loc)<=std::toupper<T2>(Arg2,m_Loc);
+                #endif
+            }
+
+        private:
+            std::locale m_Loc;
+        };
+
+
+    } // namespace algorithm
+
+    // pull names to the boost namespace
+    using algorithm::is_equal;
+    using algorithm::is_iequal;
+    using algorithm::is_less;
+    using algorithm::is_iless;
+    using algorithm::is_not_greater;
+    using algorithm::is_not_igreater;
+
+} // namespace ndnboost
+
+
+#endif  // BOOST_STRING_COMPARE_HPP
diff --git a/ndnboost/algorithm/string/concept.hpp b/ndnboost/algorithm/string/concept.hpp
new file mode 100644
index 0000000..31faa80
--- /dev/null
+++ b/ndnboost/algorithm/string/concept.hpp
@@ -0,0 +1,83 @@
+//  Boost string_algo library concept.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_CONCEPT_HPP
+#define BOOST_STRING_CONCEPT_HPP
+
+#include <ndnboost/concept_check.hpp>
+#include <ndnboost/range/iterator_range.hpp>
+#include <ndnboost/range/begin.hpp>
+#include <ndnboost/range/end.hpp>
+
+/*! \file 
+    Defines concepts used in string_algo library
+*/
+
+namespace ndnboost {
+    namespace algorithm {
+
+        //! Finder concept
+        /*!
+            Defines the Finder concept. Finder is a functor which selects
+            an arbitrary part of a string. Search is performed on
+            the range specified by starting and ending iterators.
+
+            Result of the find operation must be convertible to iterator_range.
+        */
+        template<typename FinderT, typename IteratorT>
+        struct FinderConcept
+        {
+        private:
+            typedef iterator_range<IteratorT> range;
+        public:
+            void constraints()
+            {
+                // Operation
+                r=(*pF)(i,i);
+            }
+        private:
+            range r;
+            IteratorT i;
+            FinderT* pF;    
+        }; // Finder_concept
+
+        
+        //! Formatter concept
+        /*!
+            Defines the Formatter concept. Formatter is a functor, which
+            takes a result from a finder operation and transforms it
+            in a specific way.
+
+            Result must be a container supported by container_traits, 
+            or a reference to it.
+        */
+        template<typename FormatterT, typename FinderT, typename IteratorT>
+        struct FormatterConcept
+        {
+        public:
+            void constraints()
+            {
+                // Operation
+                ::ndnboost::begin((*pFo)( (*pF)(i,i) ));
+                ::ndnboost::end((*pFo)( (*pF)(i,i) ));
+            }
+        private:
+            IteratorT i;
+            FinderT* pF;
+            FormatterT *pFo;
+        }; // FormatterConcept;
+
+    } // namespace algorithm
+} // namespace ndnboost
+
+
+
+
+#endif  // BOOST_STRING_CONCEPT_HPP
diff --git a/ndnboost/algorithm/string/config.hpp b/ndnboost/algorithm/string/config.hpp
new file mode 100644
index 0000000..4ed3d05
--- /dev/null
+++ b/ndnboost/algorithm/string/config.hpp
@@ -0,0 +1,28 @@
+//  Boost string_algo library config.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_CONFIG_HPP
+#define BOOST_STRING_CONFIG_HPP
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/detail/workaround.hpp>
+
+#ifdef BOOST_STRING_DEDUCED_TYPENAME
+#   error "macro already defined!"
+#endif
+
+#define BOOST_STRING_TYPENAME BOOST_DEDUCED_TYPENAME
+
+// Metrowerks workaround
+#if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // 8.x
+#pragma parse_func_templ off
+#endif
+
+#endif  // BOOST_STRING_CONFIG_HPP
diff --git a/ndnboost/algorithm/string/constants.hpp b/ndnboost/algorithm/string/constants.hpp
new file mode 100644
index 0000000..232d0d8
--- /dev/null
+++ b/ndnboost/algorithm/string/constants.hpp
@@ -0,0 +1,36 @@
+//  Boost string_algo library constants.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_CONSTANTS_HPP
+#define BOOST_STRING_CONSTANTS_HPP
+
+namespace ndnboost {
+    namespace algorithm {
+
+    //! Token compression mode 
+    /*!
+        Specifies token compression mode for the token_finder.
+    */
+    enum token_compress_mode_type
+    {
+        token_compress_on,    //!< Compress adjacent tokens
+        token_compress_off  //!< Do not compress adjacent tokens
+    };
+    
+    } // namespace algorithm
+
+    // pull the names to the boost namespace
+    using algorithm::token_compress_on;
+    using algorithm::token_compress_off;
+
+} // namespace ndnboost
+
+#endif  // BOOST_STRING_CONSTANTS_HPP
+
diff --git a/ndnboost/algorithm/string/detail/find_format.hpp b/ndnboost/algorithm/string/detail/find_format.hpp
new file mode 100644
index 0000000..395beaf
--- /dev/null
+++ b/ndnboost/algorithm/string/detail/find_format.hpp
@@ -0,0 +1,204 @@
+//  Boost string_algo library find_format.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+// 
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_FIND_FORMAT_DETAIL_HPP
+#define BOOST_STRING_FIND_FORMAT_DETAIL_HPP
+
+#include <ndnboost/algorithm/string/config.hpp>
+#include <ndnboost/range/iterator_range.hpp>
+#include <ndnboost/range/const_iterator.hpp>
+#include <ndnboost/range/iterator.hpp>
+#include <ndnboost/algorithm/string/detail/find_format_store.hpp>
+#include <ndnboost/algorithm/string/detail/replace_storage.hpp>
+
+namespace ndnboost {
+    namespace algorithm {
+        namespace detail {
+
+// find_format_copy (iterator variant) implementation -------------------------------//
+
+           template< 
+                typename OutputIteratorT,
+                typename InputT,
+                typename FormatterT,
+                typename FindResultT,
+                typename FormatResultT >
+            inline OutputIteratorT find_format_copy_impl2(
+                OutputIteratorT Output,
+                const InputT& Input,
+                FormatterT Formatter,
+                const FindResultT& FindResult,
+                const FormatResultT& FormatResult )
+            {       
+                typedef find_format_store<
+                    BOOST_STRING_TYPENAME 
+                        range_const_iterator<InputT>::type, 
+                        FormatterT,
+                        FormatResultT > store_type;
+
+                // Create store for the find result
+                store_type M( FindResult, FormatResult, Formatter );
+
+                if ( !M )
+                {
+                    // Match not found - return original sequence
+                    Output = std::copy( ::ndnboost::begin(Input), ::ndnboost::end(Input), Output );
+                    return Output;
+                }
+
+                // Copy the beginning of the sequence
+                Output = std::copy( ::ndnboost::begin(Input), ::ndnboost::begin(M), Output );
+                // Format find result
+                // Copy formatted result
+                Output = std::copy( ::ndnboost::begin(M.format_result()), ::ndnboost::end(M.format_result()), Output );
+                // Copy the rest of the sequence
+                Output = std::copy( M.end(), ::ndnboost::end(Input), Output );
+
+                return Output;
+            }
+
+            template< 
+                typename OutputIteratorT,
+                typename InputT,
+                typename FormatterT,
+                typename FindResultT >
+            inline OutputIteratorT find_format_copy_impl(
+                OutputIteratorT Output,
+                const InputT& Input,
+                FormatterT Formatter,
+                const FindResultT& FindResult )
+            {   
+                if( ::ndnboost::algorithm::detail::check_find_result(Input, FindResult) ) {
+                    return ::ndnboost::algorithm::detail::find_format_copy_impl2( 
+                        Output,
+                        Input,
+                        Formatter,
+                        FindResult,
+                        Formatter(FindResult) );
+                } else {
+                    return std::copy( ::ndnboost::begin(Input), ::ndnboost::end(Input), Output );
+                }
+            }
+
+ 
+// find_format_copy implementation --------------------------------------------------//
+
+           template< 
+                typename InputT, 
+                typename FormatterT,
+                typename FindResultT,
+                typename FormatResultT >
+            inline InputT find_format_copy_impl2(
+                const InputT& Input,
+                FormatterT Formatter,
+                const FindResultT& FindResult,
+                const FormatResultT& FormatResult)
+            {
+                typedef find_format_store<
+                    BOOST_STRING_TYPENAME 
+                        range_const_iterator<InputT>::type, 
+                        FormatterT,
+                        FormatResultT > store_type;
+
+                // Create store for the find result
+                store_type M( FindResult, FormatResult, Formatter );
+
+                if ( !M )
+                {
+                    // Match not found - return original sequence
+                    return InputT( Input );
+                }
+
+                InputT Output;
+                // Copy the beginning of the sequence
+                ndnboost::algorithm::detail::insert( Output, ::ndnboost::end(Output), ::ndnboost::begin(Input), M.begin() );
+                // Copy formatted result
+                ndnboost::algorithm::detail::insert( Output, ::ndnboost::end(Output), M.format_result() );
+                // Copy the rest of the sequence
+                ndnboost::algorithm::detail::insert( Output, ::ndnboost::end(Output), M.end(), ::ndnboost::end(Input) );
+
+                return Output;
+            }
+
+            template< 
+                typename InputT, 
+                typename FormatterT,
+                typename FindResultT >
+            inline InputT find_format_copy_impl(
+                const InputT& Input,
+                FormatterT Formatter,
+                const FindResultT& FindResult)
+            {
+                if( ::ndnboost::algorithm::detail::check_find_result(Input, FindResult) ) {
+                    return ::ndnboost::algorithm::detail::find_format_copy_impl2(
+                        Input,
+                        Formatter,
+                        FindResult,
+                        Formatter(FindResult) );
+                } else {
+                    return Input;
+                }
+            }
+
+ // replace implementation ----------------------------------------------------//
+        
+            template<
+                typename InputT,
+                typename FormatterT,
+                typename FindResultT,
+                typename FormatResultT >
+            inline void find_format_impl2( 
+                InputT& Input,
+                FormatterT Formatter,
+                const FindResultT& FindResult,
+                const FormatResultT& FormatResult)
+            {
+                typedef find_format_store<
+                    BOOST_STRING_TYPENAME 
+                        range_iterator<InputT>::type, 
+                        FormatterT,
+                        FormatResultT > store_type;
+
+                // Create store for the find result
+                store_type M( FindResult, FormatResult, Formatter );
+
+                if ( !M )
+                {
+                    // Search not found - return original sequence
+                    return;
+                }
+
+                // Replace match
+                ::ndnboost::algorithm::detail::replace( Input, M.begin(), M.end(), M.format_result() );
+            }
+
+            template<
+                typename InputT,
+                typename FormatterT,
+                typename FindResultT >
+            inline void find_format_impl( 
+                InputT& Input,
+                FormatterT Formatter,
+                const FindResultT& FindResult)
+            {
+                if( ::ndnboost::algorithm::detail::check_find_result(Input, FindResult) ) {
+                    ::ndnboost::algorithm::detail::find_format_impl2(
+                        Input,
+                        Formatter,
+                        FindResult,
+                        Formatter(FindResult) );
+                }
+            }
+
+        } // namespace detail
+    } // namespace algorithm
+} // namespace ndnboost
+
+#endif  // BOOST_STRING_FIND_FORMAT_DETAIL_HPP
diff --git a/ndnboost/algorithm/string/detail/find_format_all.hpp b/ndnboost/algorithm/string/detail/find_format_all.hpp
new file mode 100644
index 0000000..ee0312a
--- /dev/null
+++ b/ndnboost/algorithm/string/detail/find_format_all.hpp
@@ -0,0 +1,273 @@
+//  Boost string_algo library find_format_all.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP
+#define BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP
+
+#include <ndnboost/algorithm/string/config.hpp>
+#include <ndnboost/range/iterator_range.hpp>
+#include <ndnboost/range/const_iterator.hpp>
+#include <ndnboost/range/value_type.hpp>
+#include <ndnboost/algorithm/string/detail/find_format_store.hpp>
+#include <ndnboost/algorithm/string/detail/replace_storage.hpp>
+
+namespace ndnboost {
+    namespace algorithm {
+        namespace detail {
+
+// find_format_all_copy (iterator variant) implementation ---------------------------//
+
+           template< 
+                typename OutputIteratorT,
+                typename InputT,
+                typename FinderT,
+                typename FormatterT,
+                typename FindResultT,
+                typename FormatResultT >
+            inline OutputIteratorT find_format_all_copy_impl2(
+                OutputIteratorT Output,
+                const InputT& Input,
+                FinderT Finder,
+                FormatterT Formatter,
+                const FindResultT& FindResult,
+                const FormatResultT& FormatResult )
+            {       
+                typedef BOOST_STRING_TYPENAME 
+                    range_const_iterator<InputT>::type input_iterator_type; 
+
+                typedef find_format_store<
+                        input_iterator_type, 
+                        FormatterT,
+                        FormatResultT > store_type;
+
+                // Create store for the find result
+                store_type M( FindResult, FormatResult, Formatter );
+
+                // Initialize last match
+                input_iterator_type LastMatch=::ndnboost::begin(Input);
+
+                // Iterate through all matches
+                while( M )
+                {
+                    // Copy the beginning of the sequence
+                    Output = std::copy( LastMatch, M.begin(), Output );
+                    // Copy formatted result
+                    Output = std::copy( ::ndnboost::begin(M.format_result()), ::ndnboost::end(M.format_result()), Output );
+
+                    // Proceed to the next match
+                    LastMatch=M.end();
+                    M=Finder( LastMatch, ::ndnboost::end(Input) );
+                }
+
+                // Copy the rest of the sequence
+                Output = std::copy( LastMatch, ::ndnboost::end(Input), Output );
+
+                return Output;
+            }
+
+            template< 
+                typename OutputIteratorT,
+                typename InputT,
+                typename FinderT,
+                typename FormatterT,
+                typename FindResultT >
+            inline OutputIteratorT find_format_all_copy_impl(
+                OutputIteratorT Output,
+                const InputT& Input,
+                FinderT Finder,
+                FormatterT Formatter,
+                const FindResultT& FindResult )
+            {   
+                if( ::ndnboost::algorithm::detail::check_find_result(Input, FindResult) ) {
+                    return ::ndnboost::algorithm::detail::find_format_all_copy_impl2( 
+                        Output,
+                        Input,
+                        Finder,
+                        Formatter,
+                        FindResult,
+                        Formatter(FindResult) );
+                } else {
+                    return std::copy( ::ndnboost::begin(Input), ::ndnboost::end(Input), Output );
+                }
+            }
+
+ // find_format_all_copy implementation ----------------------------------------------//
+
+           template< 
+                typename InputT, 
+                typename FinderT,
+                typename FormatterT,
+                typename FindResultT,
+                typename FormatResultT >
+            inline InputT find_format_all_copy_impl2(
+                const InputT& Input,
+                FinderT Finder,
+                FormatterT Formatter,
+                const FindResultT& FindResult,
+                const FormatResultT& FormatResult)
+            {
+                typedef BOOST_STRING_TYPENAME 
+                    range_const_iterator<InputT>::type input_iterator_type; 
+
+                typedef find_format_store<
+                        input_iterator_type, 
+                        FormatterT,
+                        FormatResultT > store_type;
+
+                // Create store for the find result
+                store_type M( FindResult, FormatResult, Formatter );
+
+                // Initialize last match
+                input_iterator_type LastMatch=::ndnboost::begin(Input);
+
+                // Output temporary
+                InputT Output;
+
+                // Iterate through all matches
+                while( M )
+                {
+                    // Copy the beginning of the sequence
+                    ndnboost::algorithm::detail::insert( Output, ::ndnboost::end(Output), LastMatch, M.begin() );
+                    // Copy formatted result
+                    ndnboost::algorithm::detail::insert( Output, ::ndnboost::end(Output), M.format_result() );
+
+                    // Proceed to the next match
+                    LastMatch=M.end();
+                    M=Finder( LastMatch, ::ndnboost::end(Input) );
+                }
+
+                // Copy the rest of the sequence
+                ::ndnboost::algorithm::detail::insert( Output, ::ndnboost::end(Output), LastMatch, ::ndnboost::end(Input) );
+
+                return Output;
+            }
+
+            template< 
+                typename InputT, 
+                typename FinderT,
+                typename FormatterT,
+                typename FindResultT >
+            inline InputT find_format_all_copy_impl(
+                const InputT& Input,
+                FinderT Finder,
+                FormatterT Formatter,
+                const FindResultT& FindResult)
+            {
+                if( ::ndnboost::algorithm::detail::check_find_result(Input, FindResult) ) {
+                    return ::ndnboost::algorithm::detail::find_format_all_copy_impl2(
+                        Input,
+                        Finder,
+                        Formatter,
+                        FindResult,
+                        Formatter(FindResult) );
+                } else {
+                    return Input;
+                }
+            }
+
+ // find_format_all implementation ------------------------------------------------//
+        
+            template<
+                typename InputT,
+                typename FinderT,
+                typename FormatterT,
+                typename FindResultT,
+                typename FormatResultT >
+            inline void find_format_all_impl2( 
+                InputT& Input,
+                FinderT Finder,
+                FormatterT Formatter,
+                FindResultT FindResult,
+                FormatResultT FormatResult)
+            {
+                typedef BOOST_STRING_TYPENAME 
+                    range_iterator<InputT>::type input_iterator_type; 
+                typedef find_format_store<
+                        input_iterator_type, 
+                        FormatterT,
+                        FormatResultT > store_type;
+
+                // Create store for the find result
+                store_type M( FindResult, FormatResult, Formatter );
+          
+                // Instantiate replacement storage
+                std::deque<
+                    BOOST_STRING_TYPENAME range_value<InputT>::type> Storage;
+
+                // Initialize replacement iterators
+                input_iterator_type InsertIt=::ndnboost::begin(Input);
+                input_iterator_type SearchIt=::ndnboost::begin(Input);
+                
+                while( M )
+                {
+                    // process the segment
+                    InsertIt=process_segment( 
+                        Storage,
+                        Input,
+                        InsertIt,
+                        SearchIt,
+                        M.begin() );
+                    
+                    // Adjust search iterator
+                    SearchIt=M.end();
+
+                    // Copy formatted replace to the storage
+                    ::ndnboost::algorithm::detail::copy_to_storage( Storage, M.format_result() );
+
+                    // Find range for a next match
+                    M=Finder( SearchIt, ::ndnboost::end(Input) );
+                }
+
+                // process the last segment
+                InsertIt=::ndnboost::algorithm::detail::process_segment( 
+                    Storage,
+                    Input,
+                    InsertIt,
+                    SearchIt,
+                    ::ndnboost::end(Input) );
+                
+                if ( Storage.empty() )
+                {
+                    // Truncate input
+                    ::ndnboost::algorithm::detail::erase( Input, InsertIt, ::ndnboost::end(Input) );
+                }
+                else
+                {
+                    // Copy remaining data to the end of input
+                    ::ndnboost::algorithm::detail::insert( Input, ::ndnboost::end(Input), Storage.begin(), Storage.end() );
+                }
+            }
+
+            template<
+                typename InputT,
+                typename FinderT,
+                typename FormatterT,
+                typename FindResultT >
+            inline void find_format_all_impl( 
+                InputT& Input,
+                FinderT Finder,
+                FormatterT Formatter,
+                FindResultT FindResult)
+            {
+                if( ::ndnboost::algorithm::detail::check_find_result(Input, FindResult) ) {
+                    ::ndnboost::algorithm::detail::find_format_all_impl2(
+                        Input,
+                        Finder,
+                        Formatter,
+                        FindResult,
+                        Formatter(FindResult) );
+                }
+            }
+
+        } // namespace detail
+    } // namespace algorithm
+} // namespace ndnboost
+
+#endif  // BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP
diff --git a/ndnboost/algorithm/string/detail/find_format_store.hpp b/ndnboost/algorithm/string/detail/find_format_store.hpp
new file mode 100644
index 0000000..d0d38bf
--- /dev/null
+++ b/ndnboost/algorithm/string/detail/find_format_store.hpp
@@ -0,0 +1,89 @@
+//  Boost string_algo library find_format_store.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP
+#define BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP
+
+#include <ndnboost/algorithm/string/config.hpp>
+#include <ndnboost/range/iterator_range.hpp>
+
+namespace ndnboost {
+    namespace algorithm {
+        namespace detail {
+
+//  temporary format and find result storage --------------------------------//
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(push)
+#pragma warning(disable:4512) //assignment operator could not be generated
+#endif
+            template< 
+                typename ForwardIteratorT,
+                typename FormatterT,
+                typename FormatResultT >
+            class find_format_store : 
+                public iterator_range<ForwardIteratorT>
+            {
+            public:
+                // typedefs
+                typedef iterator_range<ForwardIteratorT> base_type;
+                typedef FormatterT  formatter_type;
+                typedef FormatResultT format_result_type;
+                
+            public:
+                // Construction
+                find_format_store( 
+                        const base_type& FindResult,
+                        const format_result_type& FormatResult,
+                        const formatter_type& Formatter ) :
+                    base_type(FindResult),
+                    m_FormatResult(FormatResult),
+                    m_Formatter(Formatter) {}
+
+                // Assignment
+                template< typename FindResultT >
+                find_format_store& operator=( FindResultT FindResult )
+                {
+                    iterator_range<ForwardIteratorT>::operator=(FindResult);
+                    if( !this->empty() ) {
+                        m_FormatResult=m_Formatter(FindResult);
+                    }
+                    
+                    return *this;
+                }
+
+                // Retrieve format result
+                const format_result_type& format_result()
+                {   
+                    return m_FormatResult;
+                }
+
+            private:
+                format_result_type m_FormatResult;
+                const formatter_type& m_Formatter;
+            };
+
+            template<typename InputT, typename FindResultT>
+            bool check_find_result(InputT&, FindResultT& FindResult)
+            {
+                typedef BOOST_STRING_TYPENAME 
+                    range_const_iterator<InputT>::type input_iterator_type; 
+                iterator_range<input_iterator_type> ResultRange(FindResult);
+                return !ResultRange.empty();
+            }
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(pop)
+#endif
+        } // namespace detail
+    } // namespace algorithm
+} // namespace ndnboost
+
+#endif  // BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP
diff --git a/ndnboost/algorithm/string/detail/finder.hpp b/ndnboost/algorithm/string/detail/finder.hpp
new file mode 100644
index 0000000..330c7a5
--- /dev/null
+++ b/ndnboost/algorithm/string/detail/finder.hpp
@@ -0,0 +1,646 @@
+//  Boost string_algo library finder.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2006.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_FINDER_DETAIL_HPP
+#define BOOST_STRING_FINDER_DETAIL_HPP
+
+#include <ndnboost/algorithm/string/config.hpp>
+#include <ndnboost/algorithm/string/constants.hpp>
+#include <ndnboost/detail/iterator.hpp>
+
+#include <ndnboost/range/iterator_range.hpp>
+#include <ndnboost/range/begin.hpp>
+#include <ndnboost/range/end.hpp>
+#include <ndnboost/range/empty.hpp>
+#include <ndnboost/range/as_literal.hpp>
+
+namespace ndnboost {
+    namespace algorithm {
+        namespace detail {
+
+
+//  find first functor -----------------------------------------------//
+
+            // find a subsequence in the sequence ( functor )
+            /*
+                Returns a pair <begin,end> marking the subsequence in the sequence.
+                If the find fails, functor returns <End,End>
+            */
+            template<typename SearchIteratorT,typename PredicateT>
+            struct first_finderF
+            {
+                typedef SearchIteratorT search_iterator_type;
+
+                // Construction
+                template< typename SearchT >
+                first_finderF( const SearchT& Search, PredicateT Comp ) :
+                    m_Search(::ndnboost::begin(Search), ::ndnboost::end(Search)), m_Comp(Comp) {}
+                first_finderF(
+                        search_iterator_type SearchBegin,
+                        search_iterator_type SearchEnd,
+                        PredicateT Comp ) :
+                    m_Search(SearchBegin, SearchEnd), m_Comp(Comp) {}
+
+                // Operation
+                template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+                operator()(
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End ) const
+                {
+                    typedef iterator_range<ForwardIteratorT> result_type;
+                    typedef ForwardIteratorT input_iterator_type;
+
+                    // Outer loop
+                    for(input_iterator_type OuterIt=Begin;
+                        OuterIt!=End;
+                        ++OuterIt)
+                    {
+                        // Sanity check
+                        if( ndnboost::empty(m_Search) )
+                            return result_type( End, End );
+
+                        input_iterator_type InnerIt=OuterIt;
+                        search_iterator_type SubstrIt=m_Search.begin();
+                        for(;
+                            InnerIt!=End && SubstrIt!=m_Search.end();
+                            ++InnerIt,++SubstrIt)
+                        {
+                            if( !( m_Comp(*InnerIt,*SubstrIt) ) )
+                                break;
+                        }
+
+                        // Substring matching succeeded
+                        if ( SubstrIt==m_Search.end() )
+                            return result_type( OuterIt, InnerIt );
+                    }
+
+                    return result_type( End, End );
+                }
+
+            private:
+                iterator_range<search_iterator_type> m_Search;
+                PredicateT m_Comp;
+            };
+
+//  find last functor -----------------------------------------------//
+
+            // find the last match a subsequence in the sequence ( functor )
+            /*
+                Returns a pair <begin,end> marking the subsequence in the sequence.
+                If the find fails, returns <End,End>
+            */
+            template<typename SearchIteratorT, typename PredicateT>
+            struct last_finderF
+            {
+                typedef SearchIteratorT search_iterator_type;
+                typedef first_finderF<
+                    search_iterator_type,
+                    PredicateT> first_finder_type;
+
+                // Construction
+                template< typename SearchT >
+                last_finderF( const SearchT& Search, PredicateT Comp ) :
+                    m_Search(::ndnboost::begin(Search), ::ndnboost::end(Search)), m_Comp(Comp) {}
+                last_finderF(
+                        search_iterator_type SearchBegin,
+                        search_iterator_type SearchEnd,
+                        PredicateT Comp ) :
+                    m_Search(SearchBegin, SearchEnd), m_Comp(Comp) {}
+
+                // Operation
+                template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+                operator()(
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End ) const
+                {
+                    typedef iterator_range<ForwardIteratorT> result_type;
+
+                    if( ndnboost::empty(m_Search) )
+                        return result_type( End, End );
+
+                    typedef BOOST_STRING_TYPENAME ndnboost::detail::
+                        iterator_traits<ForwardIteratorT>::iterator_category category;
+
+                    return findit( Begin, End, category() );
+                }
+
+            private:
+                // forward iterator
+                template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+                findit(
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End,
+                    std::forward_iterator_tag ) const
+                {
+                    typedef ForwardIteratorT input_iterator_type;
+                    typedef iterator_range<ForwardIteratorT> result_type;
+
+                    first_finder_type first_finder(
+                        m_Search.begin(), m_Search.end(), m_Comp );
+
+                    result_type M=first_finder( Begin, End );
+                    result_type Last=M;
+
+                    while( M )
+                    {
+                        Last=M;
+                        M=first_finder( ::ndnboost::end(M), End );
+                    }
+
+                    return Last;
+                }
+
+                // bidirectional iterator
+                template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+                findit(
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End,
+                    std::bidirectional_iterator_tag ) const
+                {
+                    typedef iterator_range<ForwardIteratorT> result_type;
+                    typedef ForwardIteratorT input_iterator_type;
+
+                    // Outer loop
+                    for(input_iterator_type OuterIt=End;
+                        OuterIt!=Begin; )
+                    {
+                        input_iterator_type OuterIt2=--OuterIt;
+
+                        input_iterator_type InnerIt=OuterIt2;
+                        search_iterator_type SubstrIt=m_Search.begin();
+                        for(;
+                            InnerIt!=End && SubstrIt!=m_Search.end();
+                            ++InnerIt,++SubstrIt)
+                        {
+                            if( !( m_Comp(*InnerIt,*SubstrIt) ) )
+                                break;
+                        }
+
+                        // Substring matching succeeded
+                        if( SubstrIt==m_Search.end() )
+                            return result_type( OuterIt2, InnerIt );
+                    }
+
+                    return result_type( End, End );
+                }
+
+            private:
+                iterator_range<search_iterator_type> m_Search;
+                PredicateT m_Comp;
+            };
+
+//  find n-th functor -----------------------------------------------//
+
+            // find the n-th match of a subsequence in the sequence ( functor )
+            /*
+                Returns a pair <begin,end> marking the subsequence in the sequence.
+                If the find fails, returns <End,End>
+            */
+            template<typename SearchIteratorT, typename PredicateT>
+            struct nth_finderF
+            {
+                typedef SearchIteratorT search_iterator_type;
+                typedef first_finderF<
+                    search_iterator_type,
+                    PredicateT> first_finder_type;
+                typedef last_finderF<
+                    search_iterator_type,
+                    PredicateT> last_finder_type;
+
+                // Construction
+                template< typename SearchT >
+                nth_finderF(
+                        const SearchT& Search,
+                        int Nth,
+                        PredicateT Comp) :
+                    m_Search(::ndnboost::begin(Search), ::ndnboost::end(Search)),
+                    m_Nth(Nth),
+                    m_Comp(Comp) {}
+                nth_finderF(
+                        search_iterator_type SearchBegin,
+                        search_iterator_type SearchEnd,
+                        int Nth,
+                        PredicateT Comp) :
+                    m_Search(SearchBegin, SearchEnd),
+                    m_Nth(Nth),
+                    m_Comp(Comp) {}
+
+                // Operation
+                template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+                operator()(
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End ) const
+                {
+                    if(m_Nth>=0)
+                    {
+                        return find_forward(Begin, End, m_Nth);
+                    }
+                    else
+                    {
+                        return find_backward(Begin, End, -m_Nth);
+                    }
+
+                }
+
+            private:
+                // Implementation helpers
+                template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+                find_forward(
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End,
+                    unsigned int N) const
+                {
+                    typedef ForwardIteratorT input_iterator_type;
+                    typedef iterator_range<ForwardIteratorT> result_type;
+
+                    // Sanity check
+                    if( ndnboost::empty(m_Search) )
+                        return result_type( End, End );
+
+                    // Instantiate find functor
+                    first_finder_type first_finder(
+                        m_Search.begin(), m_Search.end(), m_Comp );
+
+                    result_type M( Begin, Begin );
+
+                    for( unsigned int n=0; n<=N; ++n )
+                    {
+                        // find next match
+                        M=first_finder( ::ndnboost::end(M), End );
+
+                        if ( !M )
+                        {
+                            // Subsequence not found, return
+                            return M;
+                        }
+                    }
+
+                    return M;
+                }
+
+                template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+                find_backward(
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End,
+                    unsigned int N) const
+                {
+                    typedef ForwardIteratorT input_iterator_type;
+                    typedef iterator_range<ForwardIteratorT> result_type;
+
+                    // Sanity check
+                    if( ndnboost::empty(m_Search) )
+                        return result_type( End, End );
+
+                    // Instantiate find functor
+                    last_finder_type last_finder(
+                        m_Search.begin(), m_Search.end(), m_Comp );
+
+                    result_type M( End, End );
+
+                    for( unsigned int n=1; n<=N; ++n )
+                    {
+                        // find next match
+                        M=last_finder( Begin, ::ndnboost::begin(M) );
+
+                        if ( !M )
+                        {
+                            // Subsequence not found, return
+                            return M;
+                        }
+                    }
+
+                    return M;
+                }
+
+
+            private:
+                iterator_range<search_iterator_type> m_Search;
+                int m_Nth;
+                PredicateT m_Comp;
+            };
+
+//  find head/tail implementation helpers ---------------------------//
+
+            template<typename ForwardIteratorT>
+                iterator_range<ForwardIteratorT>
+            find_head_impl(
+                ForwardIteratorT Begin,
+                ForwardIteratorT End,
+                unsigned int N,
+                std::forward_iterator_tag )
+            {
+                typedef ForwardIteratorT input_iterator_type;
+                typedef iterator_range<ForwardIteratorT> result_type;
+
+                input_iterator_type It=Begin;
+                for(
+                    unsigned int Index=0;
+                    Index<N && It!=End; ++Index,++It ) {};
+
+                return result_type( Begin, It );
+            }
+
+            template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+            find_head_impl(
+                ForwardIteratorT Begin,
+                ForwardIteratorT End,
+                unsigned int N,
+                std::random_access_iterator_tag )
+            {
+                typedef ForwardIteratorT input_iterator_type;
+                typedef iterator_range<ForwardIteratorT> result_type;
+
+                if ( (End<=Begin) || ( static_cast<unsigned int>(End-Begin) < N ) )
+                    return result_type( Begin, End );
+
+                return result_type(Begin,Begin+N);
+            }
+
+            // Find head implementation
+            template<typename ForwardIteratorT>
+                iterator_range<ForwardIteratorT>
+            find_head_impl(
+                ForwardIteratorT Begin,
+                ForwardIteratorT End,
+                unsigned int N )
+            {
+                typedef BOOST_STRING_TYPENAME ndnboost::detail::
+                    iterator_traits<ForwardIteratorT>::iterator_category category;
+
+                return ::ndnboost::algorithm::detail::find_head_impl( Begin, End, N, category() );
+            }
+
+            template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+            find_tail_impl(
+                ForwardIteratorT Begin,
+                ForwardIteratorT End,
+                unsigned int N,
+                std::forward_iterator_tag )
+            {
+                typedef ForwardIteratorT input_iterator_type;
+                typedef iterator_range<ForwardIteratorT> result_type;
+
+                unsigned int Index=0;
+                input_iterator_type It=Begin;
+                input_iterator_type It2=Begin;
+
+                // Advance It2 by N increments
+                for( Index=0; Index<N && It2!=End; ++Index,++It2 ) {};
+
+                // Advance It, It2 to the end
+                for(; It2!=End; ++It,++It2 ) {};
+
+                return result_type( It, It2 );
+            }
+
+            template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+            find_tail_impl(
+                ForwardIteratorT Begin,
+                ForwardIteratorT End,
+                unsigned int N,
+                std::bidirectional_iterator_tag )
+            {
+                typedef ForwardIteratorT input_iterator_type;
+                typedef iterator_range<ForwardIteratorT> result_type;
+
+                input_iterator_type It=End;
+                for(
+                    unsigned int Index=0;
+                    Index<N && It!=Begin; ++Index,--It ) {};
+
+                return result_type( It, End );
+            }
+
+            template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+            find_tail_impl(
+                ForwardIteratorT Begin,
+                ForwardIteratorT End,
+                unsigned int N,
+                std::random_access_iterator_tag )
+            {
+                typedef ForwardIteratorT input_iterator_type;
+                typedef iterator_range<ForwardIteratorT> result_type;
+
+                if ( (End<=Begin) || ( static_cast<unsigned int>(End-Begin) < N ) )
+                    return result_type( Begin, End );
+
+                return result_type( End-N, End );
+            }
+
+                        // Operation
+            template< typename ForwardIteratorT >
+            iterator_range<ForwardIteratorT>
+            find_tail_impl(
+                ForwardIteratorT Begin,
+                ForwardIteratorT End,
+                unsigned int N )
+            {
+                typedef BOOST_STRING_TYPENAME ndnboost::detail::
+                    iterator_traits<ForwardIteratorT>::iterator_category category;
+
+                return ::ndnboost::algorithm::detail::find_tail_impl( Begin, End, N, category() );
+            }
+
+
+
+//  find head functor -----------------------------------------------//
+
+
+            // find a head in the sequence ( functor )
+            /*
+                This functor find a head of the specified range. For
+                a specified N, the head is a subsequence of N starting
+                elements of the range.
+            */
+            struct head_finderF
+            {
+                // Construction
+                head_finderF( int N ) : m_N(N) {}
+
+                // Operation
+                template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+                operator()(
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End ) const
+                {
+                    if(m_N>=0)
+                    {
+                        return ::ndnboost::algorithm::detail::find_head_impl( Begin, End, m_N );
+                    }
+                    else
+                    {
+                        iterator_range<ForwardIteratorT> Res=
+                            ::ndnboost::algorithm::detail::find_tail_impl( Begin, End, -m_N );
+
+                        return ::ndnboost::make_iterator_range(Begin, Res.begin());
+                    }
+                }
+
+            private:
+                int m_N;
+            };
+
+//  find tail functor -----------------------------------------------//
+
+
+            // find a tail in the sequence ( functor )
+            /*
+                This functor find a tail of the specified range. For
+                a specified N, the head is a subsequence of N starting
+                elements of the range.
+            */
+            struct tail_finderF
+            {
+                // Construction
+                tail_finderF( int N ) : m_N(N) {}
+
+                // Operation
+                template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+                operator()(
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End ) const
+                {
+                    if(m_N>=0)
+                    {
+                        return ::ndnboost::algorithm::detail::find_tail_impl( Begin, End, m_N );
+                    }
+                    else
+                    {
+                        iterator_range<ForwardIteratorT> Res=
+                            ::ndnboost::algorithm::detail::find_head_impl( Begin, End, -m_N );
+
+                        return ::ndnboost::make_iterator_range(Res.end(), End);
+                    }
+                }
+
+            private:
+                int m_N;
+            };
+
+//  find token functor -----------------------------------------------//
+
+            // find a token in a sequence ( functor )
+            /*
+                This find functor finds a token specified be a predicate
+                in a sequence. It is equivalent of std::find algorithm,
+                with an exception that it return range instead of a single
+                iterator.
+
+                If bCompress is set to true, adjacent matching tokens are
+                concatenated into one match.
+            */
+            template< typename PredicateT >
+            struct token_finderF
+            {
+                // Construction
+                token_finderF(
+                    PredicateT Pred,
+                    token_compress_mode_type eCompress=token_compress_off ) :
+                        m_Pred(Pred), m_eCompress(eCompress) {}
+
+                // Operation
+                template< typename ForwardIteratorT >
+                iterator_range<ForwardIteratorT>
+                operator()(
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End ) const
+                {
+                    typedef iterator_range<ForwardIteratorT> result_type;
+
+                    ForwardIteratorT It=std::find_if( Begin, End, m_Pred );
+
+                    if( It==End )
+                    {
+                        return result_type( End, End );
+                    }
+                    else
+                    {
+                        ForwardIteratorT It2=It;
+
+                        if( m_eCompress==token_compress_on )
+                        {
+                            // Find first non-matching character
+                            while( It2!=End && m_Pred(*It2) ) ++It2;
+                        }
+                        else
+                        {
+                            // Advance by one position
+                            ++It2;
+                        }
+
+                        return result_type( It, It2 );
+                    }
+                }
+
+            private:
+                PredicateT m_Pred;
+                token_compress_mode_type m_eCompress;
+            };
+
+//  find range functor -----------------------------------------------//
+
+            // find a range in the sequence ( functor )
+            /*
+                This functor actually does not perform any find operation.
+                It always returns given iterator range as a result.
+            */
+            template<typename ForwardIterator1T>
+            struct range_finderF
+            {
+                typedef ForwardIterator1T input_iterator_type;
+                typedef iterator_range<input_iterator_type> result_type;
+
+                // Construction
+                range_finderF(
+                    input_iterator_type Begin,
+                    input_iterator_type End ) : m_Range(Begin, End) {}
+
+                range_finderF(const iterator_range<input_iterator_type>& Range) :
+                    m_Range(Range) {}
+
+                // Operation
+                template< typename ForwardIterator2T >
+                iterator_range<ForwardIterator2T>
+                operator()(
+                    ForwardIterator2T,
+                    ForwardIterator2T ) const
+                {
+#if BOOST_WORKAROUND( __MWERKS__, <= 0x3003 ) 
+                    return iterator_range<const ForwardIterator2T>(this->m_Range);
+#elif BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+                    return iterator_range<ForwardIterator2T>(m_Range.begin(), m_Range.end());
+#else
+                    return m_Range;
+#endif
+                }
+
+            private:
+                iterator_range<input_iterator_type> m_Range;
+            };
+
+
+        } // namespace detail
+    } // namespace algorithm
+} // namespace ndnboost
+
+#endif  // BOOST_STRING_FINDER_DETAIL_HPP
diff --git a/ndnboost/algorithm/string/detail/formatter.hpp b/ndnboost/algorithm/string/detail/formatter.hpp
new file mode 100644
index 0000000..0307310
--- /dev/null
+++ b/ndnboost/algorithm/string/detail/formatter.hpp
@@ -0,0 +1,119 @@
+//  Boost string_algo library formatter.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_FORMATTER_DETAIL_HPP
+#define BOOST_STRING_FORMATTER_DETAIL_HPP
+
+
+#include <ndnboost/range/iterator_range.hpp>
+#include <ndnboost/range/begin.hpp>
+#include <ndnboost/range/end.hpp>
+#include <ndnboost/range/const_iterator.hpp>
+
+#include <ndnboost/algorithm/string/detail/util.hpp>
+
+//  generic replace functors -----------------------------------------------//
+
+namespace ndnboost {
+    namespace algorithm {
+        namespace detail {
+
+//  const format functor ----------------------------------------------------//
+
+            // constant format functor
+            template<typename RangeT>
+            struct const_formatF
+            {
+            private:
+                typedef BOOST_STRING_TYPENAME
+                    range_const_iterator<RangeT>::type format_iterator;
+                typedef iterator_range<format_iterator> result_type;
+            
+            public:
+                // Construction
+                const_formatF(const RangeT& Format) :
+                    m_Format(::ndnboost::begin(Format), ::ndnboost::end(Format)) {}
+
+                // Operation
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+                template<typename Range2T>
+                result_type& operator()(const Range2T&)
+                {
+                    return m_Format;
+                }
+#endif
+
+                template<typename Range2T>
+                const result_type& operator()(const Range2T&) const
+                {
+                    return m_Format;
+                }
+
+            private:
+                result_type m_Format;
+            };
+
+//  identity format functor ----------------------------------------------------//
+
+            // identity format functor
+            template<typename RangeT>
+            struct identity_formatF
+            {
+                // Operation
+                template< typename Range2T >
+                const RangeT& operator()(const Range2T& Replace) const
+                {
+                    return RangeT(::ndnboost::begin(Replace), ::ndnboost::end(Replace));
+                }
+            };
+
+//  empty format functor ( used by erase ) ------------------------------------//
+        
+            // empty format functor
+            template< typename CharT >
+            struct empty_formatF
+            {
+                template< typename ReplaceT >
+                empty_container<CharT> operator()(const ReplaceT&) const
+                {
+                    return empty_container<CharT>();
+                }
+            };
+
+//  dissect format functor ----------------------------------------------------//
+
+            // dissect format functor
+            template<typename FinderT>
+            struct dissect_formatF
+            {
+            public:
+                // Construction
+                dissect_formatF(FinderT Finder) :
+                  m_Finder(Finder) {}
+
+                  // Operation
+                  template<typename RangeT>
+                  inline iterator_range< 
+                      BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type>
+                  operator()(const RangeT& Replace) const
+                  {
+                      return m_Finder(::ndnboost::begin(Replace), ::ndnboost::end(Replace));
+                  }
+
+            private:
+                FinderT m_Finder;
+            };
+
+
+        } // namespace detail
+    } // namespace algorithm
+} // namespace ndnboost
+
+#endif  // BOOST_STRING_FORMATTER_DETAIL_HPP
diff --git a/ndnboost/algorithm/string/detail/replace_storage.hpp b/ndnboost/algorithm/string/detail/replace_storage.hpp
new file mode 100644
index 0000000..6fb6c54
--- /dev/null
+++ b/ndnboost/algorithm/string/detail/replace_storage.hpp
@@ -0,0 +1,159 @@
+//  Boost string_algo library replace_storage.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP
+#define BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP
+
+#include <ndnboost/algorithm/string/config.hpp>
+#include <algorithm>
+#include <ndnboost/mpl/bool.hpp>
+#include <ndnboost/algorithm/string/sequence_traits.hpp>
+#include <ndnboost/algorithm/string/detail/sequence.hpp>
+
+namespace ndnboost {
+    namespace algorithm {
+        namespace detail {
+
+//  storage handling routines -----------------------------------------------//
+            
+            template< typename StorageT, typename OutputIteratorT >
+            inline OutputIteratorT move_from_storage(
+                StorageT& Storage,
+                OutputIteratorT DestBegin,
+                OutputIteratorT DestEnd )
+            {
+                OutputIteratorT OutputIt=DestBegin;
+                
+                while( !Storage.empty() && OutputIt!=DestEnd )
+                {
+                    *OutputIt=Storage.front();
+                    Storage.pop_front();
+                    ++OutputIt;
+                }
+
+                return OutputIt;
+            }
+
+            template< typename StorageT, typename WhatT >
+            inline void copy_to_storage(
+                StorageT& Storage,
+                const WhatT& What )
+            {
+                Storage.insert( Storage.end(), ::ndnboost::begin(What), ::ndnboost::end(What) );
+            }
+
+
+//  process segment routine -----------------------------------------------//
+
+            template< bool HasStableIterators >
+            struct process_segment_helper
+            {
+                // Optimized version of process_segment for generic sequence
+                template< 
+                    typename StorageT,
+                    typename InputT,
+                    typename ForwardIteratorT >
+                ForwardIteratorT operator()(
+                    StorageT& Storage,
+                    InputT& /*Input*/,
+                    ForwardIteratorT InsertIt,
+                    ForwardIteratorT SegmentBegin,
+                    ForwardIteratorT SegmentEnd )
+                {
+                    // Copy data from the storage until the beginning of the segment
+                    ForwardIteratorT It=::ndnboost::algorithm::detail::move_from_storage( Storage, InsertIt, SegmentBegin );
+
+                    // 3 cases are possible :
+                    //   a) Storage is empty, It==SegmentBegin
+                    //   b) Storage is empty, It!=SegmentBegin
+                    //   c) Storage is not empty
+
+                    if( Storage.empty() )
+                    {
+                        if( It==SegmentBegin )
+                        {
+                            // Case a) everything is grand, just return end of segment
+                            return SegmentEnd;
+                        }
+                        else
+                        {
+                            // Case b) move the segment backwards
+                            return std::copy( SegmentBegin, SegmentEnd, It );
+                        }
+                    }
+                    else
+                    {
+                        // Case c) -> shift the segment to the left and keep the overlap in the storage
+                        while( It!=SegmentEnd )
+                        {
+                            // Store value into storage
+                            Storage.push_back( *It );
+                            // Get the top from the storage and put it here
+                            *It=Storage.front();
+                            Storage.pop_front();
+
+                            // Advance
+                            ++It;
+                        }
+
+                        return It;
+                    }
+                }
+            };
+
+            template<>
+            struct process_segment_helper< true >
+            {
+                // Optimized version of process_segment for list-like sequence
+                template< 
+                    typename StorageT,
+                    typename InputT,
+                    typename ForwardIteratorT >
+                ForwardIteratorT operator()(
+                    StorageT& Storage,
+                    InputT& Input,
+                    ForwardIteratorT InsertIt,
+                    ForwardIteratorT SegmentBegin,
+                    ForwardIteratorT SegmentEnd )
+
+                {
+                    // Call replace to do the job
+                    ::ndnboost::algorithm::detail::replace( Input, InsertIt, SegmentBegin, Storage );
+                    // Empty the storage
+                    Storage.clear();
+                    // Iterators were not changed, simply return the end of segment
+                    return SegmentEnd;
+                }
+            };
+
+            // Process one segment in the replace_all algorithm
+            template< 
+                typename StorageT,
+                typename InputT,
+                typename ForwardIteratorT >
+            inline ForwardIteratorT process_segment(
+                StorageT& Storage,
+                InputT& Input,
+                ForwardIteratorT InsertIt,
+                ForwardIteratorT SegmentBegin,
+                ForwardIteratorT SegmentEnd )
+            {
+                return 
+                    process_segment_helper< 
+                        has_stable_iterators<InputT>::value>()(
+                                Storage, Input, InsertIt, SegmentBegin, SegmentEnd );
+            }
+            
+
+        } // namespace detail
+    } // namespace algorithm
+} // namespace ndnboost
+
+#endif  // BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP
diff --git a/ndnboost/algorithm/string/detail/sequence.hpp b/ndnboost/algorithm/string/detail/sequence.hpp
new file mode 100644
index 0000000..0b39a8b
--- /dev/null
+++ b/ndnboost/algorithm/string/detail/sequence.hpp
@@ -0,0 +1,200 @@
+//  Boost string_algo library sequence.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_DETAIL_SEQUENCE_HPP
+#define BOOST_STRING_DETAIL_SEQUENCE_HPP
+
+#include <ndnboost/algorithm/string/config.hpp>
+#include <ndnboost/mpl/bool.hpp>
+#include <ndnboost/mpl/logical.hpp>
+#include <ndnboost/range/begin.hpp>
+#include <ndnboost/range/end.hpp>
+
+#include <ndnboost/algorithm/string/sequence_traits.hpp>
+
+namespace ndnboost {
+    namespace algorithm {
+        namespace detail {
+
+//  insert helpers  -------------------------------------------------//
+        
+            template< typename InputT, typename ForwardIteratorT >
+            inline void insert(
+                InputT& Input,
+                BOOST_STRING_TYPENAME InputT::iterator At,
+                ForwardIteratorT Begin,
+                ForwardIteratorT End )
+            {
+                Input.insert( At, Begin, End );
+            }
+
+            template< typename InputT, typename InsertT >
+            inline void insert(
+                InputT& Input,
+                BOOST_STRING_TYPENAME InputT::iterator At,
+                const InsertT& Insert )
+            {
+                ::ndnboost::algorithm::detail::insert( Input, At, ::ndnboost::begin(Insert), ::ndnboost::end(Insert) );
+            }
+           
+//  erase helper  ---------------------------------------------------//
+
+            // Erase a range in the sequence
+            /*
+                Returns the iterator pointing just after the erase subrange
+            */
+            template< typename InputT >
+            inline typename InputT::iterator erase(
+                InputT& Input,
+                BOOST_STRING_TYPENAME InputT::iterator From,
+                BOOST_STRING_TYPENAME InputT::iterator To )
+            {
+                return Input.erase( From, To );
+            }
+
+//  replace helper implementation  ----------------------------------//
+
+            // Optimized version of replace for generic sequence containers
+            // Assumption: insert and erase are expensive
+            template< bool HasConstTimeOperations >
+            struct replace_const_time_helper
+            {
+                template< typename InputT, typename ForwardIteratorT >
+                void operator()(
+                    InputT& Input,
+                    BOOST_STRING_TYPENAME InputT::iterator From,
+                    BOOST_STRING_TYPENAME InputT::iterator To,
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End )
+                {
+                    // Copy data to the container ( as much as possible )
+                    ForwardIteratorT InsertIt=Begin;
+                    BOOST_STRING_TYPENAME InputT::iterator InputIt=From;
+                    for(; InsertIt!=End && InputIt!=To; InsertIt++, InputIt++ )
+                    {
+                        *InputIt=*InsertIt;
+                    }
+
+                    if ( InsertIt!=End )
+                    {
+                        // Replace sequence is longer, insert it
+                        Input.insert( InputIt, InsertIt, End );
+                    }
+                    else
+                    {
+                        if ( InputIt!=To )
+                        {
+                            // Replace sequence is shorter, erase the rest
+                            Input.erase( InputIt, To );
+                        }
+                    }
+                }
+            };
+
+            template<>
+            struct replace_const_time_helper< true >
+            {
+                // Const-time erase and insert methods -> use them
+                template< typename InputT, typename ForwardIteratorT >
+                void operator()(
+                    InputT& Input,
+                    BOOST_STRING_TYPENAME InputT::iterator From,
+                    BOOST_STRING_TYPENAME InputT::iterator To,
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End ) 
+                {
+                    BOOST_STRING_TYPENAME InputT::iterator At=Input.erase( From, To );
+                    if ( Begin!=End )
+                    {
+                        if(!Input.empty())
+                        {
+                            Input.insert( At, Begin, End );
+                        }
+                        else
+                        {
+                            Input.insert( Input.begin(), Begin, End );
+                        }
+                    }
+                }
+            };
+
+            // No native replace method
+            template< bool HasNative >
+            struct replace_native_helper
+            {
+                template< typename InputT, typename ForwardIteratorT >
+                void operator()(
+                    InputT& Input,
+                    BOOST_STRING_TYPENAME InputT::iterator From,
+                    BOOST_STRING_TYPENAME InputT::iterator To,
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End ) 
+                {
+                    replace_const_time_helper< 
+                        ndnboost::mpl::and_<
+                            has_const_time_insert<InputT>,
+                            has_const_time_erase<InputT> >::value >()(
+                        Input, From, To, Begin, End );
+                }
+            };
+
+            // Container has native replace method
+            template<>
+            struct replace_native_helper< true >
+            {
+                template< typename InputT, typename ForwardIteratorT >
+                void operator()(
+                    InputT& Input,
+                    BOOST_STRING_TYPENAME InputT::iterator From,
+                    BOOST_STRING_TYPENAME InputT::iterator To,
+                    ForwardIteratorT Begin,
+                    ForwardIteratorT End )
+                {
+                    Input.replace( From, To, Begin, End );
+                }
+            };
+
+//  replace helper  -------------------------------------------------//
+        
+            template< typename InputT, typename ForwardIteratorT >
+            inline void replace(
+                InputT& Input,
+                BOOST_STRING_TYPENAME InputT::iterator From,
+                BOOST_STRING_TYPENAME InputT::iterator To,
+                ForwardIteratorT Begin,
+                ForwardIteratorT End )
+            {
+                replace_native_helper< has_native_replace<InputT>::value >()(
+                    Input, From, To, Begin, End );
+            }
+
+            template< typename InputT, typename InsertT >
+            inline void replace(
+                InputT& Input,
+                BOOST_STRING_TYPENAME InputT::iterator From,
+                BOOST_STRING_TYPENAME InputT::iterator To,
+                const InsertT& Insert )
+            {
+                if(From!=To)
+                {
+                    ::ndnboost::algorithm::detail::replace( Input, From, To, ::ndnboost::begin(Insert), ::ndnboost::end(Insert) );
+                }
+                else
+                {
+                    ::ndnboost::algorithm::detail::insert( Input, From, ::ndnboost::begin(Insert), ::ndnboost::end(Insert) );
+                }
+            }
+
+        } // namespace detail
+    } // namespace algorithm
+} // namespace ndnboost
+
+
+#endif  // BOOST_STRING_DETAIL_SEQUENCE_HPP
diff --git a/ndnboost/algorithm/string/detail/util.hpp b/ndnboost/algorithm/string/detail/util.hpp
new file mode 100644
index 0000000..fa34548
--- /dev/null
+++ b/ndnboost/algorithm/string/detail/util.hpp
@@ -0,0 +1,106 @@
+//  Boost string_algo library util.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_UTIL_DETAIL_HPP
+#define BOOST_STRING_UTIL_DETAIL_HPP
+
+#include <ndnboost/algorithm/string/config.hpp>
+#include <functional>
+#include <ndnboost/range/iterator_range.hpp>
+
+namespace ndnboost {
+    namespace algorithm {
+        namespace detail {
+
+//  empty container  -----------------------------------------------//
+
+            //  empty_container 
+            /*
+                This class represents always empty container,
+                containing elements of type CharT.
+
+                It is supposed to be used in a const version only
+            */
+            template< typename CharT >
+            struct empty_container 
+            {
+                typedef empty_container<CharT> type;        
+                typedef CharT value_type;
+                typedef std::size_t size_type;
+                typedef std::ptrdiff_t difference_type;
+                typedef const value_type& reference;
+                typedef const value_type& const_reference;
+                typedef const value_type* iterator;
+                typedef const value_type* const_iterator;
+
+                
+                // Operations
+                const_iterator begin() const
+                {
+                    return reinterpret_cast<const_iterator>(0);
+                }
+
+                const_iterator end() const
+                {
+                    return reinterpret_cast<const_iterator>(0);
+                }
+
+                bool empty() const
+                {
+                    return false;
+                }
+
+                size_type size() const
+                {
+                    return 0;
+                }
+            };
+    
+//  bounded copy algorithm  -----------------------------------------------//
+
+            // Bounded version of the std::copy algorithm
+            template<typename InputIteratorT, typename OutputIteratorT>
+            inline OutputIteratorT bounded_copy(
+                InputIteratorT First, 
+                InputIteratorT Last, 
+                OutputIteratorT DestFirst,
+                OutputIteratorT DestLast )
+            {
+                InputIteratorT InputIt=First;
+                OutputIteratorT OutputIt=DestFirst;
+                for(; InputIt!=Last && OutputIt!=DestLast; InputIt++, OutputIt++ )
+                {
+                    *OutputIt=*InputIt;
+                }
+
+                return OutputIt;
+            }
+
+//  iterator range utilities -----------------------------------------//
+
+            // copy range functor
+            template< 
+                typename SeqT, 
+                typename IteratorT=BOOST_STRING_TYPENAME SeqT::const_iterator >
+            struct copy_iterator_rangeF : 
+                public std::unary_function< iterator_range<IteratorT>, SeqT >
+            {
+                SeqT operator()( const iterator_range<IteratorT>& Range ) const
+                {
+                    return copy_range<SeqT>(Range);
+                }
+            };
+
+        } // namespace detail
+    } // namespace algorithm
+} // namespace ndnboost
+
+
+#endif  // BOOST_STRING_UTIL_DETAIL_HPP
diff --git a/ndnboost/algorithm/string/find_format.hpp b/ndnboost/algorithm/string/find_format.hpp
new file mode 100644
index 0000000..5352eba
--- /dev/null
+++ b/ndnboost/algorithm/string/find_format.hpp
@@ -0,0 +1,287 @@
+//  Boost string_algo library find_format.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_FIND_FORMAT_HPP
+#define BOOST_STRING_FIND_FORMAT_HPP
+
+#include <deque>
+#include <ndnboost/detail/iterator.hpp>
+#include <ndnboost/range/iterator_range.hpp>
+#include <ndnboost/range/begin.hpp>
+#include <ndnboost/range/end.hpp>
+#include <ndnboost/range/const_iterator.hpp>
+#include <ndnboost/range/as_literal.hpp>
+
+#include <ndnboost/algorithm/string/concept.hpp>
+#include <ndnboost/algorithm/string/detail/find_format.hpp>
+#include <ndnboost/algorithm/string/detail/find_format_all.hpp>
+
+/*! \file
+    Defines generic replace algorithms. Each algorithm replaces
+    part(s) of the input. The part to be replaced is looked up using a Finder object.
+    Result of finding is then used by a Formatter object to generate the replacement.
+*/
+
+namespace ndnboost {
+    namespace algorithm {
+
+// generic replace  -----------------------------------------------------------------//
+
+        //! Generic replace algorithm
+        /*!
+            Use the Finder to search for a substring. Use the Formatter to format
+            this substring and replace it in the input.
+            The result is a modified copy of the input. It is returned as a sequence 
+            or copied to the output iterator.
+    
+            \param Output An output iterator to which the result will be copied
+            \param Input An input sequence
+            \param Finder A Finder object used to search for a match to be replaced
+            \param Formatter A Formatter object used to format a match
+            \return An output iterator pointing just after the last inserted character or
+                a modified copy of the input
+
+            \note The second variant of this function provides the strong exception-safety guarantee
+        */
+        template< 
+            typename OutputIteratorT,
+            typename RangeT,
+            typename FinderT,
+            typename FormatterT>
+        inline OutputIteratorT find_format_copy(
+            OutputIteratorT Output,
+            const RangeT& Input,
+            FinderT Finder,
+            FormatterT Formatter )
+        {
+            // Concept check
+            BOOST_CONCEPT_ASSERT((
+                FinderConcept<
+                    FinderT,
+                    BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type>
+                ));
+            BOOST_CONCEPT_ASSERT((
+                FormatterConcept<
+                    FormatterT,
+                    FinderT,BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type>
+                ));
+
+            iterator_range<BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type> lit_input(::ndnboost::as_literal(Input));
+
+            return detail::find_format_copy_impl(
+                Output,
+                lit_input,
+                Formatter,
+                Finder( ::ndnboost::begin(lit_input), ::ndnboost::end(lit_input) ) );
+        }
+
+        //! Generic replace algorithm
+        /*!
+            \overload
+        */
+        template< 
+            typename SequenceT, 
+            typename FinderT,
+            typename FormatterT>
+        inline SequenceT find_format_copy(
+            const SequenceT& Input,
+            FinderT Finder,
+            FormatterT Formatter )
+        {
+            // Concept check
+            BOOST_CONCEPT_ASSERT((
+                FinderConcept<
+                    FinderT,
+                    BOOST_STRING_TYPENAME range_const_iterator<SequenceT>::type>
+                ));
+            BOOST_CONCEPT_ASSERT((
+                FormatterConcept<
+                    FormatterT,
+                    FinderT,BOOST_STRING_TYPENAME range_const_iterator<SequenceT>::type>
+                ));
+
+            return detail::find_format_copy_impl(
+                Input,
+                Formatter,
+                Finder(::ndnboost::begin(Input), ::ndnboost::end(Input)));
+        }
+
+        //! Generic replace algorithm
+        /*!
+            Use the Finder to search for a substring. Use the Formatter to format
+            this substring and replace it in the input. The input is modified in-place.
+
+            \param Input An input sequence
+            \param Finder A Finder object used to search for a match to be replaced
+            \param Formatter A Formatter object used to format a match
+        */
+        template<
+            typename SequenceT,
+            typename FinderT,
+            typename FormatterT>
+        inline void find_format( 
+            SequenceT& Input,
+            FinderT Finder,
+            FormatterT Formatter)
+        {
+            // Concept check
+            BOOST_CONCEPT_ASSERT((
+                FinderConcept<
+                    FinderT,
+                    BOOST_STRING_TYPENAME range_const_iterator<SequenceT>::type>
+                ));
+            BOOST_CONCEPT_ASSERT(( 
+                FormatterConcept<
+                    FormatterT,
+                    FinderT,BOOST_STRING_TYPENAME range_const_iterator<SequenceT>::type>
+                ));
+
+            detail::find_format_impl(
+                Input,
+                Formatter,
+                Finder(::ndnboost::begin(Input), ::ndnboost::end(Input)));
+        }
+
+
+//  find_format_all generic ----------------------------------------------------------------//
+
+        //! Generic replace all algorithm
+        /*!
+            Use the Finder to search for a substring. Use the Formatter to format
+            this substring and replace it in the input. Repeat this for all matching
+            substrings.
+            The result is a modified copy of the input. It is returned as a sequence 
+            or copied to the output iterator.
+
+            \param Output An output iterator to which the result will be copied
+            \param Input An input sequence
+            \param Finder A Finder object used to search for a match to be replaced
+            \param Formatter A Formatter object used to format a match
+            \return An output iterator pointing just after the last inserted character or
+                a modified copy of the input
+
+             \note The second variant of this function provides the strong exception-safety guarantee
+        */
+        template< 
+            typename OutputIteratorT,
+            typename RangeT,
+            typename FinderT,
+            typename FormatterT>
+        inline OutputIteratorT find_format_all_copy(
+            OutputIteratorT Output,
+            const RangeT& Input,
+            FinderT Finder,
+            FormatterT Formatter)
+        {
+            // Concept check
+            BOOST_CONCEPT_ASSERT(( 
+                FinderConcept<
+                    FinderT,
+                    BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type>
+                ));
+            BOOST_CONCEPT_ASSERT(( 
+                FormatterConcept<
+                    FormatterT,
+                    FinderT,BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type>
+                ));
+
+            iterator_range<BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type> lit_input(::ndnboost::as_literal(Input));
+
+            return detail::find_format_all_copy_impl(
+                Output,
+                lit_input,
+                Finder,
+                Formatter,
+                Finder(::ndnboost::begin(lit_input), ::ndnboost::end(lit_input)));
+        }
+
+        //! Generic replace all algorithm
+        /*!
+            \overload
+        */
+        template< 
+            typename SequenceT, 
+            typename FinderT,
+            typename FormatterT >
+        inline SequenceT find_format_all_copy(
+            const SequenceT& Input,
+            FinderT Finder,
+            FormatterT Formatter )
+        {
+            // Concept check
+            BOOST_CONCEPT_ASSERT((
+                FinderConcept<
+                    FinderT,
+                    BOOST_STRING_TYPENAME range_const_iterator<SequenceT>::type>
+                ));
+            BOOST_CONCEPT_ASSERT((
+                FormatterConcept<
+                    FormatterT,
+                    FinderT,BOOST_STRING_TYPENAME range_const_iterator<SequenceT>::type>
+                ));
+
+            return detail::find_format_all_copy_impl(
+                Input,
+                Finder,
+                Formatter,
+                Finder( ::ndnboost::begin(Input), ::ndnboost::end(Input) ) );
+        }
+
+        //! Generic replace all algorithm
+        /*!
+            Use the Finder to search for a substring. Use the Formatter to format
+            this substring and replace it in the input. Repeat this for all matching
+            substrings.The input is modified in-place.
+
+            \param Input An input sequence
+            \param Finder A Finder object used to search for a match to be replaced
+            \param Formatter A Formatter object used to format a match
+        */
+        template<
+            typename SequenceT,
+            typename FinderT,
+            typename FormatterT >
+        inline void find_format_all( 
+            SequenceT& Input,
+            FinderT Finder,
+            FormatterT Formatter )
+        {
+            // Concept check
+            BOOST_CONCEPT_ASSERT((
+                FinderConcept<
+                    FinderT,
+                    BOOST_STRING_TYPENAME range_const_iterator<SequenceT>::type>
+                ));
+            BOOST_CONCEPT_ASSERT((
+                FormatterConcept<
+                    FormatterT,
+                    FinderT,BOOST_STRING_TYPENAME range_const_iterator<SequenceT>::type>
+                ));
+
+            detail::find_format_all_impl(
+                Input,
+                Finder,
+                Formatter,
+                Finder(::ndnboost::begin(Input), ::ndnboost::end(Input)));
+
+        }
+
+    } // namespace algorithm
+
+    // pull the names to the boost namespace
+    using algorithm::find_format_copy;
+    using algorithm::find_format;
+    using algorithm::find_format_all_copy;
+    using algorithm::find_format_all;
+
+} // namespace ndnboost
+
+
+#endif  // BOOST_STRING_FIND_FORMAT_HPP
diff --git a/ndnboost/algorithm/string/finder.hpp b/ndnboost/algorithm/string/finder.hpp
new file mode 100644
index 0000000..420e015
--- /dev/null
+++ b/ndnboost/algorithm/string/finder.hpp
@@ -0,0 +1,270 @@
+//  Boost string_algo library finder.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2006.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_FINDER_HPP
+#define BOOST_STRING_FINDER_HPP
+
+#include <ndnboost/algorithm/string/config.hpp>
+
+#include <ndnboost/range/iterator_range.hpp>
+#include <ndnboost/range/begin.hpp>
+#include <ndnboost/range/end.hpp>
+#include <ndnboost/range/iterator.hpp>
+#include <ndnboost/range/const_iterator.hpp>
+
+#include <ndnboost/algorithm/string/constants.hpp>
+#include <ndnboost/algorithm/string/detail/finder.hpp>
+#include <ndnboost/algorithm/string/compare.hpp>
+
+/*! \file
+    Defines Finder generators. Finder object is a functor which is able to 
+    find a substring matching a specific criteria in the input.
+    Finders are used as a pluggable components for replace, find 
+    and split facilities. This header contains generator functions 
+    for finders provided in this library.
+*/
+
+namespace ndnboost {
+    namespace algorithm {
+
+//  Finder generators ------------------------------------------//
+        
+        //! "First" finder 
+        /*!
+            Construct the \c first_finder. The finder searches for the first
+            occurrence of the string in a given input.
+            The result is given as an \c iterator_range delimiting the match.
+
+            \param Search A substring to be searched for.
+            \param Comp An element comparison predicate
+            \return An instance of the \c first_finder object
+        */
+        template<typename RangeT>
+        inline detail::first_finderF<
+            BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type,
+            is_equal>
+        first_finder( const RangeT& Search )
+        {
+            return 
+                detail::first_finderF<
+                    BOOST_STRING_TYPENAME 
+                        range_const_iterator<RangeT>::type,
+                        is_equal>( ::ndnboost::as_literal(Search), is_equal() ) ;
+        }
+
+        //! "First" finder
+        /*!
+            \overload
+        */
+        template<typename RangeT,typename PredicateT>
+        inline detail::first_finderF<
+            BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type,
+            PredicateT>
+        first_finder( 
+            const RangeT& Search, PredicateT Comp )
+        {
+            return 
+                detail::first_finderF<
+                    BOOST_STRING_TYPENAME 
+                        range_const_iterator<RangeT>::type,
+                    PredicateT>( ::ndnboost::as_literal(Search), Comp );
+        }
+
+        //! "Last" finder
+        /*!
+            Construct the \c last_finder. The finder searches for the last
+            occurrence of the string in a given input.
+            The result is given as an \c iterator_range delimiting the match.
+
+            \param Search A substring to be searched for.
+            \param Comp An element comparison predicate
+            \return An instance of the \c last_finder object
+        */
+        template<typename RangeT>
+        inline detail::last_finderF<
+            BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type,
+            is_equal>
+        last_finder( const RangeT& Search )
+        {
+            return 
+                detail::last_finderF<
+                    BOOST_STRING_TYPENAME 
+                        range_const_iterator<RangeT>::type,
+                    is_equal>( ::ndnboost::as_literal(Search), is_equal() );
+        }
+        //! "Last" finder
+        /*!
+            \overload
+        */
+        template<typename RangeT, typename PredicateT>
+        inline detail::last_finderF<
+            BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type,
+            PredicateT>
+        last_finder( const RangeT& Search, PredicateT Comp )
+        {
+            return 
+                detail::last_finderF<
+                    BOOST_STRING_TYPENAME 
+                        range_const_iterator<RangeT>::type,
+                    PredicateT>( ::ndnboost::as_literal(Search), Comp ) ;
+        }
+
+        //! "Nth" finder
+        /*!
+            Construct the \c nth_finder. The finder searches for the n-th (zero-indexed)
+            occurrence of the string in a given input.
+            The result is given as an \c iterator_range delimiting the match.
+
+            \param Search A substring to be searched for.
+            \param Nth An index of the match to be find
+            \param Comp An element comparison predicate
+            \return An instance of the \c nth_finder object
+        */
+        template<typename RangeT>
+        inline detail::nth_finderF<
+            BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type,
+            is_equal>
+        nth_finder( 
+            const RangeT& Search, 
+            int Nth)
+        {
+            return 
+                detail::nth_finderF<
+                    BOOST_STRING_TYPENAME 
+                        range_const_iterator<RangeT>::type,
+                    is_equal>( ::ndnboost::as_literal(Search), Nth, is_equal() ) ;
+        }
+        //! "Nth" finder
+        /*!
+            \overload
+        */
+        template<typename RangeT, typename PredicateT>
+        inline detail::nth_finderF<
+            BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type,
+            PredicateT>
+        nth_finder( 
+            const RangeT& Search, 
+            int Nth, 
+            PredicateT Comp )
+        {
+            return 
+                detail::nth_finderF<
+                    BOOST_STRING_TYPENAME 
+                        range_const_iterator<RangeT>::type,
+                    PredicateT>( ::ndnboost::as_literal(Search), Nth, Comp );
+        }
+
+        //! "Head" finder
+        /*!
+            Construct the \c head_finder. The finder returns a head of a given
+            input. The head is a prefix of a string up to n elements in
+            size. If an input has less then n elements, whole input is 
+            considered a head.
+            The result is given as an \c iterator_range delimiting the match.
+
+            \param N The size of the head
+            \return An instance of the \c head_finder object
+        */
+        inline detail::head_finderF
+        head_finder( int N )
+        {
+            return detail::head_finderF(N);
+        }
+        
+        //! "Tail" finder
+        /*!
+            Construct the \c tail_finder. The finder returns a tail of a given
+            input. The tail is a suffix of a string up to n elements in
+            size. If an input has less then n elements, whole input is 
+            considered a head.
+            The result is given as an \c iterator_range delimiting the match.
+
+            \param N The size of the head
+            \return An instance of the \c tail_finder object
+        */
+        inline detail::tail_finderF
+        tail_finder( int N )
+        {
+            return detail::tail_finderF(N);
+        }
+
+        //! "Token" finder
+        /*!
+            Construct the \c token_finder. The finder searches for a token 
+            specified by a predicate. It is similar to std::find_if 
+            algorithm, with an exception that it return a range of
+            instead of a single iterator.
+
+            If "compress token mode" is enabled, adjacent matching tokens are 
+            concatenated into one match. Thus the finder can be used to 
+            search for continuous segments of characters satisfying the 
+            given predicate.
+
+            The result is given as an \c iterator_range delimiting the match.
+
+            \param Pred An element selection predicate
+            \param eCompress Compress flag
+            \return An instance of the \c token_finder object
+        */
+        template< typename PredicateT >
+        inline detail::token_finderF<PredicateT>
+        token_finder( 
+            PredicateT Pred, 
+            token_compress_mode_type eCompress=token_compress_off )
+        {
+            return detail::token_finderF<PredicateT>( Pred, eCompress );
+        }
+
+        //! "Range" finder
+        /*!
+            Construct the \c range_finder. The finder does not perform 
+            any operation. It simply returns the given range for 
+            any input. 
+
+            \param Begin Beginning of the range
+            \param End End of the range
+            \param Range The range.
+            \return An instance of the \c range_finger object
+        */
+        template< typename ForwardIteratorT >
+        inline detail::range_finderF<ForwardIteratorT>
+        range_finder(
+            ForwardIteratorT Begin,
+            ForwardIteratorT End )
+        {
+            return detail::range_finderF<ForwardIteratorT>( Begin, End );
+        }
+
+        //! "Range" finder
+        /*!       
+            \overload
+        */
+        template< typename ForwardIteratorT >
+        inline detail::range_finderF<ForwardIteratorT>
+        range_finder( iterator_range<ForwardIteratorT> Range )
+        {
+            return detail::range_finderF<ForwardIteratorT>( Range );
+        }
+
+    } // namespace algorithm
+
+    // pull the names to the boost namespace
+    using algorithm::first_finder;
+    using algorithm::last_finder;
+    using algorithm::nth_finder;
+    using algorithm::head_finder;
+    using algorithm::tail_finder;
+    using algorithm::token_finder;
+    using algorithm::range_finder;
+
+} // namespace ndnboost
+
+
+#endif  // BOOST_STRING_FINDER_HPP
diff --git a/ndnboost/algorithm/string/formatter.hpp b/ndnboost/algorithm/string/formatter.hpp
new file mode 100644
index 0000000..5739b40
--- /dev/null
+++ b/ndnboost/algorithm/string/formatter.hpp
@@ -0,0 +1,120 @@
+//  Boost string_algo library formatter.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_FORMATTER_HPP
+#define BOOST_STRING_FORMATTER_HPP
+
+#include <ndnboost/detail/iterator.hpp>
+#include <ndnboost/range/value_type.hpp>
+#include <ndnboost/range/iterator_range.hpp>
+#include <ndnboost/range/as_literal.hpp>
+
+#include <ndnboost/algorithm/string/detail/formatter.hpp>
+
+/*! \file
+    Defines Formatter generators. Formatter is a functor which formats
+    a string according to given parameters. A Formatter works
+    in conjunction with a Finder. A Finder can provide additional information
+    for a specific Formatter. An example of such a cooperation is regex_finder
+    and regex_formatter.
+
+    Formatters are used as pluggable components for replace facilities. 
+    This header contains generator functions for the Formatters provided in this library.
+*/
+
+namespace ndnboost {
+    namespace algorithm {
+
+// generic formatters  ---------------------------------------------------------------//
+
+        //! Constant formatter
+        /*!
+            Constructs a \c const_formatter. Const formatter always returns
+            the same value, regardless of the parameter.
+
+            \param Format A predefined value used as a result for formatting
+            \return An instance of the \c const_formatter object.
+        */
+        template<typename RangeT>
+        inline detail::const_formatF<
+            iterator_range<
+                BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type> >
+        const_formatter(const RangeT& Format)
+        {
+            return detail::const_formatF<
+                iterator_range<
+                    BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type> >(::ndnboost::as_literal(Format));
+        }
+
+        //! Identity formatter
+        /*!
+            Constructs an \c identity_formatter. Identity formatter always returns
+            the parameter.
+
+            \return An instance of the \c identity_formatter object.
+        */
+        template<typename RangeT>
+        inline detail::identity_formatF<
+            iterator_range<
+                BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type> >
+        identity_formatter()
+        {
+            return detail::identity_formatF<
+                iterator_range<
+                    BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type> >();
+        }
+
+        //! Empty formatter
+        /*!
+            Constructs an \c empty_formatter. Empty formatter always returns an empty
+            sequence. 
+
+            \param Input container used to select a correct value_type for the
+                         resulting empty_container<>.
+            \return An instance of the \c empty_formatter object.
+        */
+        template<typename RangeT>
+        inline detail::empty_formatF< 
+            BOOST_STRING_TYPENAME range_value<RangeT>::type>
+        empty_formatter(const RangeT&)
+        {
+            return detail::empty_formatF<
+                BOOST_STRING_TYPENAME range_value<RangeT>::type>();
+        }
+
+        //! Empty formatter
+        /*!
+            Constructs a \c dissect_formatter. Dissect formatter uses a specified finder
+            to extract a portion of the formatted sequence. The first finder's match is returned 
+            as a result
+
+            \param Finder a finder used to select a portion of the formatted sequence
+            \return An instance of the \c dissect_formatter object.
+        */
+        template<typename FinderT>
+        inline detail::dissect_formatF< FinderT >
+        dissect_formatter(const FinderT& Finder)
+        {
+            return detail::dissect_formatF<FinderT>(Finder);
+        }
+
+
+    } // namespace algorithm
+
+    // pull the names to the boost namespace
+    using algorithm::const_formatter;
+    using algorithm::identity_formatter;
+    using algorithm::empty_formatter;
+    using algorithm::dissect_formatter;
+
+} // namespace ndnboost
+
+
+#endif  // BOOST_FORMATTER_HPP
diff --git a/ndnboost/algorithm/string/replace.hpp b/ndnboost/algorithm/string/replace.hpp
new file mode 100644
index 0000000..11afce4
--- /dev/null
+++ b/ndnboost/algorithm/string/replace.hpp
@@ -0,0 +1,928 @@
+//  Boost string_algo library replace.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2006.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_REPLACE_HPP
+#define BOOST_STRING_REPLACE_HPP
+
+#include <ndnboost/algorithm/string/config.hpp>
+
+#include <ndnboost/range/iterator_range.hpp>
+#include <ndnboost/range/begin.hpp>
+#include <ndnboost/range/end.hpp>
+#include <ndnboost/range/iterator.hpp>
+#include <ndnboost/range/const_iterator.hpp>
+
+#include <ndnboost/algorithm/string/find_format.hpp>
+#include <ndnboost/algorithm/string/finder.hpp>
+#include <ndnboost/algorithm/string/formatter.hpp>
+#include <ndnboost/algorithm/string/compare.hpp>
+
+/*! \file
+    Defines various replace algorithms. Each algorithm replaces
+    part(s) of the input according to set of searching and replace criteria.
+*/
+
+namespace ndnboost {
+    namespace algorithm {
+
+//  replace_range --------------------------------------------------------------------//
+
+        //! Replace range algorithm
+        /*!
+            Replace the given range in the input string.
+            The result is a modified copy of the input. It is returned as a sequence 
+            or copied to the output iterator.
+            
+            \param Output An output iterator to which the result will be copied
+            \param Input An input string
+            \param SearchRange A range in the input to be substituted
+            \param Format A substitute string
+            \return An output iterator pointing just after the last inserted character or
+                a modified copy of the input
+
+              \note The second variant of this function provides the strong exception-safety guarantee
+        */
+        template<
+            typename OutputIteratorT,
+            typename Range1T, 
+            typename Range2T>
+        inline OutputIteratorT replace_range_copy(
+            OutputIteratorT Output,
+            const Range1T& Input,
+            const iterator_range<
+                BOOST_STRING_TYPENAME 
+                    range_const_iterator<Range1T>::type>& SearchRange,
+            const Range2T& Format)
+        {
+            return ::ndnboost::algorithm::find_format_copy(
+                Output,
+                Input,
+                ::ndnboost::algorithm::range_finder(SearchRange),
+                ::ndnboost::algorithm::const_formatter(Format));
+        }
+
+        //! Replace range algorithm
+        /*!
+            \overload
+        */
+        template<typename SequenceT, typename RangeT>
+        inline SequenceT replace_range_copy( 
+            const SequenceT& Input,
+            const iterator_range<
+                BOOST_STRING_TYPENAME 
+                    range_const_iterator<SequenceT>::type>& SearchRange,
+            const RangeT& Format)
+        {
+            return ::ndnboost::algorithm::find_format_copy(
+                Input,
+                ::ndnboost::algorithm::range_finder(SearchRange),
+                ::ndnboost::algorithm::const_formatter(Format));
+        }
+
+        //! Replace range algorithm
+        /*!
+            Replace the given range in the input string. 
+            The input sequence is modified in-place.
+
+            \param Input An input string
+            \param SearchRange A range in the input to be substituted
+            \param Format A substitute string
+        */
+        template<typename SequenceT, typename RangeT>
+        inline void replace_range( 
+            SequenceT& Input,
+            const iterator_range<
+                BOOST_STRING_TYPENAME 
+                    range_iterator<SequenceT>::type>& SearchRange,
+            const RangeT& Format)
+        {
+            ::ndnboost::algorithm::find_format(
+                Input,
+                ::ndnboost::algorithm::range_finder(SearchRange),
+                ::ndnboost::algorithm::const_formatter(Format));
+        }
+
+//  replace_first --------------------------------------------------------------------//
+
+        //! Replace first algorithm
+        /*!
+            Replace the first match of the search substring in the input 
+            with the format string. 
+            The result is a modified copy of the input. It is returned as a sequence 
+            or copied to the output iterator.
+            
+            \param Output An output iterator to which the result will be copied
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Format A substitute string
+            \return An output iterator pointing just after the last inserted character or
+                    a modified copy of the input
+
+              \note The second variant of this function provides the strong exception-safety guarantee
+        */
+        template<
+            typename OutputIteratorT,
+            typename Range1T, 
+            typename Range2T,
+            typename Range3T>
+        inline OutputIteratorT replace_first_copy(
+            OutputIteratorT Output,
+            const Range1T& Input,
+            const Range2T& Search,
+            const Range3T& Format)
+        {
+            return ::ndnboost::algorithm::find_format_copy(
+                Output,
+                Input,
+                ::ndnboost::algorithm::first_finder(Search),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace first algorithm
+        /*!
+            \overload
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline SequenceT replace_first_copy( 
+            const SequenceT& Input,
+            const Range1T& Search,
+            const Range2T& Format )
+        {
+            return ::ndnboost::algorithm::find_format_copy( 
+                Input,
+                ::ndnboost::algorithm::first_finder(Search),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace first algorithm
+        /*!
+            replace the first match of the search substring in the input 
+            with the format string. The input sequence is modified in-place.
+
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Format A substitute string
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline void replace_first( 
+            SequenceT& Input,
+            const Range1T& Search,
+            const Range2T& Format )
+        {
+            ::ndnboost::algorithm::find_format( 
+                Input, 
+                ::ndnboost::algorithm::first_finder(Search),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+//  replace_first ( case insensitive ) ---------------------------------------------//
+
+        //! Replace first algorithm ( case insensitive )
+        /*!
+            Replace the first match of the search substring in the input 
+            with the format string. 
+            The result is a modified copy of the input. It is returned as a sequence 
+            or copied to the output iterator.
+            Searching is case insensitive.
+
+            \param Output An output iterator to which the result will be copied
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Format A substitute string
+            \param Loc A locale used for case insensitive comparison
+            \return An output iterator pointing just after the last inserted character or
+                a modified copy of the input
+
+             \note The second variant of this function provides the strong exception-safety guarantee
+        */
+        template<
+            typename OutputIteratorT,
+            typename Range1T, 
+            typename Range2T,
+            typename Range3T>
+        inline OutputIteratorT ireplace_first_copy(
+            OutputIteratorT Output,
+            const Range1T& Input,
+            const Range2T& Search,
+            const Range3T& Format,
+            const std::locale& Loc=std::locale() )
+        {
+            return ::ndnboost::algorithm::find_format_copy(
+                Output,
+                Input,
+                ::ndnboost::algorithm::first_finder(Search, is_iequal(Loc)),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace first algorithm ( case insensitive )
+        /*!
+            \overload
+        */
+        template<typename SequenceT, typename Range2T, typename Range1T>
+        inline SequenceT ireplace_first_copy( 
+            const SequenceT& Input,
+            const Range2T& Search,
+            const Range1T& Format,
+            const std::locale& Loc=std::locale() )
+        {
+            return ::ndnboost::algorithm::find_format_copy( 
+                Input,
+                ::ndnboost::algorithm::first_finder(Search, is_iequal(Loc)),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace first algorithm ( case insensitive )
+        /*!
+            Replace the first match of the search substring in the input 
+            with the format string. Input sequence is modified in-place.
+            Searching is case insensitive.
+
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Format A substitute string
+            \param Loc A locale used for case insensitive comparison
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline void ireplace_first( 
+            SequenceT& Input,
+            const Range1T& Search,
+            const Range2T& Format,
+            const std::locale& Loc=std::locale() )
+        {
+            ::ndnboost::algorithm::find_format( 
+                Input, 
+                ::ndnboost::algorithm::first_finder(Search, is_iequal(Loc)),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+//  replace_last --------------------------------------------------------------------//
+
+        //! Replace last algorithm
+        /*!
+            Replace the last match of the search string in the input 
+            with the format string. 
+            The result is a modified copy of the input. It is returned as a sequence 
+            or copied to the output iterator.
+
+            \param Output An output iterator to which the result will be copied
+            \param Input An input string
+            \param Search A substring to be searched for
+            \param Format A substitute string
+            \return An output iterator pointing just after the last inserted character or
+                    a modified copy of the input            
+
+              \note The second variant of this function provides the strong exception-safety guarantee
+        */
+        template<
+            typename OutputIteratorT,
+            typename Range1T, 
+            typename Range2T,
+            typename Range3T>
+        inline OutputIteratorT replace_last_copy(
+            OutputIteratorT Output,
+            const Range1T& Input,
+            const Range2T& Search,
+            const Range3T& Format )
+        {
+            return ::ndnboost::algorithm::find_format_copy(
+                Output,
+                Input,
+                ::ndnboost::algorithm::last_finder(Search),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace last algorithm
+        /*!
+            \overload
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline SequenceT replace_last_copy( 
+            const SequenceT& Input,
+            const Range1T& Search,
+            const Range2T& Format )
+        {
+            return ::ndnboost::algorithm::find_format_copy( 
+                Input,
+                ::ndnboost::algorithm::last_finder(Search),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace last algorithm
+        /*!
+            Replace the last match of the search string in the input 
+            with the format string. Input sequence is modified in-place.
+
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Format A substitute string
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline void replace_last( 
+            SequenceT& Input,
+            const Range1T& Search,
+            const Range2T& Format )
+        {
+            ::ndnboost::algorithm::find_format( 
+                Input, 
+                ::ndnboost::algorithm::last_finder(Search),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+//  replace_last ( case insensitive ) -----------------------------------------------//
+
+        //! Replace last algorithm ( case insensitive )
+        /*!
+            Replace the last match of the search string in the input 
+            with the format string. 
+            The result is a modified copy of the input. It is returned as a sequence 
+            or copied to the output iterator.
+            Searching is case insensitive.
+
+            \param Output An output iterator to which the result will be copied
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Format A substitute string
+            \param Loc A locale used for case insensitive comparison
+            \return An output iterator pointing just after the last inserted character or
+                    a modified copy of the input  
+
+            \note The second variant of this function provides the strong exception-safety guarantee
+        */
+        template<
+            typename OutputIteratorT,
+            typename Range1T, 
+            typename Range2T,
+            typename Range3T>
+        inline OutputIteratorT ireplace_last_copy(
+            OutputIteratorT Output,
+            const Range1T& Input,
+            const Range2T& Search,
+            const Range3T& Format,
+            const std::locale& Loc=std::locale() )
+        {
+            return ::ndnboost::algorithm::find_format_copy(
+                Output,
+                Input,
+                ::ndnboost::algorithm::last_finder(Search, is_iequal(Loc)),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace last algorithm ( case insensitive )
+        /*!
+            \overload
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline SequenceT ireplace_last_copy( 
+            const SequenceT& Input,
+            const Range1T& Search,
+            const Range2T& Format,
+            const std::locale& Loc=std::locale() )
+        {
+            return ::ndnboost::algorithm::find_format_copy( 
+                Input,
+                ::ndnboost::algorithm::last_finder(Search, is_iequal(Loc)),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace last algorithm ( case insensitive )
+        /*!
+            Replace the last match of the search string in the input 
+            with the format string.The input sequence is modified in-place.
+            Searching is case insensitive.
+
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Format A substitute string
+            \param Loc A locale used for case insensitive comparison
+            \return A reference to the modified input
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline void ireplace_last( 
+            SequenceT& Input,
+            const Range1T& Search,
+            const Range2T& Format,
+            const std::locale& Loc=std::locale() )
+        {
+            ::ndnboost::algorithm::find_format( 
+                Input, 
+                ::ndnboost::algorithm::last_finder(Search, is_iequal(Loc)),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+//  replace_nth --------------------------------------------------------------------//
+
+        //! Replace nth algorithm
+        /*!
+            Replace an Nth (zero-indexed) match of the search string in the input 
+            with the format string. 
+            The result is a modified copy of the input. It is returned as a sequence 
+            or copied to the output iterator.
+
+            \param Output An output iterator to which the result will be copied
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Nth An index of the match to be replaced. The index is 0-based.
+                For negative N, matches are counted from the end of string.
+            \param Format A substitute string
+            \return An output iterator pointing just after the last inserted character or
+                a modified copy of the input
+
+            \note The second variant of this function provides the strong exception-safety guarantee
+        */
+        template<
+            typename OutputIteratorT,
+            typename Range1T, 
+            typename Range2T,
+            typename Range3T>
+        inline OutputIteratorT replace_nth_copy(
+            OutputIteratorT Output,
+            const Range1T& Input,
+            const Range2T& Search,
+            int Nth,
+            const Range3T& Format )
+        {
+            return ::ndnboost::algorithm::find_format_copy(
+                Output,
+                Input,
+                ::ndnboost::algorithm::nth_finder(Search, Nth),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace nth algorithm
+        /*!
+            \overload
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline SequenceT replace_nth_copy( 
+            const SequenceT& Input,
+            const Range1T& Search,
+            int Nth,
+            const Range2T& Format )
+        {
+            return ::ndnboost::algorithm::find_format_copy( 
+                Input,
+                ::ndnboost::algorithm::nth_finder(Search, Nth),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace nth algorithm
+        /*!
+            Replace an Nth (zero-indexed) match of the search string in the input 
+            with the format string. Input sequence is modified in-place.
+
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Nth An index of the match to be replaced. The index is 0-based.
+                For negative N, matches are counted from the end of string.
+            \param Format A substitute string
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline void replace_nth( 
+            SequenceT& Input,
+            const Range1T& Search,
+            int Nth,
+            const Range2T& Format )
+        {
+            ::ndnboost::algorithm::find_format( 
+                Input, 
+                ::ndnboost::algorithm::nth_finder(Search, Nth),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+//  replace_nth ( case insensitive ) -----------------------------------------------//
+        
+        //! Replace nth algorithm ( case insensitive )
+        /*!
+            Replace an Nth (zero-indexed) match of the search string in the input 
+            with the format string. 
+            The result is a modified copy of the input. It is returned as a sequence 
+            or copied to the output iterator.
+            Searching is case insensitive.
+
+            \param Output An output iterator to which the result will be copied
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Nth An index of the match to be replaced. The index is 0-based.
+                For negative N, matches are counted from the end of string.
+            \param Format A substitute string
+            \param Loc A locale used for case insensitive comparison
+            \return An output iterator pointing just after the last inserted character or
+                    a modified copy of the input            
+
+            \note The second variant of this function provides the strong exception-safety guarantee
+       */
+        template<
+            typename OutputIteratorT,
+            typename Range1T, 
+            typename Range2T,
+            typename Range3T>
+        inline OutputIteratorT ireplace_nth_copy(
+            OutputIteratorT Output,
+            const Range1T& Input,
+            const Range2T& Search,
+            int Nth,
+            const Range3T& Format,
+            const std::locale& Loc=std::locale() )
+        {
+            return ::ndnboost::algorithm::find_format_copy(
+                Output,
+                Input,
+                ::ndnboost::algorithm::nth_finder(Search, Nth, is_iequal(Loc) ),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace nth algorithm ( case insensitive )
+        /*!
+            \overload
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline SequenceT ireplace_nth_copy( 
+            const SequenceT& Input,
+            const Range1T& Search,
+            int Nth,
+            const Range2T& Format,
+            const std::locale& Loc=std::locale() )
+        {
+            return ::ndnboost::algorithm::find_format_copy( 
+                Input,
+                ::ndnboost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace nth algorithm ( case insensitive )
+        /*!
+            Replace an Nth (zero-indexed) match of the search string in the input 
+            with the format string. Input sequence is modified in-place.
+            Searching is case insensitive.
+
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Nth An index of the match to be replaced. The index is 0-based.
+                For negative N, matches are counted from the end of string.
+            \param Format A substitute string
+            \param Loc A locale used for case insensitive comparison
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline void ireplace_nth( 
+            SequenceT& Input,
+            const Range1T& Search,
+            int Nth,
+            const Range2T& Format,
+            const std::locale& Loc=std::locale() )
+        {
+            ::ndnboost::algorithm::find_format( 
+                Input, 
+                ::ndnboost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+//  replace_all --------------------------------------------------------------------//
+
+        //! Replace all algorithm
+        /*!
+            Replace all occurrences of the search string in the input 
+            with the format string. 
+            The result is a modified copy of the input. It is returned as a sequence 
+            or copied to the output iterator.
+
+            \param Output An output iterator to which the result will be copied
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Format A substitute string
+            \return An output iterator pointing just after the last inserted character or
+                    a modified copy of the input 
+
+             \note The second variant of this function provides the strong exception-safety guarantee
+        */
+        template<
+            typename OutputIteratorT,
+            typename Range1T, 
+            typename Range2T,
+            typename Range3T>
+        inline OutputIteratorT replace_all_copy(
+            OutputIteratorT Output,
+            const Range1T& Input,
+            const Range2T& Search,
+            const Range3T& Format )
+        {
+            return ::ndnboost::algorithm::find_format_all_copy(
+                Output,
+                Input,
+                ::ndnboost::algorithm::first_finder(Search),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace all algorithm
+        /*!
+            \overload
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline SequenceT replace_all_copy( 
+            const SequenceT& Input,
+            const Range1T& Search,
+            const Range2T& Format )
+        {
+            return ::ndnboost::algorithm::find_format_all_copy( 
+                Input,
+                ::ndnboost::algorithm::first_finder(Search),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace all algorithm
+        /*!
+            Replace all occurrences of the search string in the input 
+            with the format string. The input sequence is modified in-place.
+
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Format A substitute string
+            \return A reference to the modified input
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline void replace_all( 
+            SequenceT& Input,
+            const Range1T& Search,
+            const Range2T& Format )
+        {
+            ::ndnboost::algorithm::find_format_all( 
+                Input, 
+                ::ndnboost::algorithm::first_finder(Search),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+        
+//  replace_all ( case insensitive ) -----------------------------------------------//
+
+        //! Replace all algorithm ( case insensitive )
+        /*!
+            Replace all occurrences of the search string in the input 
+            with the format string. 
+            The result is a modified copy of the input. It is returned as a sequence 
+            or copied to the output iterator.
+            Searching is case insensitive.
+
+            \param Output An output iterator to which the result will be copied
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Format A substitute string
+            \param Loc A locale used for case insensitive comparison
+            \return An output iterator pointing just after the last inserted character or
+                    a modified copy of the input 
+
+            \note The second variant of this function provides the strong exception-safety guarantee
+        */
+        template<
+            typename OutputIteratorT,
+            typename Range1T, 
+            typename Range2T,
+            typename Range3T>
+        inline OutputIteratorT ireplace_all_copy(
+            OutputIteratorT Output,
+            const Range1T& Input,
+            const Range2T& Search,
+            const Range3T& Format,
+            const std::locale& Loc=std::locale() )
+        {
+            return ::ndnboost::algorithm::find_format_all_copy(
+                Output,
+                Input,
+                ::ndnboost::algorithm::first_finder(Search, is_iequal(Loc)),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace all algorithm ( case insensitive )
+        /*!
+            \overload
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline SequenceT ireplace_all_copy( 
+            const SequenceT& Input,
+            const Range1T& Search,
+            const Range2T& Format,
+            const std::locale& Loc=std::locale() )
+        {
+            return ::ndnboost::algorithm::find_format_all_copy( 
+                Input,
+                ::ndnboost::algorithm::first_finder(Search, is_iequal(Loc)),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace all algorithm ( case insensitive )
+        /*!
+            Replace all occurrences of the search string in the input 
+            with the format string.The input sequence is modified in-place.
+            Searching is case insensitive.
+
+            \param Input An input string
+            \param Search A substring to be searched for 
+            \param Format A substitute string
+            \param Loc A locale used for case insensitive comparison
+        */
+        template<typename SequenceT, typename Range1T, typename Range2T>
+        inline void ireplace_all( 
+            SequenceT& Input,
+            const Range1T& Search,
+            const Range2T& Format,
+            const std::locale& Loc=std::locale() )
+        {
+            ::ndnboost::algorithm::find_format_all( 
+                Input, 
+                ::ndnboost::algorithm::first_finder(Search, is_iequal(Loc)),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+        
+//  replace_head --------------------------------------------------------------------//
+
+        //! Replace head algorithm
+        /*!
+            Replace the head of the input with the given format string. 
+            The head is a prefix of a string of given size. 
+            If the sequence is shorter then required, whole string if 
+            considered to be the head. 
+            The result is a modified copy of the input. It is returned as a sequence 
+            or copied to the output iterator.
+            
+            \param Output An output iterator to which the result will be copied
+            \param Input An input string
+            \param N Length of the head.
+                For N>=0, at most N characters are extracted.
+                For N<0, size(Input)-|N| characters are extracted.
+            \param Format A substitute string
+            \return An output iterator pointing just after the last inserted character or
+                a modified copy of the input  
+
+            \note The second variant of this function provides the strong exception-safety guarantee
+        */
+        template<
+            typename OutputIteratorT,
+            typename Range1T, 
+            typename Range2T>
+        inline OutputIteratorT replace_head_copy(
+            OutputIteratorT Output,
+            const Range1T& Input,
+            int N,
+            const Range2T& Format )
+        {
+            return ::ndnboost::algorithm::find_format_copy(
+                Output,
+                Input,
+                ::ndnboost::algorithm::head_finder(N),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace head algorithm
+        /*!
+            \overload
+        */
+        template<typename SequenceT, typename RangeT>
+        inline SequenceT replace_head_copy( 
+            const SequenceT& Input,
+            int N,
+            const RangeT& Format )
+        {
+            return ::ndnboost::algorithm::find_format_copy( 
+                Input,
+                ::ndnboost::algorithm::head_finder(N),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace head algorithm
+        /*!
+            Replace the head of the input with the given format string. 
+            The head is a prefix of a string of given size. 
+            If the sequence is shorter then required, the whole string is 
+            considered to be the head. The input sequence is modified in-place.
+
+            \param Input An input string
+            \param N Length of the head.
+                For N>=0, at most N characters are extracted.
+                For N<0, size(Input)-|N| characters are extracted.
+            \param Format A substitute string
+        */
+        template<typename SequenceT, typename RangeT>
+        inline void replace_head( 
+            SequenceT& Input,
+            int N,
+            const RangeT& Format )
+        {
+            ::ndnboost::algorithm::find_format( 
+                Input, 
+                ::ndnboost::algorithm::head_finder(N),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+//  replace_tail --------------------------------------------------------------------//
+
+        //! Replace tail algorithm
+        /*!
+            Replace the tail of the input with the given format string. 
+            The tail is a suffix of a string of given size. 
+            If the sequence is shorter then required, whole string is 
+            considered to be the tail. 
+            The result is a modified copy of the input. It is returned as a sequence 
+            or copied to the output iterator.
+
+            \param Output An output iterator to which the result will be copied
+            \param Input An input string
+            \param N Length of the tail.
+                For N>=0, at most N characters are extracted.
+                For N<0, size(Input)-|N| characters are extracted.
+            \param Format A substitute string
+            \return An output iterator pointing just after the last inserted character or
+                    a modified copy of the input   
+
+              \note The second variant of this function provides the strong exception-safety guarantee
+        */
+        template<
+            typename OutputIteratorT,
+            typename Range1T, 
+            typename Range2T>
+        inline OutputIteratorT replace_tail_copy(
+            OutputIteratorT Output,
+            const Range1T& Input,
+            int N,
+            const Range2T& Format )
+        {
+            return ::ndnboost::algorithm::find_format_copy(
+                Output,
+                Input,
+                ::ndnboost::algorithm::tail_finder(N),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace tail algorithm
+        /*!
+            \overload
+        */
+        template<typename SequenceT, typename RangeT>
+        inline SequenceT replace_tail_copy( 
+            const SequenceT& Input,
+            int N,
+            const RangeT& Format )
+        {
+            return ::ndnboost::algorithm::find_format_copy( 
+                Input,
+                ::ndnboost::algorithm::tail_finder(N),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+        //! Replace tail algorithm
+        /*!
+            Replace the tail of the input with the given format sequence. 
+            The tail is a suffix of a string of given size. 
+            If the sequence is shorter then required, the whole string is 
+            considered to be the tail. The input sequence is modified in-place.
+
+            \param Input An input string
+            \param N Length of the tail.
+                For N>=0, at most N characters are extracted.
+                For N<0, size(Input)-|N| characters are extracted.
+            \param Format A substitute string
+        */
+        template<typename SequenceT, typename RangeT>
+        inline void replace_tail( 
+            SequenceT& Input,
+            int N,
+            const RangeT& Format )
+        {
+            ::ndnboost::algorithm::find_format( 
+                Input, 
+                ::ndnboost::algorithm::tail_finder(N),
+                ::ndnboost::algorithm::const_formatter(Format) );
+        }
+
+    } // namespace algorithm
+
+    // pull names to the boost namespace
+    using algorithm::replace_range_copy;
+    using algorithm::replace_range;
+    using algorithm::replace_first_copy;
+    using algorithm::replace_first;
+    using algorithm::ireplace_first_copy;
+    using algorithm::ireplace_first;
+    using algorithm::replace_last_copy;
+    using algorithm::replace_last;
+    using algorithm::ireplace_last_copy;
+    using algorithm::ireplace_last;
+    using algorithm::replace_nth_copy;
+    using algorithm::replace_nth;
+    using algorithm::ireplace_nth_copy;
+    using algorithm::ireplace_nth;
+    using algorithm::replace_all_copy;
+    using algorithm::replace_all;
+    using algorithm::ireplace_all_copy;
+    using algorithm::ireplace_all;
+    using algorithm::replace_head_copy;
+    using algorithm::replace_head;
+    using algorithm::replace_tail_copy;
+    using algorithm::replace_tail;
+
+} // namespace ndnboost
+
+#endif  // BOOST_REPLACE_HPP
diff --git a/ndnboost/algorithm/string/sequence_traits.hpp b/ndnboost/algorithm/string/sequence_traits.hpp
new file mode 100644
index 0000000..5ef46af
--- /dev/null
+++ b/ndnboost/algorithm/string/sequence_traits.hpp
@@ -0,0 +1,193 @@
+//  Boost string_algo library sequence_traits.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_SEQUENCE_TRAITS_HPP
+#define BOOST_STRING_SEQUENCE_TRAITS_HPP
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/mpl/bool.hpp>
+#include <ndnboost/algorithm/string/yes_no_type.hpp>
+
+/*! \file
+    Traits defined in this header are used by various algorithms to achieve
+    better performance for specific containers.
+    Traits provide fail-safe defaults. If a container supports some of these
+    features, it is possible to specialize the specific trait for this container.
+    For lacking compilers, it is possible of define an override for a specific tester
+    function.
+
+    Due to a language restriction, it is not currently possible to define specializations for
+    stl containers without including the corresponding header. To decrease the overhead
+    needed by this inclusion, user can selectively include a specialization
+    header for a specific container. They are located in boost/algorithm/string/stl
+    directory. Alternatively she can include boost/algorithm/string/std_collection_traits.hpp
+    header which contains specializations for all stl containers.
+*/
+
+namespace ndnboost {
+    namespace algorithm {
+
+//  sequence traits  -----------------------------------------------//
+
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+        //! Native replace tester
+        /*!
+            Declare an override of this tester function with return
+            type ndnboost::string_algo::yes_type for a sequence with this property.
+
+            \return yes_type if the container has basic_string like native replace
+            method.
+        */
+        no_type has_native_replace_tester(...);
+
+        //! Stable iterators tester
+        /*!
+            Declare an override of this tester function with return
+            type ndnboost::string_algo::yes_type for a sequence with this property.
+
+            \return yes_type if the sequence's insert/replace/erase methods do not invalidate
+            existing iterators.
+        */
+        no_type has_stable_iterators_tester(...);
+
+        //! const time insert tester
+        /*!
+            Declare an override of this tester function with return
+            type ndnboost::string_algo::yes_type for a sequence with this property.
+
+            \return yes_type if the sequence's insert method is working in constant time
+        */
+        no_type has_const_time_insert_tester(...);
+
+        //! const time erase tester
+        /*!
+            Declare an override of this tester function with return
+            type ndnboost::string_algo::yes_type for a sequence with this property.
+
+            \return yes_type if the sequence's erase method is working in constant time
+        */
+        no_type has_const_time_erase_tester(...);
+
+#endif //BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+        //! Native replace trait
+        /*!
+            This trait specifies that the sequence has \c std::string like replace method
+        */
+        template< typename T >
+        class has_native_replace
+        {
+
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+        private:
+            static T* t;
+        public:
+            BOOST_STATIC_CONSTANT(bool, value=(
+                sizeof(has_native_replace_tester(t))==sizeof(yes_type) ) );
+#else  // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+        public:
+#    if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
+            enum { value = false };
+#    else
+            BOOST_STATIC_CONSTANT(bool, value=false);
+#    endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+
+            typedef mpl::bool_<has_native_replace<T>::value> type;
+        };
+
+
+        //! Stable iterators trait
+        /*!
+            This trait specifies that the sequence has stable iterators. It means
+            that operations like insert/erase/replace do not invalidate iterators.
+        */
+        template< typename T >
+        class has_stable_iterators
+        {
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+        private:
+            static T* t;
+        public:
+            BOOST_STATIC_CONSTANT(bool, value=(
+                sizeof(has_stable_iterators_tester(t))==sizeof(yes_type) ) );
+#else  // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+        public:
+#    if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
+            enum { value = false };
+#    else
+            BOOST_STATIC_CONSTANT(bool, value=false);
+#    endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+            typedef mpl::bool_<has_stable_iterators<T>::value> type;
+        };
+
+
+        //! Const time insert trait
+        /*!
+            This trait specifies that the sequence's insert method has
+            constant time complexity.
+        */
+        template< typename T >
+        class has_const_time_insert
+        {
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+        private:
+            static T* t;
+        public:
+            BOOST_STATIC_CONSTANT(bool, value=(
+                sizeof(has_const_time_insert_tester(t))==sizeof(yes_type) ) );
+#else  // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+        public:
+#    if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
+            enum { value = false };
+#    else
+            BOOST_STATIC_CONSTANT(bool, value=false);
+#    endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+            typedef mpl::bool_<has_const_time_insert<T>::value> type;
+        };
+
+
+        //! Const time erase trait
+        /*!
+            This trait specifies that the sequence's erase method has
+            constant time complexity.
+        */
+        template< typename T >
+        class has_const_time_erase
+        {
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+        private:
+            static T* t;
+        public:
+            BOOST_STATIC_CONSTANT(bool, value=(
+                sizeof(has_const_time_erase_tester(t))==sizeof(yes_type) ) );
+#else  // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+        public:
+#    if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
+            enum { value = false };
+#    else
+            BOOST_STATIC_CONSTANT(bool, value=false);
+#    endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+            typedef mpl::bool_<has_const_time_erase<T>::value> type;
+        };
+
+    } // namespace algorithm
+} // namespace ndnboost
+
+
+#endif  // BOOST_STRING_SEQUENCE_TRAITS_HPP
diff --git a/ndnboost/algorithm/string/yes_no_type.hpp b/ndnboost/algorithm/string/yes_no_type.hpp
new file mode 100644
index 0000000..740c7b1
--- /dev/null
+++ b/ndnboost/algorithm/string/yes_no_type.hpp
@@ -0,0 +1,33 @@
+//  Boost string_algo library yes_no_type.hpp header file  ---------------------------//
+
+//  Copyright Pavol Droba 2002-2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//          http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/ for updates, documentation, and revision history.
+
+#ifndef BOOST_STRING_YES_NO_TYPE_DETAIL_HPP
+#define BOOST_STRING_YES_NO_TYPE_DETAIL_HPP
+
+namespace ndnboost {
+    namespace algorithm {
+
+        // taken from boost mailing-list
+        // when yes_no_type will become officially
+        // a part of boost distribution, this header
+        // will be deprecated
+        template<int I> struct size_descriptor 
+        {
+            typedef char (& type)[I];
+        }; 
+
+        typedef size_descriptor<1>::type yes_type;
+        typedef size_descriptor<2>::type no_type;
+
+    } // namespace algorithm
+} // namespace ndnboost
+
+
+#endif  // BOOST_STRING_YES_NO_TYPE_DETAIL_HPP
diff --git a/ndnboost/array.hpp b/ndnboost/array.hpp
new file mode 100644
index 0000000..ab70a47
--- /dev/null
+++ b/ndnboost/array.hpp
@@ -0,0 +1,446 @@
+/* The following code declares class array,
+ * an STL container (as wrapper) for arrays of constant size.
+ *
+ * See
+ *      http://www.boost.org/libs/array/
+ * for documentation.
+ *
+ * The original author site is at: http://www.josuttis.com/
+ *
+ * (C) Copyright Nicolai M. Josuttis 2001.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See
+ * accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * 14 Apr 2012 - (mtc) Added support for ndnboost::hash
+ * 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility.
+ * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group.
+ *      See <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#776> or Trac issue #3168
+ *      Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow)
+ * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow)
+ * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis)
+ * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries.
+ * 05 Aug 2001 - minor update (Nico Josuttis)
+ * 20 Jan 2001 - STLport fix (Beman Dawes)
+ * 29 Sep 2000 - Initial Revision (Nico Josuttis)
+ *
+ * Jan 29, 2004
+ */
+#ifndef BOOST_ARRAY_HPP
+#define BOOST_ARRAY_HPP
+
+#include <ndnboost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)  
+# pragma warning(push)  
+# pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe
+# pragma warning(disable:4510) // ndnboost::array<T,N>' : default constructor could not be generated 
+# pragma warning(disable:4610) // warning C4610: class 'ndnboost::array<T,N>' can never be instantiated - user defined constructor required 
+#endif
+
+#include <cstddef>
+#include <stdexcept>
+#include <ndnboost/assert.hpp>
+#include <ndnboost/swap.hpp>
+
+// Handles broken standard libraries better than <iterator>
+#include <ndnboost/detail/iterator.hpp>
+#include <ndnboost/throw_exception.hpp>
+#include <ndnboost/functional/hash_fwd.hpp>
+#include <algorithm>
+
+// FIXES for broken compilers
+#include <ndnboost/config.hpp>
+
+
+namespace ndnboost {
+
+    template<class T, std::size_t N>
+    class array {
+      public:
+        T elems[N];    // fixed-size array of elements of type T
+
+      public:
+        // type definitions
+        typedef T              value_type;
+        typedef T*             iterator;
+        typedef const T*       const_iterator;
+        typedef T&             reference;
+        typedef const T&       const_reference;
+        typedef std::size_t    size_type;
+        typedef std::ptrdiff_t difference_type;
+
+        // iterator support
+        iterator        begin()       { return elems; }
+        const_iterator  begin() const { return elems; }
+        const_iterator cbegin() const { return elems; }
+        
+        iterator        end()       { return elems+N; }
+        const_iterator  end() const { return elems+N; }
+        const_iterator cend() const { return elems+N; }
+
+        // reverse iterator support
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+        typedef std::reverse_iterator<iterator> reverse_iterator;
+        typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
+        // workaround for broken reverse_iterator in VC7
+        typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
+                                      reference, iterator, reference> > reverse_iterator;
+        typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
+                                      const_reference, iterator, reference> > const_reverse_iterator;
+#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) 
+        typedef std::reverse_iterator<iterator, std::random_access_iterator_tag, 
+              value_type, reference, iterator, difference_type> reverse_iterator; 
+        typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
+              value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
+#else
+        // workaround for broken reverse_iterator implementations
+        typedef std::reverse_iterator<iterator,T> reverse_iterator;
+        typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
+#endif
+
+        reverse_iterator rbegin() { return reverse_iterator(end()); }
+        const_reverse_iterator rbegin() const {
+            return const_reverse_iterator(end());
+        }
+        const_reverse_iterator crbegin() const {
+            return const_reverse_iterator(end());
+        }
+
+        reverse_iterator rend() { return reverse_iterator(begin()); }
+        const_reverse_iterator rend() const {
+            return const_reverse_iterator(begin());
+        }
+        const_reverse_iterator crend() const {
+            return const_reverse_iterator(begin());
+        }
+
+        // operator[]
+        reference operator[](size_type i) 
+        { 
+            BOOST_ASSERT_MSG( i < N, "out of range" );
+            return elems[i];
+        }
+        
+        const_reference operator[](size_type i) const 
+        {     
+            BOOST_ASSERT_MSG( i < N, "out of range" );
+            return elems[i]; 
+        }
+
+        // at() with range check
+        reference at(size_type i) { rangecheck(i); return elems[i]; }
+        const_reference at(size_type i) const { rangecheck(i); return elems[i]; }
+    
+        // front() and back()
+        reference front() 
+        { 
+            return elems[0]; 
+        }
+        
+        const_reference front() const 
+        {
+            return elems[0];
+        }
+        
+        reference back() 
+        { 
+            return elems[N-1]; 
+        }
+        
+        const_reference back() const 
+        { 
+            return elems[N-1]; 
+        }
+
+        // size is constant
+        static size_type size() { return N; }
+        static bool empty() { return false; }
+        static size_type max_size() { return N; }
+        enum { static_size = N };
+
+        // swap (note: linear complexity)
+        void swap (array<T,N>& y) {
+            for (size_type i = 0; i < N; ++i)
+                ndnboost::swap(elems[i],y.elems[i]);
+        }
+
+        // direct access to data (read-only)
+        const T* data() const { return elems; }
+        T* data() { return elems; }
+
+        // use array as C array (direct read/write access to data)
+        T* c_array() { return elems; }
+
+        // assignment with type conversion
+        template <typename T2>
+        array<T,N>& operator= (const array<T2,N>& rhs) {
+            std::copy(rhs.begin(),rhs.end(), begin());
+            return *this;
+        }
+
+        // assign one value to all elements
+        void assign (const T& value) { fill ( value ); }    // A synonym for fill
+        void fill   (const T& value)
+        {
+            std::fill_n(begin(),size(),value);
+        }
+
+        // check range (may be private because it is static)
+        static void rangecheck (size_type i) {
+            if (i >= size()) {
+                std::out_of_range e("array<>: index out of range");
+                ndnboost::throw_exception(e);
+            }
+        }
+
+    };
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+    template< class T >
+    class array< T, 0 > {
+
+      public:
+        // type definitions
+        typedef T              value_type;
+        typedef T*             iterator;
+        typedef const T*       const_iterator;
+        typedef T&             reference;
+        typedef const T&       const_reference;
+        typedef std::size_t    size_type;
+        typedef std::ptrdiff_t difference_type;
+
+        // iterator support
+        iterator        begin()       { return       iterator( reinterpret_cast<       T * >( this ) ); }
+        const_iterator  begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
+        const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
+
+        iterator        end()       { return  begin(); }
+        const_iterator  end() const { return  begin(); }
+        const_iterator cend() const { return cbegin(); }
+
+        // reverse iterator support
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+        typedef std::reverse_iterator<iterator> reverse_iterator;
+        typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
+        // workaround for broken reverse_iterator in VC7
+        typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
+                                      reference, iterator, reference> > reverse_iterator;
+        typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
+                                      const_reference, iterator, reference> > const_reverse_iterator;
+#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) 
+        typedef std::reverse_iterator<iterator, std::random_access_iterator_tag, 
+              value_type, reference, iterator, difference_type> reverse_iterator; 
+        typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
+              value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
+#else
+        // workaround for broken reverse_iterator implementations
+        typedef std::reverse_iterator<iterator,T> reverse_iterator;
+        typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
+#endif
+
+        reverse_iterator rbegin() { return reverse_iterator(end()); }
+        const_reverse_iterator rbegin() const {
+            return const_reverse_iterator(end());
+        }
+        const_reverse_iterator crbegin() const {
+            return const_reverse_iterator(end());
+        }
+
+        reverse_iterator rend() { return reverse_iterator(begin()); }
+        const_reverse_iterator rend() const {
+            return const_reverse_iterator(begin());
+        }
+        const_reverse_iterator crend() const {
+            return const_reverse_iterator(begin());
+        }
+
+        // operator[]
+        reference operator[](size_type /*i*/)
+        {
+            return failed_rangecheck();
+        }
+
+        const_reference operator[](size_type /*i*/) const
+        {
+            return failed_rangecheck();
+        }
+
+        // at() with range check
+        reference at(size_type /*i*/)               {   return failed_rangecheck(); }
+        const_reference at(size_type /*i*/) const   {   return failed_rangecheck(); }
+
+        // front() and back()
+        reference front()
+        {
+            return failed_rangecheck();
+        }
+
+        const_reference front() const
+        {
+            return failed_rangecheck();
+        }
+
+        reference back()
+        {
+            return failed_rangecheck();
+        }
+
+        const_reference back() const
+        {
+            return failed_rangecheck();
+        }
+
+        // size is constant
+        static size_type size() { return 0; }
+        static bool empty() { return true; }
+        static size_type max_size() { return 0; }
+        enum { static_size = 0 };
+
+        void swap (array<T,0>& /*y*/) {
+        }
+
+        // direct access to data (read-only)
+        const T* data() const { return 0; }
+        T* data() { return 0; }
+
+        // use array as C array (direct read/write access to data)
+        T* c_array() { return 0; }
+
+        // assignment with type conversion
+        template <typename T2>
+        array<T,0>& operator= (const array<T2,0>& ) {
+            return *this;
+        }
+
+        // assign one value to all elements
+        void assign (const T& value) { fill ( value ); }
+        void fill   (const T& ) {}
+        
+        // check range (may be private because it is static)
+        static reference failed_rangecheck () {
+                std::out_of_range e("attempt to access element of an empty array");
+                ndnboost::throw_exception(e);
+#if defined(BOOST_NO_EXCEPTIONS) || (!defined(BOOST_MSVC) && !defined(__PATHSCALE__))
+                //
+                // We need to return something here to keep
+                // some compilers happy: however we will never
+                // actually get here....
+                //
+                static T placeholder;
+                return placeholder;
+#endif
+            }
+    };
+#endif
+
+    // comparisons
+    template<class T, std::size_t N>
+    bool operator== (const array<T,N>& x, const array<T,N>& y) {
+        return std::equal(x.begin(), x.end(), y.begin());
+    }
+    template<class T, std::size_t N>
+    bool operator< (const array<T,N>& x, const array<T,N>& y) {
+        return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
+    }
+    template<class T, std::size_t N>
+    bool operator!= (const array<T,N>& x, const array<T,N>& y) {
+        return !(x==y);
+    }
+    template<class T, std::size_t N>
+    bool operator> (const array<T,N>& x, const array<T,N>& y) {
+        return y<x;
+    }
+    template<class T, std::size_t N>
+    bool operator<= (const array<T,N>& x, const array<T,N>& y) {
+        return !(y<x);
+    }
+    template<class T, std::size_t N>
+    bool operator>= (const array<T,N>& x, const array<T,N>& y) {
+        return !(x<y);
+    }
+
+    // global swap()
+    template<class T, std::size_t N>
+    inline void swap (array<T,N>& x, array<T,N>& y) {
+        x.swap(y);
+    }
+
+#if defined(__SUNPRO_CC)
+//  Trac ticket #4757; the Sun Solaris compiler can't handle
+//  syntax like 'T(&get_c_array(ndnboost::array<T,N>& arg))[N]'
+//  
+//  We can't just use this for all compilers, because the 
+//      borland compilers can't handle this form. 
+    namespace detail {
+       template <typename T, std::size_t N> struct c_array
+       {
+           typedef T type[N];
+       };
+    }
+    
+   // Specific for ndnboost::array: simply returns its elems data member.
+   template <typename T, std::size_t N>
+   typename detail::c_array<T,N>::type& get_c_array(ndnboost::array<T,N>& arg)
+   {
+       return arg.elems;
+   }
+
+   // Specific for ndnboost::array: simply returns its elems data member.
+   template <typename T, std::size_t N>
+   typename const detail::c_array<T,N>::type& get_c_array(const ndnboost::array<T,N>& arg)
+   {
+       return arg.elems;
+   }
+#else
+// Specific for ndnboost::array: simply returns its elems data member.
+    template <typename T, std::size_t N>
+    T(&get_c_array(ndnboost::array<T,N>& arg))[N]
+    {
+        return arg.elems;
+    }
+    
+    // Const version.
+    template <typename T, std::size_t N>
+    const T(&get_c_array(const ndnboost::array<T,N>& arg))[N]
+    {
+        return arg.elems;
+    }
+#endif
+    
+#if 0
+    // Overload for std::array, assuming that std::array will have
+    // explicit conversion functions as discussed at the WG21 meeting
+    // in Summit, March 2009.
+    template <typename T, std::size_t N>
+    T(&get_c_array(std::array<T,N>& arg))[N]
+    {
+        return static_cast<T(&)[N]>(arg);
+    }
+    
+    // Const version.
+    template <typename T, std::size_t N>
+    const T(&get_c_array(const std::array<T,N>& arg))[N]
+    {
+        return static_cast<T(&)[N]>(arg);
+    }
+#endif
+
+
+    template<class T, std::size_t N>
+    std::size_t hash_value(const array<T,N>& arr)
+    {
+        return ndnboost::hash_range(arr.begin(), arr.end());
+    }
+
+} /* namespace ndnboost */
+
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)  
+# pragma warning(pop)  
+#endif 
+
+#endif /*BOOST_ARRAY_HPP*/
diff --git a/ndnboost/bind.hpp b/ndnboost/bind.hpp
new file mode 100644
index 0000000..4421619
--- /dev/null
+++ b/ndnboost/bind.hpp
@@ -0,0 +1,24 @@
+#ifndef BOOST_BIND_HPP_INCLUDED
+#define BOOST_BIND_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+//  bind.hpp - binds function objects to arguments
+//
+//  Copyright (c) 2009 Peter Dimov
+//
+//  Distributed under the Boost Software License, Version 1.0.
+//  See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt
+//
+//  See http://www.boost.org/libs/bind/bind.html for documentation.
+//
+
+#include <ndnboost/bind/bind.hpp>
+
+#endif // #ifndef BOOST_BIND_HPP_INCLUDED
diff --git a/ndnboost/bind/apply.hpp b/ndnboost/bind/apply.hpp
new file mode 100644
index 0000000..8519c06
--- /dev/null
+++ b/ndnboost/bind/apply.hpp
@@ -0,0 +1,74 @@
+#ifndef BOOST_BIND_APPLY_HPP_INCLUDED
+#define BOOST_BIND_APPLY_HPP_INCLUDED
+
+//
+//  apply.hpp
+//
+//  Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+namespace ndnboost
+{
+
+template<class R> struct apply
+{
+    typedef R result_type;
+
+    template<class F> result_type operator()(F & f) const
+    {
+        return f();
+    }
+
+    template<class F, class A1> result_type operator()(F & f, A1 & a1) const
+    {
+        return f(a1);
+    }
+
+    template<class F, class A1, class A2> result_type operator()(F & f, A1 & a1, A2 & a2) const
+    {
+        return f(a1, a2);
+    }
+
+    template<class F, class A1, class A2, class A3> result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3) const
+    {
+        return f(a1, a2, a3);
+    }
+
+    template<class F, class A1, class A2, class A3, class A4> result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4) const
+    {
+        return f(a1, a2, a3, a4);
+    }
+
+    template<class F, class A1, class A2, class A3, class A4, class A5> result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const
+    {
+        return f(a1, a2, a3, a4, a5);
+    }
+
+    template<class F, class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const
+    {
+        return f(a1, a2, a3, a4, a5, a6);
+    }
+
+    template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const
+    {
+        return f(a1, a2, a3, a4, a5, a6, a7);
+    }
+
+    template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const
+    {
+        return f(a1, a2, a3, a4, a5, a6, a7, a8);
+    }
+
+    template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const
+    {
+        return f(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+    }
+};
+
+} // namespace ndnboost
+
+#endif // #ifndef BOOST_BIND_APPLY_HPP_INCLUDED
diff --git a/ndnboost/bind/arg.hpp b/ndnboost/bind/arg.hpp
new file mode 100644
index 0000000..7551575
--- /dev/null
+++ b/ndnboost/bind/arg.hpp
@@ -0,0 +1,62 @@
+#ifndef BOOST_BIND_ARG_HPP_INCLUDED
+#define BOOST_BIND_ARG_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+//  bind/arg.hpp
+//
+//  Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//  See http://www.boost.org/libs/bind/bind.html for documentation.
+//
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/is_placeholder.hpp>
+
+namespace ndnboost
+{
+
+template< int I > struct arg
+{
+    arg()
+    {
+    }
+
+    template< class T > arg( T const & /* t */ )
+    {
+        // static assert I == is_placeholder<T>::value
+        typedef char T_must_be_placeholder[ I == is_placeholder<T>::value? 1: -1 ];
+    }
+};
+
+template< int I > bool operator==( arg<I> const &, arg<I> const & )
+{
+    return true;
+}
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< int I > struct is_placeholder< arg<I> >
+{
+    enum _vt { value = I };
+};
+
+template< int I > struct is_placeholder< arg<I> (*) () >
+{
+    enum _vt { value = I };
+};
+
+#endif
+
+} // namespace ndnboost
+
+#endif // #ifndef BOOST_BIND_ARG_HPP_INCLUDED
diff --git a/ndnboost/bind/bind.hpp b/ndnboost/bind/bind.hpp
new file mode 100644
index 0000000..db16788
--- /dev/null
+++ b/ndnboost/bind/bind.hpp
@@ -0,0 +1,1751 @@
+#ifndef BOOST_BIND_BIND_HPP_INCLUDED
+#define BOOST_BIND_BIND_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+//  bind.hpp - binds function objects to arguments
+//
+//  Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd.
+//  Copyright (c) 2001 David Abrahams
+//  Copyright (c) 2005 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//  See http://www.boost.org/libs/bind/bind.html for documentation.
+//
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/ref.hpp>
+#include <ndnboost/mem_fn.hpp>
+#include <ndnboost/type.hpp>
+#include <ndnboost/is_placeholder.hpp>
+#include <ndnboost/bind/arg.hpp>
+#include <ndnboost/detail/workaround.hpp>
+#include <ndnboost/visit_each.hpp>
+
+// Borland-specific bug, visit_each() silently fails to produce code
+
+#if defined(__BORLANDC__)
+#  define BOOST_BIND_VISIT_EACH ndnboost::visit_each
+#else
+#  define BOOST_BIND_VISIT_EACH visit_each
+#endif
+
+#include <ndnboost/bind/storage.hpp>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4512) // assignment operator could not be generated
+#endif
+
+namespace ndnboost
+{
+
+template<class T> class weak_ptr;
+
+namespace _bi // implementation details
+{
+
+// result_traits
+
+template<class R, class F> struct result_traits
+{
+    typedef R type;
+};
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+
+struct unspecified {};
+
+template<class F> struct result_traits<unspecified, F>
+{
+    typedef typename F::result_type type;
+};
+
+template<class F> struct result_traits< unspecified, reference_wrapper<F> >
+{
+    typedef typename F::result_type type;
+};
+
+#endif
+
+// ref_compare
+
+template<class T> bool ref_compare( T const & a, T const & b, long )
+{
+    return a == b;
+}
+
+template<int I> bool ref_compare( arg<I> const &, arg<I> const &, int )
+{
+    return true;
+}
+
+template<int I> bool ref_compare( arg<I> (*) (), arg<I> (*) (), int )
+{
+    return true;
+}
+
+template<class T> bool ref_compare( reference_wrapper<T> const & a, reference_wrapper<T> const & b, int )
+{
+    return a.get_pointer() == b.get_pointer();
+}
+
+// bind_t forward declaration for listN
+
+template<class R, class F, class L> class bind_t;
+
+template<class R, class F, class L> bool ref_compare( bind_t<R, F, L> const & a, bind_t<R, F, L> const & b, int )
+{
+    return a.compare( b );
+}
+
+// value
+
+template<class T> class value
+{
+public:
+
+    value(T const & t): t_(t) {}
+
+    T & get() { return t_; }
+    T const & get() const { return t_; }
+
+    bool operator==(value const & rhs) const
+    {
+        return t_ == rhs.t_;
+    }
+
+private:
+
+    T t_;
+};
+
+// ref_compare for weak_ptr
+
+template<class T> bool ref_compare( value< weak_ptr<T> > const & a, value< weak_ptr<T> > const & b, int )
+{
+    return !(a.get() < b.get()) && !(b.get() < a.get());
+}
+
+// type
+
+template<class T> class type {};
+
+// unwrap
+
+template<class F> struct unwrapper
+{
+    static inline F & unwrap( F & f, long )
+    {
+        return f;
+    }
+
+    template<class F2> static inline F2 & unwrap( reference_wrapper<F2> rf, int )
+    {
+        return rf.get();
+    }
+
+    template<class R, class T> static inline _mfi::dm<R, T> unwrap( R T::* pm, int )
+    {
+        return _mfi::dm<R, T>( pm );
+    }
+};
+
+// listN
+
+class list0
+{
+public:
+
+    list0() {}
+
+    template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
+
+    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
+
+    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+
+    template<class R, class F, class A> R operator()(type<R>, F & f, A &, long)
+    {
+        return unwrapper<F>::unwrap(f, 0)();
+    }
+
+    template<class R, class F, class A> R operator()(type<R>, F const & f, A &, long) const
+    {
+        return unwrapper<F const>::unwrap(f, 0)();
+    }
+
+    template<class F, class A> void operator()(type<void>, F & f, A &, int)
+    {
+        unwrapper<F>::unwrap(f, 0)();
+    }
+
+    template<class F, class A> void operator()(type<void>, F const & f, A &, int) const
+    {
+        unwrapper<F const>::unwrap(f, 0)();
+    }
+
+    template<class V> void accept(V &) const
+    {
+    }
+
+    bool operator==(list0 const &) const
+    {
+        return true;
+    }
+};
+
+#ifdef BOOST_MSVC
+// MSVC is bright enough to realise that the parameter rhs 
+// in operator==may be unused for some template argument types:
+#pragma warning(push)
+#pragma warning(disable:4100)
+#endif
+
+template< class A1 > class list1: private storage1< A1 >
+{
+private:
+
+    typedef storage1< A1 > base_type;
+
+public:
+
+    explicit list1( A1 a1 ): base_type( a1 ) {}
+
+    A1 operator[] (ndnboost::arg<1>) const { return base_type::a1_; }
+
+    A1 operator[] (ndnboost::arg<1> (*) ()) const { return base_type::a1_; }
+
+    template<class T> T & operator[] ( _bi::value<T> & v ) const { return v.get(); }
+
+    template<class T> T const & operator[] ( _bi::value<T> const & v ) const { return v.get(); }
+
+    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+
+    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
+    {
+        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_]);
+    }
+
+    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
+    {
+        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
+    {
+        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
+    {
+        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_]);
+    }
+
+    template<class V> void accept(V & v) const
+    {
+        base_type::accept(v);
+    }
+
+    bool operator==(list1 const & rhs) const
+    {
+        return ref_compare(base_type::a1_, rhs.a1_, 0);
+    }
+};
+
+struct logical_and;
+struct logical_or;
+
+template< class A1, class A2 > class list2: private storage2< A1, A2 >
+{
+private:
+
+    typedef storage2< A1, A2 > base_type;
+
+public:
+
+    list2( A1 a1, A2 a2 ): base_type( a1, a2 ) {}
+
+    A1 operator[] (ndnboost::arg<1>) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2>) const { return base_type::a2_; }
+
+    A1 operator[] (ndnboost::arg<1> (*) ()) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2> (*) ()) const { return base_type::a2_; }
+
+    template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
+
+    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
+
+    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+
+    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
+    {
+        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]);
+    }
+
+    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
+    {
+        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
+    {
+        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
+    {
+        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]);
+    }
+
+    template<class A> bool operator()( type<bool>, logical_and & /*f*/, A & a, int )
+    {
+        return a[ base_type::a1_ ] && a[ base_type::a2_ ];
+    }
+
+    template<class A> bool operator()( type<bool>, logical_and const & /*f*/, A & a, int ) const
+    {
+        return a[ base_type::a1_ ] && a[ base_type::a2_ ];
+    }
+
+    template<class A> bool operator()( type<bool>, logical_or & /*f*/, A & a, int )
+    {
+        return a[ base_type::a1_ ] || a[ base_type::a2_ ];
+    }
+
+    template<class A> bool operator()( type<bool>, logical_or const & /*f*/, A & a, int ) const
+    {
+        return a[ base_type::a1_ ] || a[ base_type::a2_ ];
+    }
+
+    template<class V> void accept(V & v) const
+    {
+        base_type::accept(v);
+    }
+
+    bool operator==(list2 const & rhs) const
+    {
+        return ref_compare(base_type::a1_, rhs.a1_, 0) && ref_compare(base_type::a2_, rhs.a2_, 0);
+    }
+};
+
+template< class A1, class A2, class A3 > class list3: private storage3< A1, A2, A3 >
+{
+private:
+
+    typedef storage3< A1, A2, A3 > base_type;
+
+public:
+
+    list3( A1 a1, A2 a2, A3 a3 ): base_type( a1, a2, a3 ) {}
+
+    A1 operator[] (ndnboost::arg<1>) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2>) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3>) const { return base_type::a3_; }
+
+    A1 operator[] (ndnboost::arg<1> (*) ()) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2> (*) ()) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3> (*) ()) const { return base_type::a3_; }
+
+    template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
+
+    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
+
+    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+
+    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
+    {
+        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]);
+    }
+
+    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
+    {
+        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
+    {
+        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
+    {
+        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]);
+    }
+
+    template<class V> void accept(V & v) const
+    {
+        base_type::accept(v);
+    }
+
+    bool operator==(list3 const & rhs) const
+    {
+        return
+            
+            ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
+            ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
+            ref_compare( base_type::a3_, rhs.a3_, 0 );
+    }
+};
+
+template< class A1, class A2, class A3, class A4 > class list4: private storage4< A1, A2, A3, A4 >
+{
+private:
+
+    typedef storage4< A1, A2, A3, A4 > base_type;
+
+public:
+
+    list4( A1 a1, A2 a2, A3 a3, A4 a4 ): base_type( a1, a2, a3, a4 ) {}
+
+    A1 operator[] (ndnboost::arg<1>) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2>) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3>) const { return base_type::a3_; }
+    A4 operator[] (ndnboost::arg<4>) const { return base_type::a4_; }
+
+    A1 operator[] (ndnboost::arg<1> (*) ()) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2> (*) ()) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3> (*) ()) const { return base_type::a3_; }
+    A4 operator[] (ndnboost::arg<4> (*) ()) const { return base_type::a4_; }
+
+    template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
+
+    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
+
+    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+
+    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
+    {
+        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]);
+    }
+
+    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
+    {
+        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
+    {
+        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
+    {
+        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]);
+    }
+
+    template<class V> void accept(V & v) const
+    {
+        base_type::accept(v);
+    }
+
+    bool operator==(list4 const & rhs) const
+    {
+        return
+
+            ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
+            ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
+            ref_compare( base_type::a3_, rhs.a3_, 0 ) &&
+            ref_compare( base_type::a4_, rhs.a4_, 0 );
+    }
+};
+
+template< class A1, class A2, class A3, class A4, class A5 > class list5: private storage5< A1, A2, A3, A4, A5 >
+{
+private:
+
+    typedef storage5< A1, A2, A3, A4, A5 > base_type;
+
+public:
+
+    list5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): base_type( a1, a2, a3, a4, a5 ) {}
+
+    A1 operator[] (ndnboost::arg<1>) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2>) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3>) const { return base_type::a3_; }
+    A4 operator[] (ndnboost::arg<4>) const { return base_type::a4_; }
+    A5 operator[] (ndnboost::arg<5>) const { return base_type::a5_; }
+
+    A1 operator[] (ndnboost::arg<1> (*) ()) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2> (*) ()) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3> (*) ()) const { return base_type::a3_; }
+    A4 operator[] (ndnboost::arg<4> (*) ()) const { return base_type::a4_; }
+    A5 operator[] (ndnboost::arg<5> (*) ()) const { return base_type::a5_; }
+
+    template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
+
+    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
+
+    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+
+    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
+    {
+        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]);
+    }
+
+    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
+    {
+        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
+    {
+        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
+    {
+        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]);
+    }
+
+    template<class V> void accept(V & v) const
+    {
+        base_type::accept(v);
+    }
+
+    bool operator==(list5 const & rhs) const
+    {
+        return
+
+            ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
+            ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
+            ref_compare( base_type::a3_, rhs.a3_, 0 ) &&
+            ref_compare( base_type::a4_, rhs.a4_, 0 ) &&
+            ref_compare( base_type::a5_, rhs.a5_, 0 );
+    }
+};
+
+template<class A1, class A2, class A3, class A4, class A5, class A6> class list6: private storage6< A1, A2, A3, A4, A5, A6 >
+{
+private:
+
+    typedef storage6< A1, A2, A3, A4, A5, A6 > base_type;
+
+public:
+
+    list6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): base_type( a1, a2, a3, a4, a5, a6 ) {}
+
+    A1 operator[] (ndnboost::arg<1>) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2>) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3>) const { return base_type::a3_; }
+    A4 operator[] (ndnboost::arg<4>) const { return base_type::a4_; }
+    A5 operator[] (ndnboost::arg<5>) const { return base_type::a5_; }
+    A6 operator[] (ndnboost::arg<6>) const { return base_type::a6_; }
+
+    A1 operator[] (ndnboost::arg<1> (*) ()) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2> (*) ()) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3> (*) ()) const { return base_type::a3_; }
+    A4 operator[] (ndnboost::arg<4> (*) ()) const { return base_type::a4_; }
+    A5 operator[] (ndnboost::arg<5> (*) ()) const { return base_type::a5_; }
+    A6 operator[] (ndnboost::arg<6> (*) ()) const { return base_type::a6_; }
+
+    template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
+
+    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
+
+    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+
+    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
+    {
+        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]);
+    }
+
+    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
+    {
+        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
+    {
+        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
+    {
+        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]);
+    }
+
+    template<class V> void accept(V & v) const
+    {
+        base_type::accept(v);
+    }
+
+    bool operator==(list6 const & rhs) const
+    {
+        return
+
+            ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
+            ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
+            ref_compare( base_type::a3_, rhs.a3_, 0 ) &&
+            ref_compare( base_type::a4_, rhs.a4_, 0 ) &&
+            ref_compare( base_type::a5_, rhs.a5_, 0 ) &&
+            ref_compare( base_type::a6_, rhs.a6_, 0 );
+    }
+};
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> class list7: private storage7< A1, A2, A3, A4, A5, A6, A7 >
+{
+private:
+
+    typedef storage7< A1, A2, A3, A4, A5, A6, A7 > base_type;
+
+public:
+
+    list7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): base_type( a1, a2, a3, a4, a5, a6, a7 ) {}
+
+    A1 operator[] (ndnboost::arg<1>) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2>) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3>) const { return base_type::a3_; }
+    A4 operator[] (ndnboost::arg<4>) const { return base_type::a4_; }
+    A5 operator[] (ndnboost::arg<5>) const { return base_type::a5_; }
+    A6 operator[] (ndnboost::arg<6>) const { return base_type::a6_; }
+    A7 operator[] (ndnboost::arg<7>) const { return base_type::a7_; }
+
+    A1 operator[] (ndnboost::arg<1> (*) ()) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2> (*) ()) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3> (*) ()) const { return base_type::a3_; }
+    A4 operator[] (ndnboost::arg<4> (*) ()) const { return base_type::a4_; }
+    A5 operator[] (ndnboost::arg<5> (*) ()) const { return base_type::a5_; }
+    A6 operator[] (ndnboost::arg<6> (*) ()) const { return base_type::a6_; }
+    A7 operator[] (ndnboost::arg<7> (*) ()) const { return base_type::a7_; }
+
+    template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
+
+    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
+
+    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+
+    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
+    {
+        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]);
+    }
+
+    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
+    {
+        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
+    {
+        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
+    {
+        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]);
+    }
+
+    template<class V> void accept(V & v) const
+    {
+        base_type::accept(v);
+    }
+
+    bool operator==(list7 const & rhs) const
+    {
+        return
+
+            ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
+            ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
+            ref_compare( base_type::a3_, rhs.a3_, 0 ) &&
+            ref_compare( base_type::a4_, rhs.a4_, 0 ) &&
+            ref_compare( base_type::a5_, rhs.a5_, 0 ) &&
+            ref_compare( base_type::a6_, rhs.a6_, 0 ) &&
+            ref_compare( base_type::a7_, rhs.a7_, 0 );
+    }
+};
+
+template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class list8: private storage8< A1, A2, A3, A4, A5, A6, A7, A8 >
+{
+private:
+
+    typedef storage8< A1, A2, A3, A4, A5, A6, A7, A8 > base_type;
+
+public:
+
+    list8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8 ) {}
+
+    A1 operator[] (ndnboost::arg<1>) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2>) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3>) const { return base_type::a3_; }
+    A4 operator[] (ndnboost::arg<4>) const { return base_type::a4_; }
+    A5 operator[] (ndnboost::arg<5>) const { return base_type::a5_; }
+    A6 operator[] (ndnboost::arg<6>) const { return base_type::a6_; }
+    A7 operator[] (ndnboost::arg<7>) const { return base_type::a7_; }
+    A8 operator[] (ndnboost::arg<8>) const { return base_type::a8_; }
+
+    A1 operator[] (ndnboost::arg<1> (*) ()) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2> (*) ()) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3> (*) ()) const { return base_type::a3_; }
+    A4 operator[] (ndnboost::arg<4> (*) ()) const { return base_type::a4_; }
+    A5 operator[] (ndnboost::arg<5> (*) ()) const { return base_type::a5_; }
+    A6 operator[] (ndnboost::arg<6> (*) ()) const { return base_type::a6_; }
+    A7 operator[] (ndnboost::arg<7> (*) ()) const { return base_type::a7_; }
+    A8 operator[] (ndnboost::arg<8> (*) ()) const { return base_type::a8_; }
+
+    template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
+
+    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
+
+    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+
+    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
+    {
+        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]);
+    }
+
+    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
+    {
+        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
+    {
+        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
+    {
+        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]);
+    }
+
+    template<class V> void accept(V & v) const
+    {
+        base_type::accept(v);
+    }
+
+    bool operator==(list8 const & rhs) const
+    {
+        return
+            
+            ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
+            ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
+            ref_compare( base_type::a3_, rhs.a3_, 0 ) &&
+            ref_compare( base_type::a4_, rhs.a4_, 0 ) &&
+            ref_compare( base_type::a5_, rhs.a5_, 0 ) &&
+            ref_compare( base_type::a6_, rhs.a6_, 0 ) &&
+            ref_compare( base_type::a7_, rhs.a7_, 0 ) &&
+            ref_compare( base_type::a8_, rhs.a8_, 0 );
+    }
+};
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> class list9: private storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 >
+{
+private:
+
+    typedef storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > base_type;
+
+public:
+
+    list9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) {}
+
+    A1 operator[] (ndnboost::arg<1>) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2>) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3>) const { return base_type::a3_; }
+    A4 operator[] (ndnboost::arg<4>) const { return base_type::a4_; }
+    A5 operator[] (ndnboost::arg<5>) const { return base_type::a5_; }
+    A6 operator[] (ndnboost::arg<6>) const { return base_type::a6_; }
+    A7 operator[] (ndnboost::arg<7>) const { return base_type::a7_; }
+    A8 operator[] (ndnboost::arg<8>) const { return base_type::a8_; }
+    A9 operator[] (ndnboost::arg<9>) const { return base_type::a9_; }
+
+    A1 operator[] (ndnboost::arg<1> (*) ()) const { return base_type::a1_; }
+    A2 operator[] (ndnboost::arg<2> (*) ()) const { return base_type::a2_; }
+    A3 operator[] (ndnboost::arg<3> (*) ()) const { return base_type::a3_; }
+    A4 operator[] (ndnboost::arg<4> (*) ()) const { return base_type::a4_; }
+    A5 operator[] (ndnboost::arg<5> (*) ()) const { return base_type::a5_; }
+    A6 operator[] (ndnboost::arg<6> (*) ()) const { return base_type::a6_; }
+    A7 operator[] (ndnboost::arg<7> (*) ()) const { return base_type::a7_; }
+    A8 operator[] (ndnboost::arg<8> (*) ()) const { return base_type::a8_; }
+    A9 operator[] (ndnboost::arg<9> (*) ()) const { return base_type::a9_; }
+
+    template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
+
+    template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
+
+    template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+
+    template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
+    {
+        return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]);
+    }
+
+    template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
+    {
+        return unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F & f, A & a, int)
+    {
+        unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]);
+    }
+
+    template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
+    {
+        unwrapper<F const>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]);
+    }
+
+    template<class V> void accept(V & v) const
+    {
+        base_type::accept(v);
+    }
+
+    bool operator==(list9 const & rhs) const
+    {
+        return
+
+            ref_compare( base_type::a1_, rhs.a1_, 0 ) &&
+            ref_compare( base_type::a2_, rhs.a2_, 0 ) &&
+            ref_compare( base_type::a3_, rhs.a3_, 0 ) &&
+            ref_compare( base_type::a4_, rhs.a4_, 0 ) &&
+            ref_compare( base_type::a5_, rhs.a5_, 0 ) &&
+            ref_compare( base_type::a6_, rhs.a6_, 0 ) &&
+            ref_compare( base_type::a7_, rhs.a7_, 0 ) &&
+            ref_compare( base_type::a8_, rhs.a8_, 0 ) &&
+            ref_compare( base_type::a9_, rhs.a9_, 0 );
+    }
+};
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+// bind_t
+
+#ifndef BOOST_NO_VOID_RETURNS
+
+template<class R, class F, class L> class bind_t
+{
+public:
+
+    typedef bind_t this_type;
+
+    bind_t(F f, L const & l): f_(f), l_(l) {}
+
+#define BOOST_BIND_RETURN return
+#include <ndnboost/bind/bind_template.hpp>
+#undef BOOST_BIND_RETURN
+
+};
+
+#else
+
+template<class R> struct bind_t_generator
+{
+
+template<class F, class L> class implementation
+{
+public:
+
+    typedef implementation this_type;
+
+    implementation(F f, L const & l): f_(f), l_(l) {}
+
+#define BOOST_BIND_RETURN return
+#include <ndnboost/bind/bind_template.hpp>
+#undef BOOST_BIND_RETURN
+
+};
+
+};
+
+template<> struct bind_t_generator<void>
+{
+
+template<class F, class L> class implementation
+{
+private:
+
+    typedef void R;
+
+public:
+
+    typedef implementation this_type;
+
+    implementation(F f, L const & l): f_(f), l_(l) {}
+
+#define BOOST_BIND_RETURN
+#include <ndnboost/bind/bind_template.hpp>
+#undef BOOST_BIND_RETURN
+
+};
+
+};
+
+template<class R2, class F, class L> class bind_t: public bind_t_generator<R2>::BOOST_NESTED_TEMPLATE implementation<F, L>
+{
+public:
+
+    bind_t(F f, L const & l): bind_t_generator<R2>::BOOST_NESTED_TEMPLATE implementation<F, L>(f, l) {}
+
+};
+
+#endif
+
+// function_equal
+
+#ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
+
+// put overloads in _bi, rely on ADL
+
+# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+template<class R, class F, class L> bool function_equal( bind_t<R, F, L> const & a, bind_t<R, F, L> const & b )
+{
+    return a.compare(b);
+}
+
+# else
+
+template<class R, class F, class L> bool function_equal_impl( bind_t<R, F, L> const & a, bind_t<R, F, L> const & b, int )
+{
+    return a.compare(b);
+}
+
+# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+#else // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
+
+// put overloads in boost
+
+} // namespace _bi
+
+# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+template<class R, class F, class L> bool function_equal( _bi::bind_t<R, F, L> const & a, _bi::bind_t<R, F, L> const & b )
+{
+    return a.compare(b);
+}
+
+# else
+
+template<class R, class F, class L> bool function_equal_impl( _bi::bind_t<R, F, L> const & a, _bi::bind_t<R, F, L> const & b, int )
+{
+    return a.compare(b);
+}
+
+# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+namespace _bi
+{
+
+#endif // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
+
+// add_value
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || (__SUNPRO_CC >= 0x530)
+
+#if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x582) )
+
+template<class T> struct add_value
+{
+    typedef _bi::value<T> type;
+};
+
+#else
+
+template< class T, int I > struct add_value_2
+{
+    typedef ndnboost::arg<I> type;
+};
+
+template< class T > struct add_value_2< T, 0 >
+{
+    typedef _bi::value< T > type;
+};
+
+template<class T> struct add_value
+{
+    typedef typename add_value_2< T, ndnboost::is_placeholder< T >::value >::type type;
+};
+
+#endif
+
+template<class T> struct add_value< value<T> >
+{
+    typedef _bi::value<T> type;
+};
+
+template<class T> struct add_value< reference_wrapper<T> >
+{
+    typedef reference_wrapper<T> type;
+};
+
+template<int I> struct add_value< arg<I> >
+{
+    typedef ndnboost::arg<I> type;
+};
+
+template<int I> struct add_value< arg<I> (*) () >
+{
+    typedef ndnboost::arg<I> (*type) ();
+};
+
+template<class R, class F, class L> struct add_value< bind_t<R, F, L> >
+{
+    typedef bind_t<R, F, L> type;
+};
+
+#else
+
+template<int I> struct _avt_0;
+
+template<> struct _avt_0<1>
+{
+    template<class T> struct inner
+    {
+        typedef T type;
+    };
+};
+
+template<> struct _avt_0<2>
+{
+    template<class T> struct inner
+    {
+        typedef value<T> type;
+    };
+};
+
+typedef char (&_avt_r1) [1];
+typedef char (&_avt_r2) [2];
+
+template<class T> _avt_r1 _avt_f(value<T>);
+template<class T> _avt_r1 _avt_f(reference_wrapper<T>);
+template<int I> _avt_r1 _avt_f(arg<I>);
+template<int I> _avt_r1 _avt_f(arg<I> (*) ());
+template<class R, class F, class L> _avt_r1 _avt_f(bind_t<R, F, L>);
+
+_avt_r2 _avt_f(...);
+
+template<class T> struct add_value
+{
+    static T t();
+    typedef typename _avt_0<sizeof(_avt_f(t()))>::template inner<T>::type type;
+};
+
+#endif
+
+// list_av_N
+
+template<class A1> struct list_av_1
+{
+    typedef typename add_value<A1>::type B1;
+    typedef list1<B1> type;
+};
+
+template<class A1, class A2> struct list_av_2
+{
+    typedef typename add_value<A1>::type B1;
+    typedef typename add_value<A2>::type B2;
+    typedef list2<B1, B2> type;
+};
+
+template<class A1, class A2, class A3> struct list_av_3
+{
+    typedef typename add_value<A1>::type B1;
+    typedef typename add_value<A2>::type B2;
+    typedef typename add_value<A3>::type B3;
+    typedef list3<B1, B2, B3> type;
+};
+
+template<class A1, class A2, class A3, class A4> struct list_av_4
+{
+    typedef typename add_value<A1>::type B1;
+    typedef typename add_value<A2>::type B2;
+    typedef typename add_value<A3>::type B3;
+    typedef typename add_value<A4>::type B4;
+    typedef list4<B1, B2, B3, B4> type;
+};
+
+template<class A1, class A2, class A3, class A4, class A5> struct list_av_5
+{
+    typedef typename add_value<A1>::type B1;
+    typedef typename add_value<A2>::type B2;
+    typedef typename add_value<A3>::type B3;
+    typedef typename add_value<A4>::type B4;
+    typedef typename add_value<A5>::type B5;
+    typedef list5<B1, B2, B3, B4, B5> type;
+};
+
+template<class A1, class A2, class A3, class A4, class A5, class A6> struct list_av_6
+{
+    typedef typename add_value<A1>::type B1;
+    typedef typename add_value<A2>::type B2;
+    typedef typename add_value<A3>::type B3;
+    typedef typename add_value<A4>::type B4;
+    typedef typename add_value<A5>::type B5;
+    typedef typename add_value<A6>::type B6;
+    typedef list6<B1, B2, B3, B4, B5, B6> type;
+};
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> struct list_av_7
+{
+    typedef typename add_value<A1>::type B1;
+    typedef typename add_value<A2>::type B2;
+    typedef typename add_value<A3>::type B3;
+    typedef typename add_value<A4>::type B4;
+    typedef typename add_value<A5>::type B5;
+    typedef typename add_value<A6>::type B6;
+    typedef typename add_value<A7>::type B7;
+    typedef list7<B1, B2, B3, B4, B5, B6, B7> type;
+};
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> struct list_av_8
+{
+    typedef typename add_value<A1>::type B1;
+    typedef typename add_value<A2>::type B2;
+    typedef typename add_value<A3>::type B3;
+    typedef typename add_value<A4>::type B4;
+    typedef typename add_value<A5>::type B5;
+    typedef typename add_value<A6>::type B6;
+    typedef typename add_value<A7>::type B7;
+    typedef typename add_value<A8>::type B8;
+    typedef list8<B1, B2, B3, B4, B5, B6, B7, B8> type;
+};
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> struct list_av_9
+{
+    typedef typename add_value<A1>::type B1;
+    typedef typename add_value<A2>::type B2;
+    typedef typename add_value<A3>::type B3;
+    typedef typename add_value<A4>::type B4;
+    typedef typename add_value<A5>::type B5;
+    typedef typename add_value<A6>::type B6;
+    typedef typename add_value<A7>::type B7;
+    typedef typename add_value<A8>::type B8;
+    typedef typename add_value<A9>::type B9;
+    typedef list9<B1, B2, B3, B4, B5, B6, B7, B8, B9> type;
+};
+
+// operator!
+
+struct logical_not
+{
+    template<class V> bool operator()(V const & v) const { return !v; }
+};
+
+template<class R, class F, class L>
+    bind_t< bool, logical_not, list1< bind_t<R, F, L> > >
+    operator! (bind_t<R, F, L> const & f)
+{
+    typedef list1< bind_t<R, F, L> > list_type;
+    return bind_t<bool, logical_not, list_type> ( logical_not(), list_type(f) );
+}
+
+// relational operators
+
+#define BOOST_BIND_OPERATOR( op, name ) \
+\
+struct name \
+{ \
+    template<class V, class W> bool operator()(V const & v, W const & w) const { return v op w; } \
+}; \
+ \
+template<class R, class F, class L, class A2> \
+    bind_t< bool, name, list2< bind_t<R, F, L>, typename add_value<A2>::type > > \
+    operator op (bind_t<R, F, L> const & f, A2 a2) \
+{ \
+    typedef typename add_value<A2>::type B2; \
+    typedef list2< bind_t<R, F, L>, B2> list_type; \
+    return bind_t<bool, name, list_type> ( name(), list_type(f, a2) ); \
+}
+
+BOOST_BIND_OPERATOR( ==, equal )
+BOOST_BIND_OPERATOR( !=, not_equal )
+
+BOOST_BIND_OPERATOR( <, less )
+BOOST_BIND_OPERATOR( <=, less_equal )
+
+BOOST_BIND_OPERATOR( >, greater )
+BOOST_BIND_OPERATOR( >=, greater_equal )
+
+BOOST_BIND_OPERATOR( &&, logical_and )
+BOOST_BIND_OPERATOR( ||, logical_or )
+
+#undef BOOST_BIND_OPERATOR
+
+#if defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3)
+
+// resolve ambiguity with rel_ops
+
+#define BOOST_BIND_OPERATOR( op, name ) \
+\
+template<class R, class F, class L> \
+    bind_t< bool, name, list2< bind_t<R, F, L>, bind_t<R, F, L> > > \
+    operator op (bind_t<R, F, L> const & f, bind_t<R, F, L> const & g) \
+{ \
+    typedef list2< bind_t<R, F, L>, bind_t<R, F, L> > list_type; \
+    return bind_t<bool, name, list_type> ( name(), list_type(f, g) ); \
+}
+
+BOOST_BIND_OPERATOR( !=, not_equal )
+BOOST_BIND_OPERATOR( <=, less_equal )
+BOOST_BIND_OPERATOR( >, greater )
+BOOST_BIND_OPERATOR( >=, greater_equal )
+
+#endif
+
+// visit_each, ADL
+
+#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) \
+   && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3)
+
+template<class V, class T> void visit_each( V & v, value<T> const & t, int )
+{
+    using ndnboost::visit_each;
+    BOOST_BIND_VISIT_EACH( v, t.get(), 0 );
+}
+
+template<class V, class R, class F, class L> void visit_each( V & v, bind_t<R, F, L> const & t, int )
+{
+    t.accept( v );
+}
+
+#endif
+
+} // namespace _bi
+
+// visit_each, no ADL
+
+#if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) || defined( __BORLANDC__ ) \
+  || (defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3)
+
+template<class V, class T> void visit_each( V & v, _bi::value<T> const & t, int )
+{
+    BOOST_BIND_VISIT_EACH( v, t.get(), 0 );
+}
+
+template<class V, class R, class F, class L> void visit_each( V & v, _bi::bind_t<R, F, L> const & t, int )
+{
+    t.accept( v );
+}
+
+#endif
+
+// is_bind_expression
+
+template< class T > struct is_bind_expression
+{
+    enum _vt { value = 0 };
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class R, class F, class L > struct is_bind_expression< _bi::bind_t< R, F, L > >
+{
+    enum _vt { value = 1 };
+};
+
+#endif
+
+// bind
+
+#ifndef BOOST_BIND
+#define BOOST_BIND bind
+#endif
+
+// generic function objects
+
+template<class R, class F>
+    _bi::bind_t<R, F, _bi::list0>
+    BOOST_BIND(F f)
+{
+    typedef _bi::list0 list_type;
+    return _bi::bind_t<R, F, list_type> (f, list_type());
+}
+
+template<class R, class F, class A1>
+    _bi::bind_t<R, F, typename _bi::list_av_1<A1>::type>
+    BOOST_BIND(F f, A1 a1)
+{
+    typedef typename _bi::list_av_1<A1>::type list_type;
+    return _bi::bind_t<R, F, list_type> (f, list_type(a1));
+}
+
+template<class R, class F, class A1, class A2>
+    _bi::bind_t<R, F, typename _bi::list_av_2<A1, A2>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2)
+{
+    typedef typename _bi::list_av_2<A1, A2>::type list_type;
+    return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
+}
+
+template<class R, class F, class A1, class A2, class A3>
+    _bi::bind_t<R, F, typename _bi::list_av_3<A1, A2, A3>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3)
+{
+    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4>
+    _bi::bind_t<R, F, typename _bi::list_av_4<A1, A2, A3, A4>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4)
+{
+    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5>
+    _bi::bind_t<R, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
+{
+    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6>
+    _bi::bind_t<R, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
+{
+    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+    _bi::bind_t<R, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
+{
+    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+    _bi::bind_t<R, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
+{
+    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+    _bi::bind_t<R, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
+{
+    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
+}
+
+// generic function objects, alternative syntax
+
+template<class R, class F>
+    _bi::bind_t<R, F, _bi::list0>
+    BOOST_BIND(ndnboost::type<R>, F f)
+{
+    typedef _bi::list0 list_type;
+    return _bi::bind_t<R, F, list_type> (f, list_type());
+}
+
+template<class R, class F, class A1>
+    _bi::bind_t<R, F, typename _bi::list_av_1<A1>::type>
+    BOOST_BIND(ndnboost::type<R>, F f, A1 a1)
+{
+    typedef typename _bi::list_av_1<A1>::type list_type;
+    return _bi::bind_t<R, F, list_type> (f, list_type(a1));
+}
+
+template<class R, class F, class A1, class A2>
+    _bi::bind_t<R, F, typename _bi::list_av_2<A1, A2>::type>
+    BOOST_BIND(ndnboost::type<R>, F f, A1 a1, A2 a2)
+{
+    typedef typename _bi::list_av_2<A1, A2>::type list_type;
+    return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
+}
+
+template<class R, class F, class A1, class A2, class A3>
+    _bi::bind_t<R, F, typename _bi::list_av_3<A1, A2, A3>::type>
+    BOOST_BIND(ndnboost::type<R>, F f, A1 a1, A2 a2, A3 a3)
+{
+    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4>
+    _bi::bind_t<R, F, typename _bi::list_av_4<A1, A2, A3, A4>::type>
+    BOOST_BIND(ndnboost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4)
+{
+    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5>
+    _bi::bind_t<R, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
+    BOOST_BIND(ndnboost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
+{
+    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6>
+    _bi::bind_t<R, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
+    BOOST_BIND(ndnboost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
+{
+    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+    _bi::bind_t<R, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
+    BOOST_BIND(ndnboost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
+{
+    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+    _bi::bind_t<R, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
+    BOOST_BIND(ndnboost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
+{
+    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+    _bi::bind_t<R, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
+    BOOST_BIND(ndnboost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
+{
+    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
+}
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+
+// adaptable function objects
+
+template<class F>
+    _bi::bind_t<_bi::unspecified, F, _bi::list0>
+    BOOST_BIND(F f)
+{
+    typedef _bi::list0 list_type;
+    return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type());
+}
+
+template<class F, class A1>
+    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1<A1>::type>
+    BOOST_BIND(F f, A1 a1)
+{
+    typedef typename _bi::list_av_1<A1>::type list_type;
+    return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1));
+}
+
+template<class F, class A1, class A2>
+    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2<A1, A2>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2)
+{
+    typedef typename _bi::list_av_2<A1, A2>::type list_type;
+    return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2));
+}
+
+template<class F, class A1, class A2, class A3>
+    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3<A1, A2, A3>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3)
+{
+    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
+    return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3));
+}
+
+template<class F, class A1, class A2, class A3, class A4>
+    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4<A1, A2, A3, A4>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4)
+{
+    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
+    return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4));
+}
+
+template<class F, class A1, class A2, class A3, class A4, class A5>
+    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
+{
+    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
+    return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
+}
+
+template<class F, class A1, class A2, class A3, class A4, class A5, class A6>
+    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
+{
+    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
+    return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
+}
+
+template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
+{
+    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
+    return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
+}
+
+template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
+{
+    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
+    return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
+}
+
+template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+    _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
+    BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
+{
+    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
+    return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
+}
+
+#endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+
+// function pointers
+
+#define BOOST_BIND_CC
+#define BOOST_BIND_ST
+
+#include <ndnboost/bind/bind_cc.hpp>
+
+#undef BOOST_BIND_CC
+#undef BOOST_BIND_ST
+
+#ifdef BOOST_BIND_ENABLE_STDCALL
+
+#define BOOST_BIND_CC __stdcall
+#define BOOST_BIND_ST
+
+#include <ndnboost/bind/bind_cc.hpp>
+
+#undef BOOST_BIND_CC
+#undef BOOST_BIND_ST
+
+#endif
+
+#ifdef BOOST_BIND_ENABLE_FASTCALL
+
+#define BOOST_BIND_CC __fastcall
+#define BOOST_BIND_ST
+
+#include <ndnboost/bind/bind_cc.hpp>
+
+#undef BOOST_BIND_CC
+#undef BOOST_BIND_ST
+
+#endif
+
+#ifdef BOOST_BIND_ENABLE_PASCAL
+
+#define BOOST_BIND_ST pascal
+#define BOOST_BIND_CC
+
+#include <ndnboost/bind/bind_cc.hpp>
+
+#undef BOOST_BIND_ST
+#undef BOOST_BIND_CC
+
+#endif
+
+// member function pointers
+
+#define BOOST_BIND_MF_NAME(X) X
+#define BOOST_BIND_MF_CC
+
+#include <ndnboost/bind/bind_mf_cc.hpp>
+#include <ndnboost/bind/bind_mf2_cc.hpp>
+
+#undef BOOST_BIND_MF_NAME
+#undef BOOST_BIND_MF_CC
+
+#ifdef BOOST_MEM_FN_ENABLE_CDECL
+
+#define BOOST_BIND_MF_NAME(X) X##_cdecl
+#define BOOST_BIND_MF_CC __cdecl
+
+#include <ndnboost/bind/bind_mf_cc.hpp>
+#include <ndnboost/bind/bind_mf2_cc.hpp>
+
+#undef BOOST_BIND_MF_NAME
+#undef BOOST_BIND_MF_CC
+
+#endif
+
+#ifdef BOOST_MEM_FN_ENABLE_STDCALL
+
+#define BOOST_BIND_MF_NAME(X) X##_stdcall
+#define BOOST_BIND_MF_CC __stdcall
+
+#include <ndnboost/bind/bind_mf_cc.hpp>
+#include <ndnboost/bind/bind_mf2_cc.hpp>
+
+#undef BOOST_BIND_MF_NAME
+#undef BOOST_BIND_MF_CC
+
+#endif
+
+#ifdef BOOST_MEM_FN_ENABLE_FASTCALL
+
+#define BOOST_BIND_MF_NAME(X) X##_fastcall
+#define BOOST_BIND_MF_CC __fastcall
+
+#include <ndnboost/bind/bind_mf_cc.hpp>
+#include <ndnboost/bind/bind_mf2_cc.hpp>
+
+#undef BOOST_BIND_MF_NAME
+#undef BOOST_BIND_MF_CC
+
+#endif
+
+// data member pointers
+
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+    || ( defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x620 ) ) )
+
+template<class R, class T, class A1>
+_bi::bind_t< R, _mfi::dm<R, T>, typename _bi::list_av_1<A1>::type >
+    BOOST_BIND(R T::*f, A1 a1)
+{
+    typedef _mfi::dm<R, T> F;
+    typedef typename _bi::list_av_1<A1>::type list_type;
+    return _bi::bind_t<R, F, list_type>( F(f), list_type(a1) );
+}
+
+#else
+
+namespace _bi
+{
+
+template< class Pm, int I > struct add_cref;
+
+template< class M, class T > struct add_cref< M T::*, 0 >
+{
+    typedef M type;
+};
+
+template< class M, class T > struct add_cref< M T::*, 1 >
+{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4180)
+#endif
+    typedef M const & type;
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+};
+
+template< class R, class T > struct add_cref< R (T::*) (), 1 >
+{
+    typedef void type;
+};
+
+#if !defined(__IBMCPP__) || __IBMCPP_FUNC_CV_TMPL_ARG_DEDUCTION
+
+template< class R, class T > struct add_cref< R (T::*) () const, 1 >
+{
+    typedef void type;
+};
+
+#endif // __IBMCPP__
+
+template<class R> struct isref
+{
+    enum value_type { value = 0 };
+};
+
+template<class R> struct isref< R& >
+{
+    enum value_type { value = 1 };
+};
+
+template<class R> struct isref< R* >
+{
+    enum value_type { value = 1 };
+};
+
+template<class Pm, class A1> struct dm_result
+{
+    typedef typename add_cref< Pm, 1 >::type type;
+};
+
+template<class Pm, class R, class F, class L> struct dm_result< Pm, bind_t<R, F, L> >
+{
+    typedef typename bind_t<R, F, L>::result_type result_type;
+    typedef typename add_cref< Pm, isref< result_type >::value >::type type;
+};
+
+} // namespace _bi
+
+template< class A1, class M, class T >
+
+_bi::bind_t<
+    typename _bi::dm_result< M T::*, A1 >::type,
+    _mfi::dm<M, T>,
+    typename _bi::list_av_1<A1>::type
+>
+
+BOOST_BIND( M T::*f, A1 a1 )
+{
+    typedef typename _bi::dm_result< M T::*, A1 >::type result_type;
+    typedef _mfi::dm<M, T> F;
+    typedef typename _bi::list_av_1<A1>::type list_type;
+    return _bi::bind_t< result_type, F, list_type >( F( f ), list_type( a1 ) );
+}
+
+#endif
+
+} // namespace ndnboost
+
+#ifndef BOOST_BIND_NO_PLACEHOLDERS
+
+# include <ndnboost/bind/placeholders.hpp>
+
+#endif
+
+#ifdef BOOST_MSVC
+# pragma warning(default: 4512) // assignment operator could not be generated
+# pragma warning(pop)
+#endif
+
+#endif // #ifndef BOOST_BIND_BIND_HPP_INCLUDED
diff --git a/ndnboost/bind/bind_cc.hpp b/ndnboost/bind/bind_cc.hpp
new file mode 100644
index 0000000..35f8ece
--- /dev/null
+++ b/ndnboost/bind/bind_cc.hpp
@@ -0,0 +1,117 @@
+//
+//  bind/bind_cc.hpp - support for different calling conventions
+//
+//  Do not include this header directly.
+//
+//  Copyright (c) 2001 Peter Dimov and Multi Media Ltd.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//  See http://www.boost.org/libs/bind/bind.html for documentation.
+//
+
+template<class R>
+    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (), _bi::list0>
+    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) ())
+{
+    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) ();
+    typedef _bi::list0 list_type;
+    return _bi::bind_t<R, F, list_type> (f, list_type());
+}
+
+template<class R, class B1, class A1>
+    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1), typename _bi::list_av_1<A1>::type>
+    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1), A1 a1)
+{
+    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1);
+    typedef typename _bi::list_av_1<A1>::type list_type;
+    return _bi::bind_t<R, F, list_type> (f, list_type(a1));
+}
+
+template<class R, class B1, class B2, class A1, class A2>
+    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2), typename _bi::list_av_2<A1, A2>::type>
+    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2), A1 a1, A2 a2)
+{
+    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2);
+    typedef typename _bi::list_av_2<A1, A2>::type list_type;
+    return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
+}
+
+template<class R,
+    class B1, class B2, class B3,
+    class A1, class A2, class A3>
+    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3), typename _bi::list_av_3<A1, A2, A3>::type>
+    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3)
+{
+    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3);
+    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
+}
+
+template<class R,
+    class B1, class B2, class B3, class B4,
+    class A1, class A2, class A3, class A4>
+    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4), typename _bi::list_av_4<A1, A2, A3, A4>::type>
+    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4)
+{
+    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4);
+    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
+}
+
+template<class R,
+    class B1, class B2, class B3, class B4, class B5,
+    class A1, class A2, class A3, class A4, class A5>
+    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5), typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
+    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
+{
+    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5);
+    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
+}
+
+template<class R,
+    class B1, class B2, class B3, class B4, class B5, class B6,
+    class A1, class A2, class A3, class A4, class A5, class A6>
+    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6), typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
+    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
+{
+    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6);
+    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
+}
+
+template<class R,
+    class B1, class B2, class B3, class B4, class B5, class B6, class B7,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7), typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
+    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
+{
+    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7);
+    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
+}
+
+template<class R,
+    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8), typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
+    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
+{
+    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8);
+    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
+}
+
+template<class R,
+    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8, class B9,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+    _bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8, B9), typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
+    BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
+{
+    typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9);
+    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
+    return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
+}
diff --git a/ndnboost/bind/bind_mf2_cc.hpp b/ndnboost/bind/bind_mf2_cc.hpp
new file mode 100644
index 0000000..efb8b25
--- /dev/null
+++ b/ndnboost/bind/bind_mf2_cc.hpp
@@ -0,0 +1,228 @@
+//
+//  bind/bind_mf2_cc.hpp - member functions, type<> syntax
+//
+//  Do not include this header directly.
+//
+//  Copyright (c) 2001 Peter Dimov and Multi Media Ltd.
+//  Copyright (c) 2008 Peter Dimov
+//
+//  Distributed under the Boost Software License, Version 1.0.
+//  See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt
+//
+//  See http://www.boost.org/libs/bind/bind.html for documentation.
+//
+
+// 0
+
+template<class Rt2, class R, class T,
+    class A1>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (), A1 a1)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
+    typedef typename _bi::list_av_1<A1>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1));
+}
+
+template<class Rt2, class R, class T,
+    class A1>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) () const, A1 a1)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
+    typedef typename _bi::list_av_1<A1>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1));
+}
+
+// 1
+
+template<class Rt2, class R, class T,
+    class B1,
+    class A1, class A2>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
+    typedef typename _bi::list_av_2<A1, A2>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2));
+}
+
+template<class Rt2, class R, class T,
+    class B1,
+    class A1, class A2>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
+    typedef typename _bi::list_av_2<A1, A2>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2));
+}
+
+// 2
+
+template<class Rt2, class R, class T,
+    class B1, class B2,
+    class A1, class A2, class A3>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
+    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3));
+}
+
+template<class Rt2, class R, class T,
+    class B1, class B2,
+    class A1, class A2, class A3>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
+    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3));
+}
+
+// 3
+
+template<class Rt2, class R, class T,
+    class B1, class B2, class B3,
+    class A1, class A2, class A3, class A4>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
+    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4));
+}
+
+template<class Rt2, class R, class T,
+    class B1, class B2, class B3,
+    class A1, class A2, class A3, class A4>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
+    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4));
+}
+
+// 4
+
+template<class Rt2, class R, class T,
+    class B1, class B2, class B3, class B4,
+    class A1, class A2, class A3, class A4, class A5>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
+    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
+}
+
+template<class Rt2, class R, class T,
+    class B1, class B2, class B3, class B4,
+    class A1, class A2, class A3, class A4, class A5>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
+    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
+}
+
+// 5
+
+template<class Rt2, class R, class T,
+    class B1, class B2, class B3, class B4, class B5,
+    class A1, class A2, class A3, class A4, class A5, class A6>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
+    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
+}
+
+template<class Rt2, class R, class T,
+    class B1, class B2, class B3, class B4, class B5,
+    class A1, class A2, class A3, class A4, class A5, class A6>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
+    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
+}
+
+// 6
+
+template<class Rt2, class R, class T,
+    class B1, class B2, class B3, class B4, class B5, class B6,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
+    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
+}
+
+template<class Rt2, class R, class T,
+    class B1, class B2, class B3, class B4, class B5, class B6,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
+    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
+}
+
+// 7
+
+template<class Rt2, class R, class T,
+    class B1, class B2, class B3, class B4, class B5, class B6, class B7,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
+    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
+}
+
+template<class Rt2, class R, class T,
+    class B1, class B2, class B3, class B4, class B5, class B6, class B7,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
+    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
+}
+
+// 8
+
+template<class Rt2, class R, class T,
+    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
+    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
+}
+
+template<class Rt2, class R, class T,
+    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+    _bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
+    BOOST_BIND(ndnboost::type<Rt2>, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
+    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
+    return _bi::bind_t<Rt2, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
+}
diff --git a/ndnboost/bind/bind_mf_cc.hpp b/ndnboost/bind/bind_mf_cc.hpp
new file mode 100644
index 0000000..88be822
--- /dev/null
+++ b/ndnboost/bind/bind_mf_cc.hpp
@@ -0,0 +1,227 @@
+//
+//  bind/bind_mf_cc.hpp - support for different calling conventions
+//
+//  Do not include this header directly.
+//
+//  Copyright (c) 2001 Peter Dimov and Multi Media Ltd.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//  See http://www.boost.org/libs/bind/bind.html for documentation.
+//
+
+// 0
+
+template<class R, class T,
+    class A1>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
+    typedef typename _bi::list_av_1<A1>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1));
+}
+
+template<class R, class T,
+    class A1>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
+    typedef typename _bi::list_av_1<A1>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1));
+}
+
+// 1
+
+template<class R, class T,
+    class B1,
+    class A1, class A2>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
+    typedef typename _bi::list_av_2<A1, A2>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2));
+}
+
+template<class R, class T,
+    class B1,
+    class A1, class A2>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
+    typedef typename _bi::list_av_2<A1, A2>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2));
+}
+
+// 2
+
+template<class R, class T,
+    class B1, class B2,
+    class A1, class A2, class A3>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
+    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3));
+}
+
+template<class R, class T,
+    class B1, class B2,
+    class A1, class A2, class A3>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
+    typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3));
+}
+
+// 3
+
+template<class R, class T,
+    class B1, class B2, class B3,
+    class A1, class A2, class A3, class A4>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
+    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4));
+}
+
+template<class R, class T,
+    class B1, class B2, class B3,
+    class A1, class A2, class A3, class A4>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
+    typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4));
+}
+
+// 4
+
+template<class R, class T,
+    class B1, class B2, class B3, class B4,
+    class A1, class A2, class A3, class A4, class A5>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
+    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
+}
+
+template<class R, class T,
+    class B1, class B2, class B3, class B4,
+    class A1, class A2, class A3, class A4, class A5>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
+    typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5));
+}
+
+// 5
+
+template<class R, class T,
+    class B1, class B2, class B3, class B4, class B5,
+    class A1, class A2, class A3, class A4, class A5, class A6>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
+    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
+}
+
+template<class R, class T,
+    class B1, class B2, class B3, class B4, class B5,
+    class A1, class A2, class A3, class A4, class A5, class A6>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
+    typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6));
+}
+
+// 6
+
+template<class R, class T,
+    class B1, class B2, class B3, class B4, class B5, class B6,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
+    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
+}
+
+template<class R, class T,
+    class B1, class B2, class B3, class B4, class B5, class B6,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
+    typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7));
+}
+
+// 7
+
+template<class R, class T,
+    class B1, class B2, class B3, class B4, class B5, class B6, class B7,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
+    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
+}
+
+template<class R, class T,
+    class B1, class B2, class B3, class B4, class B5, class B6, class B7,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
+    typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8));
+}
+
+// 8
+
+template<class R, class T,
+    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
+    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
+}
+
+template<class R, class T,
+    class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
+    class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+    _bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
+    BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
+{
+    typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
+    typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
+    return _bi::bind_t<R, F, list_type>(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
+}
diff --git a/ndnboost/bind/bind_template.hpp b/ndnboost/bind/bind_template.hpp
new file mode 100644
index 0000000..6946aa9
--- /dev/null
+++ b/ndnboost/bind/bind_template.hpp
@@ -0,0 +1,345 @@
+//
+//  bind/bind_template.hpp
+//
+//  Do not include this header directly.
+//
+//  Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//  See http://www.boost.org/libs/bind/bind.html for documentation.
+//
+
+    typedef typename result_traits<R, F>::type result_type;
+
+    result_type operator()()
+    {
+        list0 a;
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    result_type operator()() const
+    {
+        list0 a;
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1> result_type operator()(A1 & a1)
+    {
+        list1<A1 &> a(a1);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1> result_type operator()(A1 & a1) const
+    {
+        list1<A1 &> a(a1);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1> result_type operator()(A1 const & a1)
+    {
+        list1<A1 const &> a(a1);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1> result_type operator()(A1 const & a1) const
+    {
+        list1<A1 const &> a(a1);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#endif
+
+    template<class A1, class A2> result_type operator()(A1 & a1, A2 & a2)
+    {
+        list2<A1 &, A2 &> a(a1, a2);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2> result_type operator()(A1 & a1, A2 & a2) const
+    {
+        list2<A1 &, A2 &> a(a1, a2);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2> result_type operator()(A1 const & a1, A2 & a2)
+    {
+        list2<A1 const &, A2 &> a(a1, a2);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2> result_type operator()(A1 const & a1, A2 & a2) const
+    {
+        list2<A1 const &, A2 &> a(a1, a2);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+
+    template<class A1, class A2> result_type operator()(A1 & a1, A2 const & a2)
+    {
+        list2<A1 &, A2 const &> a(a1, a2);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2> result_type operator()(A1 & a1, A2 const & a2) const
+    {
+        list2<A1 &, A2 const &> a(a1, a2);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+
+    template<class A1, class A2> result_type operator()(A1 const & a1, A2 const & a2)
+    {
+        list2<A1 const &, A2 const &> a(a1, a2);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2> result_type operator()(A1 const & a1, A2 const & a2) const
+    {
+        list2<A1 const &, A2 const &> a(a1, a2);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#endif
+
+    template<class A1, class A2, class A3> result_type operator()(A1 & a1, A2 & a2, A3 & a3)
+    {
+        list3<A1 &, A2 &, A3 &> a(a1, a2, a3);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3> result_type operator()(A1 & a1, A2 & a2, A3 & a3) const
+    {
+        list3<A1 &, A2 &, A3 &> a(a1, a2, a3);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3)
+    {
+        list3<A1 const &, A2 const &, A3 const &> a(a1, a2, a3);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const
+    {
+        list3<A1 const &, A2 const &, A3 const &> a(a1, a2, a3);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#endif
+
+    template<class A1, class A2, class A3, class A4> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4)
+    {
+        list4<A1 &, A2 &, A3 &, A4 &> a(a1, a2, a3, a4);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3, class A4> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const
+    {
+        list4<A1 &, A2 &, A3 &, A4 &> a(a1, a2, a3, a4);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3, class A4> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4)
+    {
+        list4<A1 const &, A2 const &, A3 const &, A4 const &> a(a1, a2, a3, a4);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3, class A4> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const
+    {
+        list4<A1 const &, A2 const &, A3 const &, A4 const &> a(a1, a2, a3, a4);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#endif
+
+    template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5)
+    {
+        list5<A1 &, A2 &, A3 &, A4 &, A5 &> a(a1, a2, a3, a4, a5);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const
+    {
+        list5<A1 &, A2 &, A3 &, A4 &, A5 &> a(a1, a2, a3, a4, a5);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5)
+    {
+        list5<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &> a(a1, a2, a3, a4, a5);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const
+    {
+        list5<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &> a(a1, a2, a3, a4, a5);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#endif
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6)
+    {
+        list6<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &> a(a1, a2, a3, a4, a5, a6);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const
+    {
+        list6<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &> a(a1, a2, a3, a4, a5, a6);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6)
+    {
+        list6<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &> a(a1, a2, a3, a4, a5, a6);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const
+    {
+        list6<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &> a(a1, a2, a3, a4, a5, a6);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#endif
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7)
+    {
+        list7<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &> a(a1, a2, a3, a4, a5, a6, a7);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const
+    {
+        list7<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &> a(a1, a2, a3, a4, a5, a6, a7);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7)
+    {
+        list7<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &> a(a1, a2, a3, a4, a5, a6, a7);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const
+    {
+        list7<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &> a(a1, a2, a3, a4, a5, a6, a7);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#endif
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8)
+    {
+        list8<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &, A8 &> a(a1, a2, a3, a4, a5, a6, a7, a8);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const
+    {
+        list8<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &, A8 &> a(a1, a2, a3, a4, a5, a6, a7, a8);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8)
+    {
+        list8<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &, A8 const &> a(a1, a2, a3, a4, a5, a6, a7, a8);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const
+    {
+        list8<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &, A8 const &> a(a1, a2, a3, a4, a5, a6, a7, a8);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#endif
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9)
+    {
+        list9<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &, A8 &, A9 &> a(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const
+    {
+        list9<A1 &, A2 &, A3 &, A4 &, A5 &, A6 &, A7 &, A8 &, A9 &> a(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9)
+    {
+        list9<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &, A8 const &, A9 const &> a(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const
+    {
+        list9<A1 const &, A2 const &, A3 const &, A4 const &, A5 const &, A6 const &, A7 const &, A8 const &, A9 const &> a(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+#endif
+
+    template<class A> result_type eval(A & a)
+    {
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class A> result_type eval(A & a) const
+    {
+        BOOST_BIND_RETURN l_(type<result_type>(), f_, a, 0);
+    }
+
+    template<class V> void accept(V & v) const
+    {
+#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ )
+
+        using ndnboost::visit_each;
+
+#endif
+        BOOST_BIND_VISIT_EACH(v, f_, 0);
+        l_.accept(v);
+    }
+
+    bool compare(this_type const & rhs) const
+    {
+        return ref_compare(f_, rhs.f_, 0) && l_ == rhs.l_;
+    }
+
+private:
+
+    F f_;
+    L l_;
diff --git a/ndnboost/bind/make_adaptable.hpp b/ndnboost/bind/make_adaptable.hpp
new file mode 100644
index 0000000..77742f0
--- /dev/null
+++ b/ndnboost/bind/make_adaptable.hpp
@@ -0,0 +1,187 @@
+#ifndef BOOST_BIND_MAKE_ADAPTABLE_HPP_INCLUDED
+#define BOOST_BIND_MAKE_ADAPTABLE_HPP_INCLUDED
+
+//
+//  make_adaptable.hpp
+//
+//  Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+namespace ndnboost
+{
+
+namespace _bi
+{
+
+template<class R, class F> class af0
+{
+public:
+
+    typedef R result_type;
+
+    explicit af0(F f): f_(f)
+    {
+    }
+
+    result_type operator()()
+    {
+        return f_();
+    }
+
+    result_type operator()() const
+    {
+        return f_();
+    }
+
+private:
+
+    F f_;
+};
+
+template<class R, class A1, class F> class af1
+{
+public:
+
+    typedef R result_type;
+    typedef A1 argument_type;
+    typedef A1 arg1_type;
+
+    explicit af1(F f): f_(f)
+    {
+    }
+
+    result_type operator()(A1 a1)
+    {
+        return f_(a1);
+    }
+
+    result_type operator()(A1 a1) const
+    {
+        return f_(a1);
+    }
+
+private:
+
+    F f_;
+};
+
+template<class R, class A1, class A2, class F> class af2
+{
+public:
+
+    typedef R result_type;
+    typedef A1 first_argument_type;
+    typedef A2 second_argument_type;
+    typedef A1 arg1_type;
+    typedef A2 arg2_type;
+
+    explicit af2(F f): f_(f)
+    {
+    }
+
+    result_type operator()(A1 a1, A2 a2)
+    {
+        return f_(a1, a2);
+    }
+
+    result_type operator()(A1 a1, A2 a2) const
+    {
+        return f_(a1, a2);
+    }
+
+private:
+
+    F f_;
+};
+
+template<class R, class A1, class A2, class A3, class F> class af3
+{
+public:
+
+    typedef R result_type;
+    typedef A1 arg1_type;
+    typedef A2 arg2_type;
+    typedef A3 arg3_type;
+
+    explicit af3(F f): f_(f)
+    {
+    }
+
+    result_type operator()(A1 a1, A2 a2, A3 a3)
+    {
+        return f_(a1, a2, a3);
+    }
+
+    result_type operator()(A1 a1, A2 a2, A3 a3) const
+    {
+        return f_(a1, a2, a3);
+    }
+
+private:
+
+    F f_;
+};
+
+template<class R, class A1, class A2, class A3, class A4, class F> class af4
+{
+public:
+
+    typedef R result_type;
+    typedef A1 arg1_type;
+    typedef A2 arg2_type;
+    typedef A3 arg3_type;
+    typedef A4 arg4_type;
+
+    explicit af4(F f): f_(f)
+    {
+    }
+
+    result_type operator()(A1 a1, A2 a2, A3 a3, A4 a4)
+    {
+        return f_(a1, a2, a3, a4);
+    }
+
+    result_type operator()(A1 a1, A2 a2, A3 a3, A4 a4) const
+    {
+        return f_(a1, a2, a3, a4);
+    }
+
+private:
+
+    F f_;
+};
+
+} // namespace _bi
+
+template<class R, class F> _bi::af0<R, F> make_adaptable(F f)
+{
+    return _bi::af0<R, F>(f);
+}
+
+template<class R, class A1, class F> _bi::af1<R, A1, F> make_adaptable(F f)
+{
+    return _bi::af1<R, A1, F>(f);
+}
+
+template<class R, class A1, class A2, class F> _bi::af2<R, A1, A2, F> make_adaptable(F f)
+{
+    return _bi::af2<R, A1, A2, F>(f);
+}
+
+template<class R, class A1, class A2, class A3, class F> _bi::af3<R, A1, A2, A3, F> make_adaptable(F f)
+{
+    return _bi::af3<R, A1, A2, A3, F>(f);
+}
+
+template<class R, class A1, class A2, class A3, class A4, class F> _bi::af4<R, A1, A2, A3, A4, F> make_adaptable(F f)
+{
+    return _bi::af4<R, A1, A2, A3, A4, F>(f);
+}
+
+} // namespace ndnboost
+
+#endif // #ifndef BOOST_BIND_MAKE_ADAPTABLE_HPP_INCLUDED
diff --git a/ndnboost/bind/placeholders.hpp b/ndnboost/bind/placeholders.hpp
new file mode 100644
index 0000000..0b9f0fc
--- /dev/null
+++ b/ndnboost/bind/placeholders.hpp
@@ -0,0 +1,69 @@
+#ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
+#define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+//  bind/placeholders.hpp - _N definitions
+//
+//  Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//  See http://www.boost.org/libs/bind/bind.html for documentation.
+//
+
+#include <ndnboost/bind/arg.hpp>
+#include <ndnboost/config.hpp>
+
+namespace
+{
+
+#if defined(__BORLANDC__) || defined(__GNUC__) && (__GNUC__ < 4)
+
+static inline ndnboost::arg<1> _1() { return ndnboost::arg<1>(); }
+static inline ndnboost::arg<2> _2() { return ndnboost::arg<2>(); }
+static inline ndnboost::arg<3> _3() { return ndnboost::arg<3>(); }
+static inline ndnboost::arg<4> _4() { return ndnboost::arg<4>(); }
+static inline ndnboost::arg<5> _5() { return ndnboost::arg<5>(); }
+static inline ndnboost::arg<6> _6() { return ndnboost::arg<6>(); }
+static inline ndnboost::arg<7> _7() { return ndnboost::arg<7>(); }
+static inline ndnboost::arg<8> _8() { return ndnboost::arg<8>(); }
+static inline ndnboost::arg<9> _9() { return ndnboost::arg<9>(); }
+
+#elif defined(BOOST_MSVC) || (defined(__DECCXX_VER) && __DECCXX_VER <= 60590031) || defined(__MWERKS__) || \
+    defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 2)  
+
+static ndnboost::arg<1> _1;
+static ndnboost::arg<2> _2;
+static ndnboost::arg<3> _3;
+static ndnboost::arg<4> _4;
+static ndnboost::arg<5> _5;
+static ndnboost::arg<6> _6;
+static ndnboost::arg<7> _7;
+static ndnboost::arg<8> _8;
+static ndnboost::arg<9> _9;
+
+#else
+
+ndnboost::arg<1> _1;
+ndnboost::arg<2> _2;
+ndnboost::arg<3> _3;
+ndnboost::arg<4> _4;
+ndnboost::arg<5> _5;
+ndnboost::arg<6> _6;
+ndnboost::arg<7> _7;
+ndnboost::arg<8> _8;
+ndnboost::arg<9> _9;
+
+#endif
+
+} // unnamed namespace
+
+#endif // #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
diff --git a/ndnboost/bind/protect.hpp b/ndnboost/bind/protect.hpp
new file mode 100644
index 0000000..4d70f84
--- /dev/null
+++ b/ndnboost/bind/protect.hpp
@@ -0,0 +1,304 @@
+#ifndef BOOST_BIND_PROTECT_HPP_INCLUDED
+#define BOOST_BIND_PROTECT_HPP_INCLUDED
+
+//
+//  protect.hpp
+//
+//  Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+//  Copyright (c) 2009 Steven Watanabe
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/detail/workaround.hpp>
+
+namespace ndnboost
+{
+
+namespace _bi
+{
+
+template<class F> class protected_bind_t
+{
+public:
+
+    typedef typename F::result_type result_type;
+
+    explicit protected_bind_t(F f): f_(f)
+    {
+    }
+
+    result_type operator()()
+    {
+        return f_();
+    }
+
+    result_type operator()() const
+    {
+        return f_();
+    }
+
+    template<class A1> result_type operator()(A1 & a1)
+    {
+        return f_(a1);
+    }
+
+    template<class A1> result_type operator()(A1 & a1) const
+    {
+        return f_(a1);
+    }
+
+
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1> result_type operator()(const A1 & a1)
+    {
+        return f_(a1);
+    }
+
+    template<class A1> result_type operator()(const A1 & a1) const
+    {
+        return f_(a1);
+    }
+
+#endif
+
+    template<class A1, class A2> result_type operator()(A1 & a1, A2 & a2)
+    {
+        return f_(a1, a2);
+    }
+
+    template<class A1, class A2> result_type operator()(A1 & a1, A2 & a2) const
+    {
+        return f_(a1, a2);
+    }
+
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2> result_type operator()(A1 const & a1, A2 & a2)
+    {
+        return f_(a1, a2);
+    }
+
+    template<class A1, class A2> result_type operator()(A1 const & a1, A2 & a2) const
+    {
+        return f_(a1, a2);
+    }
+
+    template<class A1, class A2> result_type operator()(A1 & a1, A2 const & a2)
+    {
+        return f_(a1, a2);
+    }
+
+    template<class A1, class A2> result_type operator()(A1 & a1, A2 const & a2) const
+    {
+        return f_(a1, a2);
+    }
+
+    template<class A1, class A2> result_type operator()(A1 const & a1, A2 const & a2)
+    {
+        return f_(a1, a2);
+    }
+
+    template<class A1, class A2> result_type operator()(A1 const & a1, A2 const & a2) const
+    {
+        return f_(a1, a2);
+    }
+
+#endif
+
+    template<class A1, class A2, class A3> result_type operator()(A1 & a1, A2 & a2, A3 & a3)
+    {
+        return f_(a1, a2, a3);
+    }
+
+    template<class A1, class A2, class A3> result_type operator()(A1 & a1, A2 & a2, A3 & a3) const
+    {
+        return f_(a1, a2, a3);
+    }
+    
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3)
+    {
+        return f_(a1, a2, a3);
+    }
+
+    template<class A1, class A2, class A3> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const
+    {
+        return f_(a1, a2, a3);
+    }
+    
+#endif
+
+    template<class A1, class A2, class A3, class A4> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4)
+    {
+        return f_(a1, a2, a3, a4);
+    }
+
+    template<class A1, class A2, class A3, class A4> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const
+    {
+        return f_(a1, a2, a3, a4);
+    }
+    
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3, class A4> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4)
+    {
+        return f_(a1, a2, a3, a4);
+    }
+
+    template<class A1, class A2, class A3, class A4> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const
+    {
+        return f_(a1, a2, a3, a4);
+    }
+
+#endif
+
+    template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5)
+    {
+        return f_(a1, a2, a3, a4, a5);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const
+    {
+        return f_(a1, a2, a3, a4, a5);
+    }
+    
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5)
+    {
+        return f_(a1, a2, a3, a4, a5);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const
+    {
+        return f_(a1, a2, a3, a4, a5);
+    }
+
+#endif
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6)
+    {
+        return f_(a1, a2, a3, a4, a5, a6);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const
+    {
+        return f_(a1, a2, a3, a4, a5, a6);
+    }
+    
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6)
+    {
+        return f_(a1, a2, a3, a4, a5, a6);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const
+    {
+        return f_(a1, a2, a3, a4, a5, a6);
+    }
+
+#endif
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7)
+    {
+        return f_(a1, a2, a3, a4, a5, a6, a7);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const
+    {
+        return f_(a1, a2, a3, a4, a5, a6, a7);
+    }
+    
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7)
+    {
+        return f_(a1, a2, a3, a4, a5, a6, a7);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const
+    {
+        return f_(a1, a2, a3, a4, a5, a6, a7);
+    }
+
+#endif
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8)
+    {
+        return f_(a1, a2, a3, a4, a5, a6, a7, a8);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const
+    {
+        return f_(a1, a2, a3, a4, a5, a6, a7, a8);
+    }
+    
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8)
+    {
+        return f_(a1, a2, a3, a4, a5, a6, a7, a8);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const
+    {
+        return f_(a1, a2, a3, a4, a5, a6, a7, a8);
+    }
+
+#endif
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9)
+    {
+        return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const
+    {
+        return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+    }
+    
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
+ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9)
+    {
+        return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+    }
+
+    template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const
+    {
+        return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+    }
+
+#endif
+
+private:
+
+    F f_;
+};
+
+} // namespace _bi
+
+template<class F> _bi::protected_bind_t<F> protect(F f)
+{
+    return _bi::protected_bind_t<F>(f);
+}
+
+} // namespace ndnboost
+
+#endif // #ifndef BOOST_BIND_PROTECT_HPP_INCLUDED
diff --git a/ndnboost/bind/storage.hpp b/ndnboost/bind/storage.hpp
new file mode 100644
index 0000000..5a97f4a
--- /dev/null
+++ b/ndnboost/bind/storage.hpp
@@ -0,0 +1,475 @@
+#ifndef BOOST_BIND_STORAGE_HPP_INCLUDED
+#define BOOST_BIND_STORAGE_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+//  bind/storage.hpp
+//
+//  boost/bind.hpp support header, optimized storage
+//
+//  Copyright (c) 2006 Peter Dimov
+//
+//  Distributed under the Boost Software License, Version 1.0.
+//  See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt
+//
+//  See http://www.boost.org/libs/bind/bind.html for documentation.
+//
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/bind/arg.hpp>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4512) // assignment operator could not be generated
+#endif
+
+namespace ndnboost
+{
+
+namespace _bi
+{
+
+// 1
+
+template<class A1> struct storage1
+{
+    explicit storage1( A1 a1 ): a1_( a1 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        BOOST_BIND_VISIT_EACH(v, a1_, 0);
+    }
+
+    A1 a1_;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( __BORLANDC__ )
+
+template<int I> struct storage1< ndnboost::arg<I> >
+{
+    explicit storage1( ndnboost::arg<I> ) {}
+
+    template<class V> void accept(V &) const { }
+
+    static ndnboost::arg<I> a1_() { return ndnboost::arg<I>(); }
+};
+
+template<int I> struct storage1< ndnboost::arg<I> (*) () >
+{
+    explicit storage1( ndnboost::arg<I> (*) () ) {}
+
+    template<class V> void accept(V &) const { }
+
+    static ndnboost::arg<I> a1_() { return ndnboost::arg<I>(); }
+};
+
+#endif
+
+// 2
+
+template<class A1, class A2> struct storage2: public storage1<A1>
+{
+    typedef storage1<A1> inherited;
+
+    storage2( A1 a1, A2 a2 ): storage1<A1>( a1 ), a2_( a2 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+        BOOST_BIND_VISIT_EACH(v, a2_, 0);
+    }
+
+    A2 a2_;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template<class A1, int I> struct storage2< A1, ndnboost::arg<I> >: public storage1<A1>
+{
+    typedef storage1<A1> inherited;
+
+    storage2( A1 a1, ndnboost::arg<I> ): storage1<A1>( a1 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a2_() { return ndnboost::arg<I>(); }
+};
+
+template<class A1, int I> struct storage2< A1, ndnboost::arg<I> (*) () >: public storage1<A1>
+{
+    typedef storage1<A1> inherited;
+
+    storage2( A1 a1, ndnboost::arg<I> (*) () ): storage1<A1>( a1 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a2_() { return ndnboost::arg<I>(); }
+};
+
+#endif
+
+// 3
+
+template<class A1, class A2, class A3> struct storage3: public storage2< A1, A2 >
+{
+    typedef storage2<A1, A2> inherited;
+
+    storage3( A1 a1, A2 a2, A3 a3 ): storage2<A1, A2>( a1, a2 ), a3_( a3 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+        BOOST_BIND_VISIT_EACH(v, a3_, 0);
+    }
+
+    A3 a3_;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template<class A1, class A2, int I> struct storage3< A1, A2, ndnboost::arg<I> >: public storage2< A1, A2 >
+{
+    typedef storage2<A1, A2> inherited;
+
+    storage3( A1 a1, A2 a2, ndnboost::arg<I> ): storage2<A1, A2>( a1, a2 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a3_() { return ndnboost::arg<I>(); }
+};
+
+template<class A1, class A2, int I> struct storage3< A1, A2, ndnboost::arg<I> (*) () >: public storage2< A1, A2 >
+{
+    typedef storage2<A1, A2> inherited;
+
+    storage3( A1 a1, A2 a2, ndnboost::arg<I> (*) () ): storage2<A1, A2>( a1, a2 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a3_() { return ndnboost::arg<I>(); }
+};
+
+#endif
+
+// 4
+
+template<class A1, class A2, class A3, class A4> struct storage4: public storage3< A1, A2, A3 >
+{
+    typedef storage3<A1, A2, A3> inherited;
+
+    storage4( A1 a1, A2 a2, A3 a3, A4 a4 ): storage3<A1, A2, A3>( a1, a2, a3 ), a4_( a4 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+        BOOST_BIND_VISIT_EACH(v, a4_, 0);
+    }
+
+    A4 a4_;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template<class A1, class A2, class A3, int I> struct storage4< A1, A2, A3, ndnboost::arg<I> >: public storage3< A1, A2, A3 >
+{
+    typedef storage3<A1, A2, A3> inherited;
+
+    storage4( A1 a1, A2 a2, A3 a3, ndnboost::arg<I> ): storage3<A1, A2, A3>( a1, a2, a3 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a4_() { return ndnboost::arg<I>(); }
+};
+
+template<class A1, class A2, class A3, int I> struct storage4< A1, A2, A3, ndnboost::arg<I> (*) () >: public storage3< A1, A2, A3 >
+{
+    typedef storage3<A1, A2, A3> inherited;
+
+    storage4( A1 a1, A2 a2, A3 a3, ndnboost::arg<I> (*) () ): storage3<A1, A2, A3>( a1, a2, a3 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a4_() { return ndnboost::arg<I>(); }
+};
+
+#endif
+
+// 5
+
+template<class A1, class A2, class A3, class A4, class A5> struct storage5: public storage4< A1, A2, A3, A4 >
+{
+    typedef storage4<A1, A2, A3, A4> inherited;
+
+    storage5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): storage4<A1, A2, A3, A4>( a1, a2, a3, a4 ), a5_( a5 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+        BOOST_BIND_VISIT_EACH(v, a5_, 0);
+    }
+
+    A5 a5_;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template<class A1, class A2, class A3, class A4, int I> struct storage5< A1, A2, A3, A4, ndnboost::arg<I> >: public storage4< A1, A2, A3, A4 >
+{
+    typedef storage4<A1, A2, A3, A4> inherited;
+
+    storage5( A1 a1, A2 a2, A3 a3, A4 a4, ndnboost::arg<I> ): storage4<A1, A2, A3, A4>( a1, a2, a3, a4 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a5_() { return ndnboost::arg<I>(); }
+};
+
+template<class A1, class A2, class A3, class A4, int I> struct storage5< A1, A2, A3, A4, ndnboost::arg<I> (*) () >: public storage4< A1, A2, A3, A4 >
+{
+    typedef storage4<A1, A2, A3, A4> inherited;
+
+    storage5( A1 a1, A2 a2, A3 a3, A4 a4, ndnboost::arg<I> (*) () ): storage4<A1, A2, A3, A4>( a1, a2, a3, a4 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a5_() { return ndnboost::arg<I>(); }
+};
+
+#endif
+
+// 6
+
+template<class A1, class A2, class A3, class A4, class A5, class A6> struct storage6: public storage5< A1, A2, A3, A4, A5 >
+{
+    typedef storage5<A1, A2, A3, A4, A5> inherited;
+
+    storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): storage5<A1, A2, A3, A4, A5>( a1, a2, a3, a4, a5 ), a6_( a6 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+        BOOST_BIND_VISIT_EACH(v, a6_, 0);
+    }
+
+    A6 a6_;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template<class A1, class A2, class A3, class A4, class A5, int I> struct storage6< A1, A2, A3, A4, A5, ndnboost::arg<I> >: public storage5< A1, A2, A3, A4, A5 >
+{
+    typedef storage5<A1, A2, A3, A4, A5> inherited;
+
+    storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, ndnboost::arg<I> ): storage5<A1, A2, A3, A4, A5>( a1, a2, a3, a4, a5 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a6_() { return ndnboost::arg<I>(); }
+};
+
+template<class A1, class A2, class A3, class A4, class A5, int I> struct storage6< A1, A2, A3, A4, A5, ndnboost::arg<I> (*) () >: public storage5< A1, A2, A3, A4, A5 >
+{
+    typedef storage5<A1, A2, A3, A4, A5> inherited;
+
+    storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, ndnboost::arg<I> (*) () ): storage5<A1, A2, A3, A4, A5>( a1, a2, a3, a4, a5 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a6_() { return ndnboost::arg<I>(); }
+};
+
+#endif
+
+// 7
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> struct storage7: public storage6< A1, A2, A3, A4, A5, A6 >
+{
+    typedef storage6<A1, A2, A3, A4, A5, A6> inherited;
+
+    storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): storage6<A1, A2, A3, A4, A5, A6>( a1, a2, a3, a4, a5, a6 ), a7_( a7 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+        BOOST_BIND_VISIT_EACH(v, a7_, 0);
+    }
+
+    A7 a7_;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, int I> struct storage7< A1, A2, A3, A4, A5, A6, ndnboost::arg<I> >: public storage6< A1, A2, A3, A4, A5, A6 >
+{
+    typedef storage6<A1, A2, A3, A4, A5, A6> inherited;
+
+    storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, ndnboost::arg<I> ): storage6<A1, A2, A3, A4, A5, A6>( a1, a2, a3, a4, a5, a6 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a7_() { return ndnboost::arg<I>(); }
+};
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, int I> struct storage7< A1, A2, A3, A4, A5, A6, ndnboost::arg<I> (*) () >: public storage6< A1, A2, A3, A4, A5, A6 >
+{
+    typedef storage6<A1, A2, A3, A4, A5, A6> inherited;
+
+    storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, ndnboost::arg<I> (*) () ): storage6<A1, A2, A3, A4, A5, A6>( a1, a2, a3, a4, a5, a6 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a7_() { return ndnboost::arg<I>(); }
+};
+
+#endif
+
+// 8
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> struct storage8: public storage7< A1, A2, A3, A4, A5, A6, A7 >
+{
+    typedef storage7<A1, A2, A3, A4, A5, A6, A7> inherited;
+
+    storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): storage7<A1, A2, A3, A4, A5, A6, A7>( a1, a2, a3, a4, a5, a6, a7 ), a8_( a8 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+        BOOST_BIND_VISIT_EACH(v, a8_, 0);
+    }
+
+    A8 a8_;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, int I> struct storage8< A1, A2, A3, A4, A5, A6, A7, ndnboost::arg<I> >: public storage7< A1, A2, A3, A4, A5, A6, A7 >
+{
+    typedef storage7<A1, A2, A3, A4, A5, A6, A7> inherited;
+
+    storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, ndnboost::arg<I> ): storage7<A1, A2, A3, A4, A5, A6, A7>( a1, a2, a3, a4, a5, a6, a7 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a8_() { return ndnboost::arg<I>(); }
+};
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, int I> struct storage8< A1, A2, A3, A4, A5, A6, A7, ndnboost::arg<I> (*) () >: public storage7< A1, A2, A3, A4, A5, A6, A7 >
+{
+    typedef storage7<A1, A2, A3, A4, A5, A6, A7> inherited;
+
+    storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, ndnboost::arg<I> (*) () ): storage7<A1, A2, A3, A4, A5, A6, A7>( a1, a2, a3, a4, a5, a6, a7 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a8_() { return ndnboost::arg<I>(); }
+};
+
+#endif
+
+// 9
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> struct storage9: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 >
+{
+    typedef storage8<A1, A2, A3, A4, A5, A6, A7, A8> inherited;
+
+    storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): storage8<A1, A2, A3, A4, A5, A6, A7, A8>( a1, a2, a3, a4, a5, a6, a7, a8 ), a9_( a9 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+        BOOST_BIND_VISIT_EACH(v, a9_, 0);
+    }
+
+    A9 a9_;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, int I> struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, ndnboost::arg<I> >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 >
+{
+    typedef storage8<A1, A2, A3, A4, A5, A6, A7, A8> inherited;
+
+    storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, ndnboost::arg<I> ): storage8<A1, A2, A3, A4, A5, A6, A7, A8>( a1, a2, a3, a4, a5, a6, a7, a8 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a9_() { return ndnboost::arg<I>(); }
+};
+
+template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, int I> struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, ndnboost::arg<I> (*) () >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 >
+{
+    typedef storage8<A1, A2, A3, A4, A5, A6, A7, A8> inherited;
+
+    storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, ndnboost::arg<I> (*) () ): storage8<A1, A2, A3, A4, A5, A6, A7, A8>( a1, a2, a3, a4, a5, a6, a7, a8 ) {}
+
+    template<class V> void accept(V & v) const
+    {
+        inherited::accept(v);
+    }
+
+    static ndnboost::arg<I> a9_() { return ndnboost::arg<I>(); }
+};
+
+#endif
+
+} // namespace _bi
+
+} // namespace ndnboost
+
+#ifdef BOOST_MSVC
+# pragma warning(default: 4512) // assignment operator could not be generated
+# pragma warning(pop)
+#endif
+
+#endif // #ifndef BOOST_BIND_STORAGE_HPP_INCLUDED
diff --git a/ndnboost/concept/assert.hpp b/ndnboost/concept/assert.hpp
new file mode 100644
index 0000000..148c5ad
--- /dev/null
+++ b/ndnboost/concept/assert.hpp
@@ -0,0 +1,46 @@
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP
+# define BOOST_CONCEPT_ASSERT_DWA2006430_HPP
+
+# include <ndnboost/config.hpp>
+# include <ndnboost/detail/workaround.hpp>
+
+// The old protocol used a constraints() member function in concept
+// checking classes.  If the compiler supports SFINAE, we can detect
+// that function and seamlessly support the old concept checking
+// classes.  In this release, backward compatibility with the old
+// concept checking classes is enabled by default, where available.
+// The old protocol is deprecated, though, and backward compatibility
+// will no longer be the default in the next release.
+
+# if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT)                                         \
+    && !defined(BOOST_NO_SFINAE)                                                    \
+                                                                                    \
+    && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4)) \
+    && !(BOOST_WORKAROUND(__GNUC__, == 2))
+
+// Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to
+// check for the presence of particularmember functions.
+
+#  define BOOST_OLD_CONCEPT_SUPPORT
+
+# endif
+
+# ifdef BOOST_MSVC
+#  include <ndnboost/concept/detail/msvc.hpp>
+# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+#  include <ndnboost/concept/detail/borland.hpp>
+# else 
+#  include <ndnboost/concept/detail/general.hpp>
+# endif
+
+  // Usage, in class or function context:
+  //
+  //     BOOST_CONCEPT_ASSERT((UnaryFunctionConcept<F,bool,int>));
+  //
+# define BOOST_CONCEPT_ASSERT(ModelInParens) \
+    BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
+
+#endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP
diff --git a/ndnboost/concept/detail/backward_compatibility.hpp b/ndnboost/concept/detail/backward_compatibility.hpp
new file mode 100644
index 0000000..f284564
--- /dev/null
+++ b/ndnboost/concept/detail/backward_compatibility.hpp
@@ -0,0 +1,16 @@
+// Copyright David Abrahams 2009. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
+# define BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
+
+namespace ndnboost
+{
+  namespace concepts {}
+
+# if defined(BOOST_HAS_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD)
+  namespace concept = concepts;
+# endif 
+} // namespace ndnboost::concept
+
+#endif // BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
diff --git a/ndnboost/concept/detail/borland.hpp b/ndnboost/concept/detail/borland.hpp
new file mode 100644
index 0000000..ade28ca
--- /dev/null
+++ b/ndnboost/concept/detail/borland.hpp
@@ -0,0 +1,30 @@
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
+# define BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
+
+# include <ndnboost/preprocessor/cat.hpp>
+# include <ndnboost/concept/detail/backward_compatibility.hpp>
+
+namespace ndnboost { namespace concepts {
+
+template <class ModelFnPtr>
+struct require;
+
+template <class Model>
+struct require<void(*)(Model)>
+{
+    enum { instantiate = sizeof((((Model*)0)->~Model()), 3) };
+};
+
+#  define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr )         \
+  enum                                                  \
+  {                                                     \
+      BOOST_PP_CAT(boost_concept_check,__LINE__) =      \
+      ndnboost::concepts::require<ModelFnPtr>::instantiate  \
+  }
+
+}} // namespace ndnboost::concept
+
+#endif // BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
diff --git a/ndnboost/concept/detail/concept_def.hpp b/ndnboost/concept/detail/concept_def.hpp
new file mode 100644
index 0000000..59da034
--- /dev/null
+++ b/ndnboost/concept/detail/concept_def.hpp
@@ -0,0 +1,51 @@
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP
+# define BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP
+# include <ndnboost/preprocessor/seq/for_each_i.hpp>
+# include <ndnboost/preprocessor/seq/enum.hpp>
+# include <ndnboost/preprocessor/comma_if.hpp>
+# include <ndnboost/preprocessor/cat.hpp>
+#endif // BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP
+
+// BOOST_concept(SomeName, (p1)(p2)...(pN))
+//
+// Expands to "template <class p1, class p2, ...class pN> struct SomeName"
+//
+// Also defines an equivalent SomeNameConcept for backward compatibility.
+// Maybe in the next release we can kill off the "Concept" suffix for good.
+#if BOOST_WORKAROUND(__GNUC__, <= 3)
+# define BOOST_concept(name, params)                                            \
+    template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) >       \
+    struct name; /* forward declaration */                                      \
+                                                                                \
+    template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) >       \
+    struct BOOST_PP_CAT(name,Concept)                                           \
+      : name< BOOST_PP_SEQ_ENUM(params) >                                       \
+    {                                                                           \
+        /* at least 2.96 and 3.4.3 both need this */                            \
+        BOOST_PP_CAT(name,Concept)();                                           \
+    };                                                                          \
+                                                                                \
+    template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) >       \
+    struct name                                                                
+#else
+# define BOOST_concept(name, params)                                            \
+    template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) >       \
+    struct name; /* forward declaration */                                      \
+                                                                                \
+    template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) >       \
+    struct BOOST_PP_CAT(name,Concept)                                           \
+      : name< BOOST_PP_SEQ_ENUM(params) >                                       \
+    {                                                                           \
+    };                                                                          \
+                                                                                \
+    template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) >       \
+    struct name                                                                
+#endif
+    
+// Helper for BOOST_concept, above.
+# define BOOST_CONCEPT_typename(r, ignored, index, t) \
+    BOOST_PP_COMMA_IF(index) typename t
+
diff --git a/ndnboost/concept/detail/concept_undef.hpp b/ndnboost/concept/detail/concept_undef.hpp
new file mode 100644
index 0000000..713db89
--- /dev/null
+++ b/ndnboost/concept/detail/concept_undef.hpp
@@ -0,0 +1,5 @@
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+# undef BOOST_concept_typename
+# undef BOOST_concept
diff --git a/ndnboost/concept/detail/general.hpp b/ndnboost/concept/detail/general.hpp
new file mode 100644
index 0000000..defbf03
--- /dev/null
+++ b/ndnboost/concept/detail/general.hpp
@@ -0,0 +1,75 @@
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
+# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
+
+# include <ndnboost/preprocessor/cat.hpp>
+# include <ndnboost/concept/detail/backward_compatibility.hpp>
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+#  include <ndnboost/concept/detail/has_constraints.hpp>
+#  include <ndnboost/mpl/if.hpp>
+# endif
+
+// This implementation works on Comeau and GCC, all the way back to
+// 2.95
+namespace ndnboost { namespace concepts {
+
+template <class ModelFn>
+struct requirement_;
+
+namespace detail
+{
+  template <void(*)()> struct instantiate {};
+}
+
+template <class Model>
+struct requirement
+{
+    static void failed() { ((Model*)0)->~Model(); }
+};
+
+struct failed {};
+
+template <class Model>
+struct requirement<failed ************ Model::************>
+{
+    static void failed() { ((Model*)0)->~Model(); }
+};
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+
+template <class Model>
+struct constraint
+{
+    static void failed() { ((Model*)0)->constraints(); }
+};
+  
+template <class Model>
+struct requirement_<void(*)(Model)>
+  : mpl::if_<
+        concepts::not_satisfied<Model>
+      , constraint<Model>
+      , requirement<failed ************ Model::************>
+    >::type
+{};
+  
+# else
+
+// For GCC-2.x, these can't have exactly the same name
+template <class Model>
+struct requirement_<void(*)(Model)>
+    : requirement<failed ************ Model::************>
+{};
+  
+# endif
+
+#  define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr )             \
+    typedef ::ndnboost::concepts::detail::instantiate<          \
+    &::ndnboost::concepts::requirement_<ModelFnPtr>::failed>    \
+      BOOST_PP_CAT(boost_concept_check,__LINE__)
+
+}}
+
+#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
diff --git a/ndnboost/concept/detail/has_constraints.hpp b/ndnboost/concept/detail/has_constraints.hpp
new file mode 100644
index 0000000..d70515e
--- /dev/null
+++ b/ndnboost/concept/detail/has_constraints.hpp
@@ -0,0 +1,50 @@
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
+# define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
+
+# include <ndnboost/mpl/bool.hpp>
+# include <ndnboost/detail/workaround.hpp>
+# include <ndnboost/concept/detail/backward_compatibility.hpp>
+
+namespace ndnboost { namespace concepts {
+
+namespace detail
+{ 
+
+// Here we implement the metafunction that detects whether a
+// constraints metafunction exists
+  typedef char yes;
+  typedef char (&no)[2];
+
+  template <class Model, void (Model::*)()>
+  struct wrap_constraints {};
+    
+#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__)
+  // Work around the following bogus error in Sun Studio 11, by
+  // turning off the has_constraints function entirely:
+  //    Error: complex expression not allowed in dependent template
+  //    argument expression
+  inline no has_constraints_(...);
+#else
+  template <class Model>
+  inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0);
+  inline no has_constraints_(...);
+#endif
+}
+
+// This would be called "detail::has_constraints," but it has a strong
+// tendency to show up in error messages.
+template <class Model>
+struct not_satisfied
+{
+    BOOST_STATIC_CONSTANT(
+        bool
+      , value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes) );
+    typedef mpl::bool_<value> type;
+};
+
+}} // namespace ndnboost::concepts::detail
+
+#endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
diff --git a/ndnboost/concept/detail/msvc.hpp b/ndnboost/concept/detail/msvc.hpp
new file mode 100644
index 0000000..c11e949
--- /dev/null
+++ b/ndnboost/concept/detail/msvc.hpp
@@ -0,0 +1,114 @@
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
+# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
+
+# include <ndnboost/preprocessor/cat.hpp>
+# include <ndnboost/concept/detail/backward_compatibility.hpp>
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+#  include <ndnboost/concept/detail/has_constraints.hpp>
+#  include <ndnboost/mpl/if.hpp>
+# endif
+
+
+namespace ndnboost { namespace concepts {
+
+
+template <class Model>
+struct check
+{
+    virtual void failed(Model* x)
+    {
+        x->~Model();
+    }
+};
+
+# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
+struct failed {};
+template <class Model>
+struct check<failed ************ Model::************>
+{
+    virtual void failed(Model* x)
+    {
+        x->~Model();
+    }
+};
+# endif
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+  
+namespace detail
+{
+  // No need for a virtual function here, since evaluating
+  // not_satisfied below will have already instantiated the
+  // constraints() member.
+  struct constraint {};
+}
+
+template <class Model>
+struct require
+  : mpl::if_c<
+        not_satisfied<Model>::value
+      , detail::constraint
+# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
+      , check<Model>
+# else
+      , check<failed ************ Model::************>
+# endif 
+        >::type
+{};
+      
+# else
+  
+template <class Model>
+struct require
+# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
+    : check<Model>
+# else
+    : check<failed ************ Model::************>
+# endif 
+{};
+  
+# endif
+    
+# if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+
+//
+// The iterator library sees some really strange errors unless we
+// do things this way.
+//
+template <class Model>
+struct require<void(*)(Model)>
+{
+    virtual void failed(Model*)
+    {
+        require<Model>();
+    }
+};
+
+# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr )      \
+enum                                                \
+{                                                   \
+    BOOST_PP_CAT(boost_concept_check,__LINE__) =    \
+    sizeof(::ndnboost::concepts::require<ModelFnPtr>)    \
+}
+  
+# else // Not vc-7.1
+  
+template <class Model>
+require<Model>
+require_(void(*)(Model));
+  
+# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr )          \
+enum                                                    \
+{                                                       \
+    BOOST_PP_CAT(boost_concept_check,__LINE__) =        \
+      sizeof(::ndnboost::concepts::require_((ModelFnPtr)0)) \
+}
+  
+# endif
+}}
+
+#endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
diff --git a/ndnboost/concept/usage.hpp b/ndnboost/concept/usage.hpp
new file mode 100644
index 0000000..085cdd9
--- /dev/null
+++ b/ndnboost/concept/usage.hpp
@@ -0,0 +1,44 @@
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_USAGE_DWA2006919_HPP
+# define BOOST_CONCEPT_USAGE_DWA2006919_HPP
+
+# include <ndnboost/concept/assert.hpp>
+# include <ndnboost/detail/workaround.hpp>
+# include <ndnboost/concept/detail/backward_compatibility.hpp>
+
+namespace ndnboost { namespace concepts { 
+
+# if BOOST_WORKAROUND(__GNUC__, == 2)
+
+#  define BOOST_CONCEPT_USAGE(model) ~model()
+
+# else 
+
+template <class Model>
+struct usage_requirements
+{
+    ~usage_requirements() { ((Model*)0)->~Model(); }
+};
+
+#  if BOOST_WORKAROUND(__GNUC__, <= 3)
+
+#   define BOOST_CONCEPT_USAGE(model)                                    \
+      model(); /* at least 2.96 and 3.4.3 both need this :( */           \
+      BOOST_CONCEPT_ASSERT((ndnboost::concepts::usage_requirements<model>)); \
+      ~model()
+
+#  else
+
+#   define BOOST_CONCEPT_USAGE(model)                                    \
+      BOOST_CONCEPT_ASSERT((ndnboost::concepts::usage_requirements<model>)); \
+      ~model()
+
+#  endif
+
+# endif 
+
+}} // namespace ndnboost::concepts
+
+#endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP
diff --git a/ndnboost/concept_check.hpp b/ndnboost/concept_check.hpp
new file mode 100644
index 0000000..0b7bf54
--- /dev/null
+++ b/ndnboost/concept_check.hpp
@@ -0,0 +1,1083 @@
+//
+// (C) Copyright Jeremy Siek 2000.
+// Copyright 2002 The Trustees of Indiana University.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Revision History:
+//   05 May   2001: Workarounds for HP aCC from Thomas Matelich. (Jeremy Siek)
+//   02 April 2001: Removed limits header altogether. (Jeremy Siek)
+//   01 April 2001: Modified to use new <ndnboost/limits.hpp> header. (JMaddock)
+//
+
+// See http://www.boost.org/libs/concept_check for documentation.
+
+#ifndef BOOST_CONCEPT_CHECKS_HPP
+# define BOOST_CONCEPT_CHECKS_HPP
+
+# include <ndnboost/concept/assert.hpp>
+
+# include <ndnboost/iterator.hpp>
+# include <ndnboost/type_traits/conversion_traits.hpp>
+# include <utility>
+# include <ndnboost/type_traits/is_same.hpp>
+# include <ndnboost/type_traits/is_void.hpp>
+# include <ndnboost/mpl/assert.hpp>
+# include <ndnboost/mpl/bool.hpp>
+# include <ndnboost/detail/workaround.hpp>
+# include <ndnboost/detail/iterator.hpp>
+
+# include <ndnboost/concept/usage.hpp>
+# include <ndnboost/concept/detail/concept_def.hpp>
+
+namespace ndnboost
+{
+
+  //
+  // Backward compatibility
+  //
+
+  template <class Model>
+  inline void function_requires(Model* = 0)
+  {
+      BOOST_CONCEPT_ASSERT((Model));
+  }
+  template <class T> inline void ignore_unused_variable_warning(T const&) {}
+
+#  define BOOST_CLASS_REQUIRE(type_var, ns, concept)    \
+    BOOST_CONCEPT_ASSERT((ns::concept<type_var>))
+
+#  define BOOST_CLASS_REQUIRE2(type_var1, type_var2, ns, concept)   \
+    BOOST_CONCEPT_ASSERT((ns::concept<type_var1,type_var2>))
+
+#  define BOOST_CLASS_REQUIRE3(tv1, tv2, tv3, ns, concept)  \
+    BOOST_CONCEPT_ASSERT((ns::concept<tv1,tv2,tv3>))
+
+#  define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \
+    BOOST_CONCEPT_ASSERT((ns::concept<tv1,tv2,tv3,tv4>))
+
+
+  //
+  // Begin concept definitions
+  //
+  BOOST_concept(Integer, (T))
+  {
+      BOOST_CONCEPT_USAGE(Integer)
+        {
+            x.error_type_must_be_an_integer_type();
+        }
+   private:
+      T x;
+  };
+
+  template <> struct Integer<char> {};
+  template <> struct Integer<signed char> {};
+  template <> struct Integer<unsigned char> {};
+  template <> struct Integer<short> {};
+  template <> struct Integer<unsigned short> {};
+  template <> struct Integer<int> {};
+  template <> struct Integer<unsigned int> {};
+  template <> struct Integer<long> {};
+  template <> struct Integer<unsigned long> {};
+# if defined(BOOST_HAS_LONG_LONG)
+  template <> struct Integer< ::ndnboost::long_long_type> {};
+  template <> struct Integer< ::ndnboost::ulong_long_type> {};
+# elif defined(BOOST_HAS_MS_INT64)
+  template <> struct Integer<__int64> {};
+  template <> struct Integer<unsigned __int64> {};
+# endif
+
+  BOOST_concept(SignedInteger,(T)) {
+    BOOST_CONCEPT_USAGE(SignedInteger) {
+      x.error_type_must_be_a_signed_integer_type();
+    }
+   private:
+    T x;
+  };
+  template <> struct SignedInteger<signed char> { };
+  template <> struct SignedInteger<short> {};
+  template <> struct SignedInteger<int> {};
+  template <> struct SignedInteger<long> {};
+# if defined(BOOST_HAS_LONG_LONG)
+  template <> struct SignedInteger< ::ndnboost::long_long_type> {};
+# elif defined(BOOST_HAS_MS_INT64)
+  template <> struct SignedInteger<__int64> {};
+# endif
+
+  BOOST_concept(UnsignedInteger,(T)) {
+    BOOST_CONCEPT_USAGE(UnsignedInteger) {
+      x.error_type_must_be_an_unsigned_integer_type();
+    }
+   private:
+    T x;
+  };
+
+  template <> struct UnsignedInteger<unsigned char> {};
+  template <> struct UnsignedInteger<unsigned short> {};
+  template <> struct UnsignedInteger<unsigned int> {};
+  template <> struct UnsignedInteger<unsigned long> {};
+# if defined(BOOST_HAS_LONG_LONG)
+  template <> struct UnsignedInteger< ::ndnboost::ulong_long_type> {};
+# elif defined(BOOST_HAS_MS_INT64)
+  template <> struct UnsignedInteger<unsigned __int64> {};
+# endif
+
+  //===========================================================================
+  // Basic Concepts
+
+  BOOST_concept(DefaultConstructible,(TT))
+  {
+    BOOST_CONCEPT_USAGE(DefaultConstructible) {
+      TT a;               // require default constructor
+      ignore_unused_variable_warning(a);
+    }
+  };
+
+  BOOST_concept(Assignable,(TT))
+  {
+    BOOST_CONCEPT_USAGE(Assignable) {
+#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
+      a = b;             // require assignment operator
+#endif
+      const_constraints(b);
+    }
+   private:
+    void const_constraints(const TT& x) {
+#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
+      a = x;              // const required for argument to assignment
+#else
+      ignore_unused_variable_warning(x);
+#endif
+    }
+   private:
+    TT a;
+    TT b;
+  };
+
+
+  BOOST_concept(CopyConstructible,(TT))
+  {
+    BOOST_CONCEPT_USAGE(CopyConstructible) {
+      TT a(b);            // require copy constructor
+      TT* ptr = &a;       // require address of operator
+      const_constraints(a);
+      ignore_unused_variable_warning(ptr);
+    }
+   private:
+    void const_constraints(const TT& a) {
+      TT c(a);            // require const copy constructor
+      const TT* ptr = &a; // require const address of operator
+      ignore_unused_variable_warning(c);
+      ignore_unused_variable_warning(ptr);
+    }
+    TT b;
+  };
+
+#if (defined _MSC_VER)
+# pragma warning( push )
+# pragma warning( disable : 4510 ) // default constructor could not be generated
+# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required
+#endif
+  // The SGI STL version of Assignable requires copy constructor and operator=
+  BOOST_concept(SGIAssignable,(TT))
+  {
+    BOOST_CONCEPT_USAGE(SGIAssignable) {
+      TT c(a);
+#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
+      a = b;              // require assignment operator
+#endif
+      const_constraints(b);
+      ignore_unused_variable_warning(c);
+    }
+   private:
+    void const_constraints(const TT& x) {
+      TT c(x);
+#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
+      a = x;              // const required for argument to assignment
+#endif
+      ignore_unused_variable_warning(c);
+    }
+    TT a;
+    TT b;
+  };
+#if (defined _MSC_VER)
+# pragma warning( pop )
+#endif
+
+  BOOST_concept(Convertible,(X)(Y))
+  {
+    BOOST_CONCEPT_USAGE(Convertible) {
+      Y y = x;
+      ignore_unused_variable_warning(y);
+    }
+   private:
+    X x;
+  };
+
+  // The C++ standard requirements for many concepts talk about return
+  // types that must be "convertible to bool".  The problem with this
+  // requirement is that it leaves the door open for evil proxies that
+  // define things like operator|| with strange return types.  Two
+  // possible solutions are:
+  // 1) require the return type to be exactly bool
+  // 2) stay with convertible to bool, and also
+  //    specify stuff about all the logical operators.
+  // For now we just test for convertible to bool.
+  template <class TT>
+  void require_boolean_expr(const TT& t) {
+    bool x = t;
+    ignore_unused_variable_warning(x);
+  }
+
+  BOOST_concept(EqualityComparable,(TT))
+  {
+    BOOST_CONCEPT_USAGE(EqualityComparable) {
+      require_boolean_expr(a == b);
+      require_boolean_expr(a != b);
+    }
+   private:
+    TT a, b;
+  };
+
+  BOOST_concept(LessThanComparable,(TT))
+  {
+    BOOST_CONCEPT_USAGE(LessThanComparable) {
+      require_boolean_expr(a < b);
+    }
+   private:
+    TT a, b;
+  };
+
+  // This is equivalent to SGI STL's LessThanComparable.
+  BOOST_concept(Comparable,(TT))
+  {
+    BOOST_CONCEPT_USAGE(Comparable) {
+      require_boolean_expr(a < b);
+      require_boolean_expr(a > b);
+      require_boolean_expr(a <= b);
+      require_boolean_expr(a >= b);
+    }
+   private:
+    TT a, b;
+  };
+
+#define BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(OP,NAME)    \
+  BOOST_concept(NAME, (First)(Second))                          \
+  {                                                             \
+      BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); }                         \
+     private:                                                   \
+        bool constraints_() { return a OP b; }                  \
+        First a;                                                \
+        Second b;                                               \
+  }
+
+#define BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(OP,NAME)    \
+  BOOST_concept(NAME, (Ret)(First)(Second))                 \
+  {                                                         \
+      BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); }                     \
+  private:                                                  \
+      Ret constraints_() { return a OP b; }                 \
+      First a;                                              \
+      Second b;                                             \
+  }
+
+  BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, EqualOp);
+  BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, NotEqualOp);
+  BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, LessThanOp);
+  BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, LessEqualOp);
+  BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, GreaterThanOp);
+  BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, GreaterEqualOp);
+
+  BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, PlusOp);
+  BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, TimesOp);
+  BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, DivideOp);
+  BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, SubtractOp);
+  BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, ModOp);
+
+  //===========================================================================
+  // Function Object Concepts
+
+  BOOST_concept(Generator,(Func)(Return))
+  {
+      BOOST_CONCEPT_USAGE(Generator) { test(is_void<Return>()); }
+
+   private:
+      void test(ndnboost::mpl::false_)
+      {
+          // Do we really want a reference here?
+          const Return& r = f();
+          ignore_unused_variable_warning(r);
+      }
+
+      void test(ndnboost::mpl::true_)
+      {
+          f();
+      }
+
+      Func f;
+  };
+
+  BOOST_concept(UnaryFunction,(Func)(Return)(Arg))
+  {
+      BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void<Return>()); }
+
+   private:
+      void test(ndnboost::mpl::false_)
+      {
+          f(arg);               // "priming the pump" this way keeps msvc6 happy (ICE)
+          Return r = f(arg);
+          ignore_unused_variable_warning(r);
+      }
+
+      void test(ndnboost::mpl::true_)
+      {
+          f(arg);
+      }
+
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+                      && BOOST_WORKAROUND(__GNUC__, > 3)))
+      // Declare a dummy construktor to make gcc happy.
+      // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
+      // (warning: non-static reference "const double& ndnboost::UnaryFunction<YourClassHere>::arg"
+      // in class without a constructor [-Wuninitialized])
+      UnaryFunction();
+#endif
+
+      Func f;
+      Arg arg;
+  };
+
+  BOOST_concept(BinaryFunction,(Func)(Return)(First)(Second))
+  {
+      BOOST_CONCEPT_USAGE(BinaryFunction) { test(is_void<Return>()); }
+   private:
+      void test(ndnboost::mpl::false_)
+      {
+          f(first,second);
+          Return r = f(first, second); // require operator()
+          (void)r;
+      }
+
+      void test(ndnboost::mpl::true_)
+      {
+          f(first,second);
+      }
+
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+                      && BOOST_WORKAROUND(__GNUC__, > 3)))
+      // Declare a dummy constructor to make gcc happy.
+      // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
+      // (warning: non-static reference "const double& ndnboost::BinaryFunction<YourClassHere>::arg"
+      // in class without a constructor [-Wuninitialized])
+      BinaryFunction();
+#endif
+
+      Func f;
+      First first;
+      Second second;
+  };
+
+  BOOST_concept(UnaryPredicate,(Func)(Arg))
+  {
+    BOOST_CONCEPT_USAGE(UnaryPredicate) {
+      require_boolean_expr(f(arg)); // require operator() returning bool
+    }
+   private:
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+                      && BOOST_WORKAROUND(__GNUC__, > 3)))
+      // Declare a dummy constructor to make gcc happy.
+      // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
+      // (warning: non-static reference "const double& ndnboost::UnaryPredicate<YourClassHere>::arg"
+      // in class without a constructor [-Wuninitialized])
+      UnaryPredicate();
+#endif
+
+    Func f;
+    Arg arg;
+  };
+
+  BOOST_concept(BinaryPredicate,(Func)(First)(Second))
+  {
+    BOOST_CONCEPT_USAGE(BinaryPredicate) {
+      require_boolean_expr(f(a, b)); // require operator() returning bool
+    }
+   private:
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+                      && BOOST_WORKAROUND(__GNUC__, > 3)))
+      // Declare a dummy constructor to make gcc happy.
+      // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
+      // (warning: non-static reference "const double& ndnboost::BinaryPredicate<YourClassHere>::arg"
+      // in class without a constructor [-Wuninitialized])
+      BinaryPredicate();
+#endif
+    Func f;
+    First a;
+    Second b;
+  };
+
+  // use this when functor is used inside a container class like std::set
+  BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second))
+    : BinaryPredicate<Func, First, Second>
+  {
+    BOOST_CONCEPT_USAGE(Const_BinaryPredicate) {
+      const_constraints(f);
+    }
+   private:
+    void const_constraints(const Func& fun) {
+      // operator() must be a const member function
+      require_boolean_expr(fun(a, b));
+    }
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+                      && BOOST_WORKAROUND(__GNUC__, > 3)))
+      // Declare a dummy constructor to make gcc happy.
+      // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
+      // (warning: non-static reference "const double& ndnboost::Const_BinaryPredicate<YourClassHere>::arg"
+      // in class without a constructor [-Wuninitialized])
+      Const_BinaryPredicate();
+#endif
+
+    Func f;
+    First a;
+    Second b;
+  };
+
+  BOOST_concept(AdaptableGenerator,(Func)(Return))
+    : Generator<Func, typename Func::result_type>
+  {
+      typedef typename Func::result_type result_type;
+
+      BOOST_CONCEPT_USAGE(AdaptableGenerator)
+      {
+          BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
+      }
+  };
+
+  BOOST_concept(AdaptableUnaryFunction,(Func)(Return)(Arg))
+    : UnaryFunction<Func, typename Func::result_type, typename Func::argument_type>
+  {
+      typedef typename Func::argument_type argument_type;
+      typedef typename Func::result_type result_type;
+
+      ~AdaptableUnaryFunction()
+      {
+          BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
+          BOOST_CONCEPT_ASSERT((Convertible<Arg, argument_type>));
+      }
+  };
+
+  BOOST_concept(AdaptableBinaryFunction,(Func)(Return)(First)(Second))
+    : BinaryFunction<
+          Func
+        , typename Func::result_type
+        , typename Func::first_argument_type
+        , typename Func::second_argument_type
+      >
+  {
+      typedef typename Func::first_argument_type first_argument_type;
+      typedef typename Func::second_argument_type second_argument_type;
+      typedef typename Func::result_type result_type;
+
+      ~AdaptableBinaryFunction()
+      {
+          BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
+          BOOST_CONCEPT_ASSERT((Convertible<First, first_argument_type>));
+          BOOST_CONCEPT_ASSERT((Convertible<Second, second_argument_type>));
+      }
+  };
+
+  BOOST_concept(AdaptablePredicate,(Func)(Arg))
+    : UnaryPredicate<Func, Arg>
+    , AdaptableUnaryFunction<Func, bool, Arg>
+  {
+  };
+
+  BOOST_concept(AdaptableBinaryPredicate,(Func)(First)(Second))
+    : BinaryPredicate<Func, First, Second>
+    , AdaptableBinaryFunction<Func, bool, First, Second>
+  {
+  };
+
+  //===========================================================================
+  // Iterator Concepts
+
+  BOOST_concept(InputIterator,(TT))
+    : Assignable<TT>
+    , EqualityComparable<TT>
+  {
+      typedef typename ndnboost::detail::iterator_traits<TT>::value_type value_type;
+      typedef typename ndnboost::detail::iterator_traits<TT>::difference_type difference_type;
+      typedef typename ndnboost::detail::iterator_traits<TT>::reference reference;
+      typedef typename ndnboost::detail::iterator_traits<TT>::pointer pointer;
+      typedef typename ndnboost::detail::iterator_traits<TT>::iterator_category iterator_category;
+
+      BOOST_CONCEPT_USAGE(InputIterator)
+      {
+        BOOST_CONCEPT_ASSERT((SignedInteger<difference_type>));
+        BOOST_CONCEPT_ASSERT((Convertible<iterator_category, std::input_iterator_tag>));
+
+        TT j(i);
+        (void)*i;           // require dereference operator
+        ++j;                // require preincrement operator
+        i++;                // require postincrement operator
+      }
+   private:
+    TT i;
+  };
+
+  BOOST_concept(OutputIterator,(TT)(ValueT))
+    : Assignable<TT>
+  {
+    BOOST_CONCEPT_USAGE(OutputIterator) {
+
+      ++i;                // require preincrement operator
+      i++;                // require postincrement operator
+      *i++ = t;           // require postincrement and assignment
+    }
+   private:
+    TT i, j;
+    ValueT t;
+  };
+
+  BOOST_concept(ForwardIterator,(TT))
+    : InputIterator<TT>
+  {
+      BOOST_CONCEPT_USAGE(ForwardIterator)
+      {
+          BOOST_CONCEPT_ASSERT((Convertible<
+              BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category
+            , std::forward_iterator_tag
+          >));
+
+          typename InputIterator<TT>::reference r = *i;
+          ignore_unused_variable_warning(r);
+      }
+
+   private:
+      TT i;
+  };
+
+  BOOST_concept(Mutable_ForwardIterator,(TT))
+    : ForwardIterator<TT>
+  {
+      BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) {
+        *i++ = *i;         // require postincrement and assignment
+      }
+   private:
+      TT i;
+  };
+
+  BOOST_concept(BidirectionalIterator,(TT))
+    : ForwardIterator<TT>
+  {
+      BOOST_CONCEPT_USAGE(BidirectionalIterator)
+      {
+          BOOST_CONCEPT_ASSERT((Convertible<
+              BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category
+            , std::bidirectional_iterator_tag
+          >));
+
+          --i;                // require predecrement operator
+          i--;                // require postdecrement operator
+      }
+   private:
+      TT i;
+  };
+
+  BOOST_concept(Mutable_BidirectionalIterator,(TT))
+    : BidirectionalIterator<TT>
+    , Mutable_ForwardIterator<TT>
+  {
+      BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator)
+      {
+          *i-- = *i;                  // require postdecrement and assignment
+      }
+   private:
+      TT i;
+  };
+
+  BOOST_concept(RandomAccessIterator,(TT))
+    : BidirectionalIterator<TT>
+    , Comparable<TT>
+  {
+      BOOST_CONCEPT_USAGE(RandomAccessIterator)
+      {
+          BOOST_CONCEPT_ASSERT((Convertible<
+              BOOST_DEDUCED_TYPENAME BidirectionalIterator<TT>::iterator_category
+            , std::random_access_iterator_tag
+          >));
+
+          i += n;             // require assignment addition operator
+          i = i + n; i = n + i; // require addition with difference type
+          i -= n;             // require assignment subtraction operator
+          i = i - n;                  // require subtraction with difference type
+          n = i - j;                  // require difference operator
+          (void)i[n];                 // require element access operator
+      }
+
+   private:
+    TT a, b;
+    TT i, j;
+      typename ndnboost::detail::iterator_traits<TT>::difference_type n;
+  };
+
+  BOOST_concept(Mutable_RandomAccessIterator,(TT))
+    : RandomAccessIterator<TT>
+    , Mutable_BidirectionalIterator<TT>
+  {
+      BOOST_CONCEPT_USAGE(Mutable_RandomAccessIterator)
+      {
+          i[n] = *i;                  // require element access and assignment
+      }
+   private:
+    TT i;
+    typename ndnboost::detail::iterator_traits<TT>::difference_type n;
+  };
+
+  //===========================================================================
+  // Container s
+
+  BOOST_concept(Container,(C))
+    : Assignable<C>
+  {
+    typedef typename C::value_type value_type;
+    typedef typename C::difference_type difference_type;
+    typedef typename C::size_type size_type;
+    typedef typename C::const_reference const_reference;
+    typedef typename C::const_pointer const_pointer;
+    typedef typename C::const_iterator const_iterator;
+
+      BOOST_CONCEPT_USAGE(Container)
+      {
+          BOOST_CONCEPT_ASSERT((InputIterator<const_iterator>));
+          const_constraints(c);
+      }
+
+   private:
+      void const_constraints(const C& cc) {
+          i = cc.begin();
+          i = cc.end();
+          n = cc.size();
+          n = cc.max_size();
+          b = cc.empty();
+      }
+      C c;
+      bool b;
+      const_iterator i;
+      size_type n;
+  };
+
+  BOOST_concept(Mutable_Container,(C))
+    : Container<C>
+  {
+      typedef typename C::reference reference;
+      typedef typename C::iterator iterator;
+      typedef typename C::pointer pointer;
+
+      BOOST_CONCEPT_USAGE(Mutable_Container)
+      {
+          BOOST_CONCEPT_ASSERT((
+               Assignable<typename Mutable_Container::value_type>));
+
+          BOOST_CONCEPT_ASSERT((InputIterator<iterator>));
+
+          i = c.begin();
+          i = c.end();
+          c.swap(c2);
+      }
+
+   private:
+      iterator i;
+      C c, c2;
+  };
+
+  BOOST_concept(ForwardContainer,(C))
+    : Container<C>
+  {
+      BOOST_CONCEPT_USAGE(ForwardContainer)
+      {
+          BOOST_CONCEPT_ASSERT((
+               ForwardIterator<
+                    typename ForwardContainer::const_iterator
+               >));
+      }
+  };
+
+  BOOST_concept(Mutable_ForwardContainer,(C))
+    : ForwardContainer<C>
+    , Mutable_Container<C>
+  {
+      BOOST_CONCEPT_USAGE(Mutable_ForwardContainer)
+      {
+          BOOST_CONCEPT_ASSERT((
+               Mutable_ForwardIterator<
+                   typename Mutable_ForwardContainer::iterator
+               >));
+      }
+  };
+
+  BOOST_concept(ReversibleContainer,(C))
+    : ForwardContainer<C>
+  {
+      typedef typename
+        C::const_reverse_iterator
+      const_reverse_iterator;
+
+      BOOST_CONCEPT_USAGE(ReversibleContainer)
+      {
+          BOOST_CONCEPT_ASSERT((
+              BidirectionalIterator<
+                  typename ReversibleContainer::const_iterator>));
+
+          BOOST_CONCEPT_ASSERT((BidirectionalIterator<const_reverse_iterator>));
+
+          const_constraints(c);
+      }
+   private:
+      void const_constraints(const C& cc)
+      {
+          const_reverse_iterator i = cc.rbegin();
+          i = cc.rend();
+      }
+      C c;
+  };
+
+  BOOST_concept(Mutable_ReversibleContainer,(C))
+    : Mutable_ForwardContainer<C>
+    , ReversibleContainer<C>
+  {
+      typedef typename C::reverse_iterator reverse_iterator;
+
+      BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer)
+      {
+          typedef typename Mutable_ForwardContainer<C>::iterator iterator;
+          BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator<iterator>));
+          BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator<reverse_iterator>));
+
+          reverse_iterator i = c.rbegin();
+          i = c.rend();
+      }
+   private:
+      C c;
+  };
+
+  BOOST_concept(RandomAccessContainer,(C))
+    : ReversibleContainer<C>
+  {
+      typedef typename C::size_type size_type;
+      typedef typename C::const_reference const_reference;
+
+      BOOST_CONCEPT_USAGE(RandomAccessContainer)
+      {
+          BOOST_CONCEPT_ASSERT((
+              RandomAccessIterator<
+                  typename RandomAccessContainer::const_iterator
+              >));
+
+          const_constraints(c);
+      }
+   private:
+      void const_constraints(const C& cc)
+      {
+          const_reference r = cc[n];
+          ignore_unused_variable_warning(r);
+      }
+
+      C c;
+      size_type n;
+  };
+
+  BOOST_concept(Mutable_RandomAccessContainer,(C))
+    : Mutable_ReversibleContainer<C>
+    , RandomAccessContainer<C>
+  {
+   private:
+      typedef Mutable_RandomAccessContainer self;
+   public:
+      BOOST_CONCEPT_USAGE(Mutable_RandomAccessContainer)
+      {
+          BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator<typename self::iterator>));
+          BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator<typename self::reverse_iterator>));
+
+          typename self::reference r = c[i];
+          ignore_unused_variable_warning(r);
+      }
+
+   private:
+      typename Mutable_ReversibleContainer<C>::size_type i;
+      C c;
+  };
+
+  // A Sequence is inherently mutable
+  BOOST_concept(Sequence,(S))
+    : Mutable_ForwardContainer<S>
+      // Matt Austern's book puts DefaultConstructible here, the C++
+      // standard places it in Container --JGS
+      // ... so why aren't we following the standard?  --DWA
+    , DefaultConstructible<S>
+  {
+      BOOST_CONCEPT_USAGE(Sequence)
+      {
+          S
+              c(n),
+              c2(n, t),
+              c3(first, last);
+
+          c.insert(p, t);
+          c.insert(p, n, t);
+          c.insert(p, first, last);
+
+          c.erase(p);
+          c.erase(p, q);
+
+          typename Sequence::reference r = c.front();
+
+          ignore_unused_variable_warning(c);
+          ignore_unused_variable_warning(c2);
+          ignore_unused_variable_warning(c3);
+          ignore_unused_variable_warning(r);
+          const_constraints(c);
+      }
+   private:
+      void const_constraints(const S& c) {
+          typename Sequence::const_reference r = c.front();
+          ignore_unused_variable_warning(r);
+      }
+
+      typename S::value_type t;
+      typename S::size_type n;
+      typename S::value_type* first, *last;
+      typename S::iterator p, q;
+  };
+
+  BOOST_concept(FrontInsertionSequence,(S))
+    : Sequence<S>
+  {
+      BOOST_CONCEPT_USAGE(FrontInsertionSequence)
+      {
+          c.push_front(t);
+          c.pop_front();
+      }
+   private:
+      S c;
+      typename S::value_type t;
+  };
+
+  BOOST_concept(BackInsertionSequence,(S))
+    : Sequence<S>
+  {
+      BOOST_CONCEPT_USAGE(BackInsertionSequence)
+      {
+          c.push_back(t);
+          c.pop_back();
+          typename BackInsertionSequence::reference r = c.back();
+          ignore_unused_variable_warning(r);
+          const_constraints(c);
+      }
+   private:
+      void const_constraints(const S& cc) {
+          typename BackInsertionSequence::const_reference
+              r = cc.back();
+          ignore_unused_variable_warning(r);
+      };
+      S c;
+      typename S::value_type t;
+  };
+
+  BOOST_concept(AssociativeContainer,(C))
+    : ForwardContainer<C>
+    , DefaultConstructible<C>
+  {
+      typedef typename C::key_type key_type;
+      typedef typename C::key_compare key_compare;
+      typedef typename C::value_compare value_compare;
+      typedef typename C::iterator iterator;
+
+      BOOST_CONCEPT_USAGE(AssociativeContainer)
+      {
+          i = c.find(k);
+          r = c.equal_range(k);
+          c.erase(k);
+          c.erase(i);
+          c.erase(r.first, r.second);
+          const_constraints(c);
+          BOOST_CONCEPT_ASSERT((BinaryPredicate<key_compare,key_type,key_type>));
+
+          typedef typename AssociativeContainer::value_type value_type_;
+          BOOST_CONCEPT_ASSERT((BinaryPredicate<value_compare,value_type_,value_type_>));
+      }
+
+      // Redundant with the base concept, but it helps below.
+      typedef typename C::const_iterator const_iterator;
+   private:
+      void const_constraints(const C& cc)
+      {
+          ci = cc.find(k);
+          n = cc.count(k);
+          cr = cc.equal_range(k);
+      }
+
+      C c;
+      iterator i;
+      std::pair<iterator,iterator> r;
+      const_iterator ci;
+      std::pair<const_iterator,const_iterator> cr;
+      typename C::key_type k;
+      typename C::size_type n;
+  };
+
+  BOOST_concept(UniqueAssociativeContainer,(C))
+    : AssociativeContainer<C>
+  {
+      BOOST_CONCEPT_USAGE(UniqueAssociativeContainer)
+      {
+          C c(first, last);
+
+          pos_flag = c.insert(t);
+          c.insert(first, last);
+
+          ignore_unused_variable_warning(c);
+      }
+   private:
+      std::pair<typename C::iterator, bool> pos_flag;
+      typename C::value_type t;
+      typename C::value_type* first, *last;
+  };
+
+  BOOST_concept(MultipleAssociativeContainer,(C))
+    : AssociativeContainer<C>
+  {
+      BOOST_CONCEPT_USAGE(MultipleAssociativeContainer)
+      {
+          C c(first, last);
+
+          pos = c.insert(t);
+          c.insert(first, last);
+
+          ignore_unused_variable_warning(c);
+          ignore_unused_variable_warning(pos);
+      }
+   private:
+      typename C::iterator pos;
+      typename C::value_type t;
+      typename C::value_type* first, *last;
+  };
+
+  BOOST_concept(SimpleAssociativeContainer,(C))
+    : AssociativeContainer<C>
+  {
+      BOOST_CONCEPT_USAGE(SimpleAssociativeContainer)
+      {
+          typedef typename C::key_type key_type;
+          typedef typename C::value_type value_type;
+          BOOST_MPL_ASSERT((ndnboost::is_same<key_type,value_type>));
+      }
+  };
+
+  BOOST_concept(PairAssociativeContainer,(C))
+    : AssociativeContainer<C>
+  {
+      BOOST_CONCEPT_USAGE(PairAssociativeContainer)
+      {
+          typedef typename C::key_type key_type;
+          typedef typename C::value_type value_type;
+          typedef typename C::mapped_type mapped_type;
+          typedef std::pair<const key_type, mapped_type> required_value_type;
+          BOOST_MPL_ASSERT((ndnboost::is_same<value_type,required_value_type>));
+      }
+  };
+
+  BOOST_concept(SortedAssociativeContainer,(C))
+    : AssociativeContainer<C>
+    , ReversibleContainer<C>
+  {
+      BOOST_CONCEPT_USAGE(SortedAssociativeContainer)
+      {
+          C
+              c(kc),
+              c2(first, last),
+              c3(first, last, kc);
+
+          p = c.upper_bound(k);
+          p = c.lower_bound(k);
+          r = c.equal_range(k);
+
+          c.insert(p, t);
+
+          ignore_unused_variable_warning(c);
+          ignore_unused_variable_warning(c2);
+          ignore_unused_variable_warning(c3);
+          const_constraints(c);
+      }
+
+      void const_constraints(const C& c)
+      {
+          kc = c.key_comp();
+          vc = c.value_comp();
+
+          cp = c.upper_bound(k);
+          cp = c.lower_bound(k);
+          cr = c.equal_range(k);
+      }
+
+   private:
+      typename C::key_compare kc;
+      typename C::value_compare vc;
+      typename C::value_type t;
+      typename C::key_type k;
+      typedef typename C::iterator iterator;
+      typedef typename C::const_iterator const_iterator;
+
+      typedef SortedAssociativeContainer self;
+      iterator p;
+      const_iterator cp;
+      std::pair<typename self::iterator,typename self::iterator> r;
+      std::pair<typename self::const_iterator,typename self::const_iterator> cr;
+      typename C::value_type* first, *last;
+  };
+
+  // HashedAssociativeContainer
+
+  BOOST_concept(Collection,(C))
+  {
+      BOOST_CONCEPT_USAGE(Collection)
+      {
+        ndnboost::function_requires<ndnboost::InputIteratorConcept<iterator> >();
+        ndnboost::function_requires<ndnboost::InputIteratorConcept<const_iterator> >();
+        ndnboost::function_requires<ndnboost::CopyConstructibleConcept<value_type> >();
+        const_constraints(c);
+        i = c.begin();
+        i = c.end();
+        c.swap(c);
+      }
+
+      void const_constraints(const C& cc) {
+        ci = cc.begin();
+        ci = cc.end();
+        n = cc.size();
+        b = cc.empty();
+      }
+
+    private:
+      typedef typename C::value_type value_type;
+      typedef typename C::iterator iterator;
+      typedef typename C::const_iterator const_iterator;
+      typedef typename C::reference reference;
+      typedef typename C::const_reference const_reference;
+      // typedef typename C::pointer pointer;
+      typedef typename C::difference_type difference_type;
+      typedef typename C::size_type size_type;
+
+      C c;
+      bool b;
+      iterator i;
+      const_iterator ci;
+      size_type n;
+  };
+} // namespace ndnboost
+
+# include <ndnboost/concept/detail/concept_undef.hpp>
+
+#endif // BOOST_CONCEPT_CHECKS_HPP
+
diff --git a/ndnboost/container/allocator_traits.hpp b/ndnboost/container/allocator_traits.hpp
deleted file mode 100644
index 31e0ceb..0000000
--- a/ndnboost/container/allocator_traits.hpp
+++ /dev/null
@@ -1,400 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Pablo Halpern 2009. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2011-2012. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP
-#define BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP
-
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
-#  pragma once
-#endif
-
-#include <ndnboost/container/detail/config_begin.hpp>
-#include <ndnboost/container/detail/workaround.hpp>
-#include <ndnboost/intrusive/pointer_traits.hpp>
-#include <ndnboost/intrusive/detail/memory_util.hpp>
-#include <ndnboost/container/detail/memory_util.hpp>
-#include <ndnboost/type_traits/integral_constant.hpp>
-#include <ndnboost/container/detail/mpl.hpp>
-#include <ndnboost/move/utility.hpp>
-#include <limits> //numeric_limits<>::max()
-#include <new>    //placement new
-#include <memory> //std::allocator
-
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <ndnboost/container/detail/preprocessor.hpp>
-#endif
-
-///@cond
-
-namespace ndnboost {
-namespace container {
-namespace container_detail {
-
-//workaround needed for C++03 compilers with no construct()
-//supporting rvalue references
-template<class A>
-struct is_std_allocator
-{  static const bool value = false; };
-
-template<class T>
-struct is_std_allocator< std::allocator<T> >
-{  static const bool value = true; };
-
-}  //namespace container_detail {
-
-///@endcond
-
-//! The class template allocator_traits supplies a uniform interface to all allocator types.
-//! This class is a C++03-compatible implementation of std::allocator_traits
-template <typename Alloc>
-struct allocator_traits
-{
-   //allocator_type
-   typedef Alloc allocator_type;
-   //value_type
-   typedef typename Alloc::value_type         value_type;
-
-   #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-      //! Alloc::pointer if such a type exists; otherwise, value_type*
-      //!
-      typedef unspecified pointer;
-      //! Alloc::const_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<const
-      //!
-      typedef see_documentation const_pointer;
-      //! Non-standard extension
-      //! Alloc::reference if such a type exists; otherwise, value_type&
-      typedef see_documentation reference;
-      //! Non-standard extension
-      //! Alloc::const_reference if such a type exists ; otherwise, const value_type&
-      typedef see_documentation const_reference;
-      //! Alloc::void_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<void>.
-      //!
-      typedef see_documentation void_pointer;
-      //! Alloc::const_void_pointer if such a type exists ; otherwis e, pointer_traits<pointer>::rebind<const
-      //!
-      typedef see_documentation const_void_pointer;
-      //! Alloc::difference_type if such a type exists ; otherwise, pointer_traits<pointer>::difference_type.
-      //!
-      typedef see_documentation difference_type;
-      //! Alloc::size_type if such a type exists ; otherwise, make_unsigned<difference_type>::type
-      //!
-      typedef see_documentation size_type;
-      //! Alloc::propagate_on_container_copy_assignment if such a type exists, otherwise an integral_constant
-      //! type with internal constant static member `value` == false.
-      typedef see_documentation propagate_on_container_copy_assignment;
-      //! Alloc::propagate_on_container_move_assignment if such a type exists, otherwise an integral_constant
-      //! type with internal constant static member `value` == false.
-      typedef see_documentation propagate_on_container_move_assignment;
-      //! Alloc::propagate_on_container_swap if such a type exists, otherwise an integral_constant
-      //! type with internal constant static member `value` == false.
-      typedef see_documentation propagate_on_container_swap;
-      //! Defines an allocator: Alloc::rebind<T>::other if such a type exists; otherwise, Alloc<T, Args>
-      //! if Alloc is a class template instantiation of the form Alloc<U, Args>, where Args is zero or
-      //! more type arguments ; otherwise, the instantiation of rebind_alloc is ill-formed.
-      //!
-      //! In C++03 compilers `rebind_alloc` is a struct derived from an allocator
-      //! deduced by previously detailed rules.
-      template <class T> using rebind_alloc = see_documentation;
-
-      //! In C++03 compilers `rebind_traits` is a struct derived from
-      //! `allocator_traits<OtherAlloc>`, where `OtherAlloc` is
-      //! the allocator deduced by rules explained in `rebind_alloc`.
-      template <class T> using rebind_traits = allocator_traits<rebind_alloc<T> >;
-
-      //! Non-standard extension: Portable allocator rebind for C++03 and C++11 compilers.
-      //! `type` is an allocator related to Alloc deduced deduced by rules explained in `rebind_alloc`.
-      template <class T>
-      struct portable_rebind_alloc
-      {  typedef see_documentation type;  };
-   #else
-      //pointer
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(ndnboost::container::container_detail::, Alloc,
-         pointer, value_type*)
-            pointer;
-      //const_pointer
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(ndnboost::container::container_detail::, Alloc,
-         const_pointer, typename ndnboost::intrusive::pointer_traits<pointer>::template
-            rebind_pointer<const value_type>)
-               const_pointer;
-      //reference
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(ndnboost::container::container_detail::, Alloc,
-         reference, typename container_detail::unvoid<value_type>::type&)
-            reference;
-      //const_reference
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(ndnboost::container::container_detail::, Alloc,
-         const_reference, const typename container_detail::unvoid<value_type>::type&)
-               const_reference;
-      //void_pointer
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(ndnboost::container::container_detail::, Alloc,
-         void_pointer, typename ndnboost::intrusive::pointer_traits<pointer>::template
-            rebind_pointer<void>)
-               void_pointer;
-      //const_void_pointer
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(ndnboost::container::container_detail::, Alloc,
-         const_void_pointer, typename ndnboost::intrusive::pointer_traits<pointer>::template
-            rebind_pointer<const void>)
-               const_void_pointer;
-      //difference_type
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(ndnboost::container::container_detail::, Alloc,
-         difference_type, std::ptrdiff_t)
-            difference_type;
-      //size_type
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(ndnboost::container::container_detail::, Alloc,
-         size_type, std::size_t)
-            size_type;
-      //propagate_on_container_copy_assignment
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(ndnboost::container::container_detail::, Alloc,
-         propagate_on_container_copy_assignment, ndnboost::false_type)
-            propagate_on_container_copy_assignment;
-      //propagate_on_container_move_assignment
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(ndnboost::container::container_detail::, Alloc,
-         propagate_on_container_move_assignment, ndnboost::false_type)
-            propagate_on_container_move_assignment;
-      //propagate_on_container_swap
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(ndnboost::container::container_detail::, Alloc,
-         propagate_on_container_swap, ndnboost::false_type)
-            propagate_on_container_swap;
-
-      #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
-         //C++11
-         template <typename T> using rebind_alloc  = typename ndnboost::intrusive::detail::type_rebinder<Alloc, T>::type;
-         template <typename T> using rebind_traits = allocator_traits< rebind_alloc<T> >;
-      #else    // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
-         //Some workaround for C++03 or C++11 compilers with no template aliases
-         template <typename T>
-         struct rebind_alloc : ndnboost::intrusive::detail::type_rebinder<Alloc,T>::type
-         {
-            typedef typename ndnboost::intrusive::detail::type_rebinder<Alloc,T>::type Base;
-            #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-            template <typename... Args>
-            rebind_alloc(BOOST_FWD_REF(Args)... args)
-               : Base(ndnboost::forward<Args>(args)...)
-            {}
-            #else    // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-            #define BOOST_PP_LOCAL_MACRO(n)                                                        \
-            BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
-            rebind_alloc(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                       \
-               : Base(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _))                       \
-            {}                                                                                     \
-            //
-            #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
-            #include BOOST_PP_LOCAL_ITERATE()
-            #endif   // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-         };
-
-         template <typename T>
-         struct rebind_traits
-            : allocator_traits<typename ndnboost::intrusive::detail::type_rebinder<Alloc, T>::type>
-         {};
-      #endif   // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
-      template <class T>
-      struct portable_rebind_alloc
-      {  typedef typename ndnboost::intrusive::detail::type_rebinder<Alloc, T>::type type;  };
-   #endif   //BOOST_CONTAINER_DOXYGEN_INVOKED
-
-   //! <b>Returns</b>: `a.allocate(n)`
-   //!
-   static pointer allocate(Alloc &a, size_type n)
-   {  return a.allocate(n);  }
-
-   //! <b>Returns</b>: `a.deallocate(p, n)`
-   //!
-   //! <b>Throws</b>: Nothing
-   static void deallocate(Alloc &a, pointer p, size_type n)
-   {  a.deallocate(p, n);  }
-
-   //! <b>Effects</b>: calls `a.allocate(n, p)` if that call is well-formed;
-   //! otherwise, invokes `a.allocate(n)`
-   static pointer allocate(Alloc &a, size_type n, const_void_pointer p)
-   {
-      const bool value = ndnboost::container::container_detail::
-         has_member_function_callable_with_allocate
-            <Alloc, const size_type, const const_void_pointer>::value;
-      ::ndnboost::integral_constant<bool, value> flag;
-      return allocator_traits::priv_allocate(flag, a, n, p);
-   }
-
-   //! <b>Effects</b>: calls `a.destroy(p)` if that call is well-formed;
-   //! otherwise, invokes `p->~T()`.
-   template<class T>
-   static void destroy(Alloc &a, T*p)
-   {
-      typedef T* destroy_pointer;
-      const bool value = ndnboost::container::container_detail::
-         has_member_function_callable_with_destroy
-            <Alloc, const destroy_pointer>::value;
-      ::ndnboost::integral_constant<bool, value> flag;
-      allocator_traits::priv_destroy(flag, a, p);
-   }
-
-   //! <b>Returns</b>: `a.max_size()` if that expression is well-formed; otherwise,
-   //! `numeric_limits<size_type>::max()`.
-   static size_type max_size(const Alloc &a)
-   {
-      const bool value = ndnboost::container::container_detail::
-         has_member_function_callable_with_max_size
-            <const Alloc>::value;
-      ::ndnboost::integral_constant<bool, value> flag;
-      return allocator_traits::priv_max_size(flag, a);
-   }
-
-   //! <b>Returns</b>: `a.select_on_container_copy_construction()` if that expression is well-formed;
-   //! otherwise, a.
-   static
-   #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-   typename container_detail::if_c
-      <  ndnboost::container::container_detail::
-                  has_member_function_callable_with_select_on_container_copy_construction
-                     <const Alloc>::value
-      , Alloc
-      , const Alloc &
-      >::type
-   #else
-   Alloc
-   #endif
-   select_on_container_copy_construction(const Alloc &a)
-   {
-      const bool value = ndnboost::container::container_detail::
-         has_member_function_callable_with_select_on_container_copy_construction
-            <const Alloc>::value;
-      ::ndnboost::integral_constant<bool, value> flag;
-      return allocator_traits::priv_select_on_container_copy_construction(flag, a);
-   }
-
-   #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-      //! <b>Effects</b>: calls `a.construct(p, std::forward<Args>(args)...)` if that call is well-formed;
-      //! otherwise, invokes `::new (static_cast<void*>(p)) T(std::forward<Args>(args)...)`
-      template <class T, class ...Args>
-      static void construct(Alloc & a, T* p, BOOST_FWD_REF(Args)... args)
-      {
-         ::ndnboost::integral_constant<bool, container_detail::is_std_allocator<Alloc>::value> flag;
-         allocator_traits::priv_construct(flag, a, p, ::ndnboost::forward<Args>(args)...);
-      }
-   #endif
-   ///@cond
-   #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-      private:
-      static pointer priv_allocate(ndnboost::true_type, Alloc &a, size_type n, const_void_pointer p)
-      {  return a.allocate(n, p);  }
-
-      static pointer priv_allocate(ndnboost::false_type, Alloc &a, size_type n, const_void_pointer)
-      {  return allocator_traits::allocate(a, n);  }
-
-      template<class T>
-      static void priv_destroy(ndnboost::true_type, Alloc &a, T* p)
-      {  a.destroy(p);  }
-
-      template<class T>
-      static void priv_destroy(ndnboost::false_type, Alloc &, T* p)
-      {  p->~T(); (void)p;  }
-
-      static size_type priv_max_size(ndnboost::true_type, const Alloc &a)
-      {  return a.max_size();  }
-
-      static size_type priv_max_size(ndnboost::false_type, const Alloc &)
-      {  return (std::numeric_limits<size_type>::max)();  }
-
-      static Alloc priv_select_on_container_copy_construction(ndnboost::true_type, const Alloc &a)
-      {  return a.select_on_container_copy_construction();  }
-
-      static const Alloc &priv_select_on_container_copy_construction(ndnboost::false_type, const Alloc &a)
-      {  return a;  }
-
-      #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-         template<class T, class ...Args>
-         static void priv_construct(ndnboost::false_type, Alloc &a, T *p, BOOST_FWD_REF(Args) ...args)                   
-         {                                                                                                 
-            const bool value = ndnboost::container::container_detail::
-                  has_member_function_callable_with_construct
-                     < Alloc, T*, Args... >::value;
-            ::ndnboost::integral_constant<bool, value> flag;
-            priv_construct_dispatch2(flag, a, p, ::ndnboost::forward<Args>(args)...);
-         }
-
-         template<class T, class ...Args>
-         static void priv_construct(ndnboost::true_type, Alloc &a, T *p, BOOST_FWD_REF(Args) ...args)
-         {
-            priv_construct_dispatch2(ndnboost::false_type(), a, p, ::ndnboost::forward<Args>(args)...);
-         }
-
-         template<class T, class ...Args>
-         static void priv_construct_dispatch2(ndnboost::true_type, Alloc &a, T *p, BOOST_FWD_REF(Args) ...args)
-         {  a.construct( p, ::ndnboost::forward<Args>(args)...);  }
-
-         template<class T, class ...Args>
-         static void priv_construct_dispatch2(ndnboost::false_type, Alloc &, T *p, BOOST_FWD_REF(Args) ...args)
-         {  ::new((void*)p) T(::ndnboost::forward<Args>(args)...); }
-      #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-         public:
-         #define BOOST_PP_LOCAL_MACRO(n)                                                              \
-         template<class T BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) >                                 \
-         static void construct(Alloc &a, T *p                                                         \
-                              BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))            \
-         {                                                                                            \
-            ::ndnboost::integral_constant<bool, container_detail::is_std_allocator<Alloc>::value> flag;  \
-            allocator_traits::priv_construct(flag, a, p                                               \
-               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));                       \
-         }                                                                                            \
-         //
-         #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
-         #include BOOST_PP_LOCAL_ITERATE()
-     
-         private:
-         #define BOOST_PP_LOCAL_MACRO(n)                                                                    \
-         template<class T  BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) >                                      \
-         static void priv_construct(ndnboost::false_type, Alloc &a, T *p                                       \
-                        BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST,_))                         \
-         {                                                                                                  \
-            const bool value =                                                                              \
-               ndnboost::container::container_detail::has_member_function_callable_with_construct              \
-                     < Alloc, T* BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_FWD_TYPE, _) >::value;        \
-            ::ndnboost::integral_constant<bool, value> flag;                                                   \
-            priv_construct_dispatch2(flag, a, p                                                             \
-               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) );                            \
-         }                                                                                                  \
-                                                                                                            \
-         template<class T  BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) >                                      \
-         static void priv_construct(ndnboost::true_type, Alloc &a, T *p                                        \
-                        BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST,_))                         \
-         {                                                                                                  \
-            priv_construct_dispatch2(ndnboost::false_type(), a, p                                              \
-               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) );                            \
-         }                                                                                                  \
-                                                                                                            \
-         template<class T  BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) >                                      \
-         static void priv_construct_dispatch2(ndnboost::true_type, Alloc &a, T *p                              \
-                        BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST,_))                         \
-         {  a.construct( p BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) );  }             \
-                                                                                                            \
-         template<class T  BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) >                                      \
-         static void priv_construct_dispatch2(ndnboost::false_type, Alloc &, T *p                              \
-                        BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _) )                       \
-         {  ::new((void*)p) T(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }                     \
-         //
-         #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
-         #include BOOST_PP_LOCAL_ITERATE()
-      #endif   // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-   #endif   //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
-   ///@endcond
-};
-
-}  //namespace container {
-}  //namespace ndnboost {
-
-#include <ndnboost/container/detail/config_end.hpp>
-
-#endif // ! defined(BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP)
diff --git a/ndnboost/container/container_fwd.hpp b/ndnboost/container/container_fwd.hpp
new file mode 100644
index 0000000..7dda7bd
--- /dev/null
+++ b/ndnboost/container/container_fwd.hpp
@@ -0,0 +1,173 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
+#define BOOST_CONTAINER_CONTAINER_FWD_HPP
+
+#if (defined _MSC_VER) && (_MSC_VER >= 1200)
+#  pragma once
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+//                        Standard predeclarations
+//////////////////////////////////////////////////////////////////////////////
+
+/// @cond
+
+namespace ndnboost{
+namespace intrusive{
+   //Create namespace to avoid compilation errors
+}}
+
+namespace ndnboost{ namespace container{ namespace container_detail{
+
+namespace bi = ndnboost::intrusive;
+
+}}}
+
+#include <utility>
+#include <memory>
+#include <functional>
+#include <iosfwd>
+#include <string>
+
+/// @endcond
+
+//////////////////////////////////////////////////////////////////////////////
+//                             Containers
+//////////////////////////////////////////////////////////////////////////////
+
+namespace ndnboost {
+namespace container {
+
+//vector class
+template <class T
+         ,class Allocator = std::allocator<T> >
+class vector;
+
+//vector class
+template <class T
+         ,class Allocator = std::allocator<T> >
+class stable_vector;
+
+//vector class
+template <class T
+         ,class Allocator = std::allocator<T> >
+class deque;
+
+//list class
+template <class T
+         ,class Allocator = std::allocator<T> >
+class list;
+
+//slist class
+template <class T
+         ,class Allocator = std::allocator<T> >
+class slist;
+
+//set class
+template <class Key
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<Key> >
+class set;
+
+//multiset class
+template <class Key
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<Key> >
+class multiset;
+
+//map class
+template <class Key
+         ,class T
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<std::pair<const Key, T> > >
+class map;
+
+//multimap class
+template <class Key
+         ,class T
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<std::pair<const Key, T> > >
+class multimap;
+
+//flat_set class
+template <class Key
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<Key> >
+class flat_set;
+
+//flat_multiset class
+template <class Key
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<Key> >
+class flat_multiset;
+
+//flat_map class
+template <class Key
+         ,class T
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<std::pair<Key, T> > >
+class flat_map;
+
+//flat_multimap class
+template <class Key
+         ,class T
+         ,class Compare  = std::less<Key>
+         ,class Allocator = std::allocator<std::pair<Key, T> > >
+class flat_multimap;
+
+//basic_string class
+template <class CharT
+         ,class Traits = std::char_traits<CharT>
+         ,class Allocator  = std::allocator<CharT> >
+class basic_string;
+
+//! Type used to tag that the input range is
+//! guaranteed to be ordered
+struct ordered_range_t
+{};
+
+//! Type used to tag that the input range is
+//! guaranteed to be ordered and unique
+struct ordered_unique_range_t
+   : public ordered_range_t
+{};
+
+//! Value used to tag that the input range is
+//! guaranteed to be ordered
+static const ordered_range_t ordered_range = ordered_range_t();
+
+//! Value used to tag that the input range is
+//! guaranteed to be ordered and unique
+static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
+
+/// @cond
+
+namespace detail_really_deep_namespace {
+
+//Otherwise, gcc issues a warning of previously defined
+//anonymous_instance and unique_instance
+struct dummy
+{
+   dummy()
+   {
+      (void)ordered_range;
+      (void)ordered_unique_range;
+   }
+};
+
+}  //detail_really_deep_namespace {
+
+/// @endcond
+
+}}  //namespace ndnboost { namespace container {
+
+#endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP
diff --git a/ndnboost/container/detail/config_begin.hpp b/ndnboost/container/detail/config_begin.hpp
deleted file mode 100644
index 050ab17..0000000
--- a/ndnboost/container/detail/config_begin.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED
-#define BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED
-#include <ndnboost/config.hpp>
-
-#endif   //BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED
-
-#ifdef BOOST_MSVC
-   #ifndef _CRT_SECURE_NO_DEPRECATE
-   #define  BOOST_CONTAINER_DETAIL_CRT_SECURE_NO_DEPRECATE
-   #define _CRT_SECURE_NO_DEPRECATE
-   #endif
-   #pragma warning (push)
-   #pragma warning (disable : 4702) // unreachable code
-   #pragma warning (disable : 4706) // assignment within conditional expression
-   #pragma warning (disable : 4127) // conditional expression is constant
-   #pragma warning (disable : 4146) // unary minus operator applied to unsigned type, result still unsigned
-   #pragma warning (disable : 4284) // odd return type for operator->
-   #pragma warning (disable : 4244) // possible loss of data
-   #pragma warning (disable : 4251) // "identifier" : class "type" needs to have dll-interface to be used by clients of class "type2"
-   #pragma warning (disable : 4267) // conversion from "X" to "Y", possible loss of data
-   #pragma warning (disable : 4275) // non DLL-interface classkey "identifier" used as base for DLL-interface classkey "identifier"
-   #pragma warning (disable : 4355) // "this" : used in base member initializer list
-   #pragma warning (disable : 4503) // "identifier" : decorated name length exceeded, name was truncated
-   #pragma warning (disable : 4511) // copy constructor could not be generated
-   #pragma warning (disable : 4512) // assignment operator could not be generated
-   #pragma warning (disable : 4514) // unreferenced inline removed
-   #pragma warning (disable : 4521) // Disable "multiple copy constructors specified"
-   #pragma warning (disable : 4522) // "class" : multiple assignment operators specified
-   #pragma warning (disable : 4675) // "method" should be declared "static" and have exactly one parameter
-   #pragma warning (disable : 4710) // function not inlined
-   #pragma warning (disable : 4711) // function selected for automatic inline expansion
-   #pragma warning (disable : 4786) // identifier truncated in debug info
-   #pragma warning (disable : 4996) // "function": was declared deprecated
-   #pragma warning (disable : 4197) // top-level volatile in cast is ignored
-   #pragma warning (disable : 4541) // 'typeid' used on polymorphic type 'ndnboost::exception'
-                                    //    with /GR-; unpredictable behavior may result
-   #pragma warning (disable : 4673) //  throwing '' the following types will not be considered at the catch site
-   #pragma warning (disable : 4671) //  the copy constructor is inaccessible
-   #pragma warning (disable : 4584) //  X is already a base-class of Y
-#endif   //BOOST_MSVC
diff --git a/ndnboost/container/detail/config_end.hpp b/ndnboost/container/detail/config_end.hpp
deleted file mode 100644
index 3451371..0000000
--- a/ndnboost/container/detail/config_end.hpp
+++ /dev/null
@@ -1,17 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#if defined BOOST_MSVC
-   #pragma warning (pop)
-   #ifdef BOOST_CONTAINER_DETAIL_CRT_SECURE_NO_DEPRECATE
-   #undef BOOST_CONTAINER_DETAIL_CRT_SECURE_NO_DEPRECATE
-   #undef _CRT_SECURE_NO_DEPRECATE
-   #endif
-#endif
-
diff --git a/ndnboost/container/detail/memory_util.hpp b/ndnboost/container/detail/memory_util.hpp
deleted file mode 100644
index 07dd6fa..0000000
--- a/ndnboost/container/detail/memory_util.hpp
+++ /dev/null
@@ -1,83 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2011-2012. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_ALLOCATOR_MEMORY_UTIL_HPP
-#define BOOST_CONTAINER_ALLOCATOR_MEMORY_UTIL_HPP
-
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
-#  pragma once
-#endif
-
-#include <ndnboost/container/detail/config_begin.hpp>
-#include <ndnboost/container/detail/workaround.hpp>
-#include <ndnboost/container/detail/preprocessor.hpp>
-#include <ndnboost/intrusive/detail/has_member_function_callable_with.hpp>
-
-
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace ndnboost { namespace container { namespace container_detail {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END   }}}
-#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 2, <ndnboost/intrusive/detail/has_member_function_callable_with.hpp>))
-#include BOOST_PP_ITERATE()
-
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME destroy
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace ndnboost { namespace container { namespace container_detail {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END   }}}
-#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 3, <ndnboost/intrusive/detail/has_member_function_callable_with.hpp>))
-#include BOOST_PP_ITERATE()
-
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME max_size
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace ndnboost { namespace container { namespace container_detail {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END   }}}
-#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 0, <ndnboost/intrusive/detail/has_member_function_callable_with.hpp>))
-#include BOOST_PP_ITERATE()
-
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME select_on_container_copy_construction
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace ndnboost { namespace container { namespace container_detail {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END   }}}
-#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 0, <ndnboost/intrusive/detail/has_member_function_callable_with.hpp>))
-#include BOOST_PP_ITERATE()
-
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME construct
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace ndnboost { namespace container { namespace container_detail {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END   }}}
-#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS+1, <ndnboost/intrusive/detail/has_member_function_callable_with.hpp>))
-#include BOOST_PP_ITERATE()
-
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME swap
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace ndnboost { namespace container { namespace container_detail {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END   }}}
-#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, <ndnboost/intrusive/detail/has_member_function_callable_with.hpp>))
-#include BOOST_PP_ITERATE()
-
-namespace ndnboost {
-namespace container {
-namespace container_detail {
-
-
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(pointer)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_pointer)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_reference)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(void_pointer)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_void_pointer)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(size_type)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_copy_assignment)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_move_assignment)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_swap)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
-
-}  //namespace container_detail {
-}  //namespace container {
-}  //namespace ndnboost {
-
-#include <ndnboost/container/detail/config_end.hpp>
-
-#endif // ! defined(BOOST_CONTAINER_ALLOCATOR_MEMORY_UTIL_HPP)
diff --git a/ndnboost/container/detail/mpl.hpp b/ndnboost/container/detail/mpl.hpp
deleted file mode 100644
index 1281419..0000000
--- a/ndnboost/container/detail/mpl.hpp
+++ /dev/null
@@ -1,160 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2012.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
-#define BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
-
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
-#  pragma once
-#endif
-
-#include <cstddef>
-
-namespace ndnboost {
-namespace container {
-namespace container_detail {
-
-template <class T, T val>
-struct integral_constant
-{
-   static const T value = val;
-   typedef integral_constant<T,val> type;
-};
-
-template< bool C_ >
-struct bool_ : integral_constant<bool, C_>
-{
-   static const bool value = C_;
-   operator bool() const { return bool_::value; }
-};
-
-typedef bool_<true>        true_;
-typedef bool_<false>       false_;
-
-typedef true_  true_type;
-typedef false_ false_type;
-
-typedef char yes_type;
-struct no_type
-{
-   char padding[8];
-};
-
-template <bool B, class T = void>
-struct enable_if_c {
-  typedef T type;
-};
-
-template <class T>
-struct enable_if_c<false, T> {};
-
-template <class Cond, class T = void>
-struct enable_if : public enable_if_c<Cond::value, T> {};
-
-template <class Cond, class T = void>
-struct disable_if : public enable_if_c<!Cond::value, T> {};
-
-template <bool B, class T = void>
-struct disable_if_c : public enable_if_c<!B, T> {};
-
-template <class T, class U>
-class is_convertible
-{
-   typedef char true_t;
-   class false_t { char dummy[2]; };
-   static true_t dispatch(U);
-   static false_t dispatch(...);
-   static T trigger();
-   public:
-   enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) };
-};
-
-template<
-      bool C
-    , typename T1
-    , typename T2
-    >
-struct if_c
-{
-    typedef T1 type;
-};
-
-template<
-      typename T1
-    , typename T2
-    >
-struct if_c<false,T1,T2>
-{
-    typedef T2 type;
-};
-
-template<
-      typename T1
-    , typename T2
-    , typename T3
-    >
-struct if_
-{
-   typedef typename if_c<0 != T1::value, T2, T3>::type type;
-};
-
-
-template <class Pair>
-struct select1st
-//   : public std::unary_function<Pair, typename Pair::first_type>
-{
-   template<class OtherPair>
-   const typename Pair::first_type& operator()(const OtherPair& x) const
-   {  return x.first;   }
-
-   const typename Pair::first_type& operator()(const typename Pair::first_type& x) const
-   {  return x;   }
-};
-
-// identity is an extension: it is not part of the standard.
-template <class T>
-struct identity
-//   : public std::unary_function<T,T>
-{
-   typedef T type;
-   const T& operator()(const T& x) const
-   { return x; }
-};
-
-template<std::size_t S>
-struct ls_zeros
-{
-   static const std::size_t value = (S & std::size_t(1)) ? 0 : (1u + ls_zeros<(S >> 1u)>::value);
-};
-
-template<>
-struct ls_zeros<0>
-{
-   static const std::size_t value = 0;
-};
-
-template<>
-struct ls_zeros<1>
-{
-   static const std::size_t value = 0;
-};
-
-template <typename T> struct unvoid { typedef T type; };
-template <> struct unvoid<void> { struct type { }; };
-template <> struct unvoid<const void> { struct type { }; };
-
-}  //namespace container_detail {
-}  //namespace container {
-}  //namespace ndnboost {
-
-#endif   //#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
-
diff --git a/ndnboost/container/detail/preprocessor.hpp b/ndnboost/container/detail/preprocessor.hpp
deleted file mode 100644
index 2a5854d..0000000
--- a/ndnboost/container/detail/preprocessor.hpp
+++ /dev/null
@@ -1,232 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2008-2012. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_DETAIL_PREPROCESSOR_HPP
-#define BOOST_CONTAINER_DETAIL_PREPROCESSOR_HPP
-
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
-#  pragma once
-#endif
-
-#include <ndnboost/container/detail/config_begin.hpp>
-#include <ndnboost/container/detail/workaround.hpp>
-#include <ndnboost/move/utility.hpp>
-
-#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
-//#error "This file is not needed when perfect forwarding is available"
-#endif   //BOOST_CONTAINER_PERFECT_FORWARDING
-
-#include <ndnboost/preprocessor/iteration/local.hpp>
-#include <ndnboost/preprocessor/punctuation/paren_if.hpp>
-#include <ndnboost/preprocessor/punctuation/comma_if.hpp>
-#include <ndnboost/preprocessor/control/expr_if.hpp>
-#include <ndnboost/preprocessor/cat.hpp>
-#include <ndnboost/preprocessor/repetition/enum.hpp>
-#include <ndnboost/preprocessor/repetition/enum_params.hpp>
-#include <ndnboost/preprocessor/repetition/enum_trailing_params.hpp>
-#include <ndnboost/preprocessor/repetition/enum_trailing.hpp>
-#include <ndnboost/preprocessor/repetition/enum_shifted_params.hpp>
-#include <ndnboost/preprocessor/repetition/enum_shifted.hpp>
-#include <ndnboost/preprocessor/repetition/repeat.hpp>
-#include <ndnboost/preprocessor/logical/not.hpp>
-#include <ndnboost/preprocessor/arithmetic/sub.hpp>
-#include <ndnboost/preprocessor/arithmetic/add.hpp>
-#include <ndnboost/preprocessor/iteration/iterate.hpp>
-#include <ndnboost/move/utility.hpp>
-
-#define BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS 10
-
-//Note:
-//We define template parameters as const references to
-//be able to bind temporaries. After that we will un-const them.
-//This cast is ugly but it is necessary until "perfect forwarding"
-//is achieved in C++0x. Meanwhile, if we want to be able to
-//bind rvalues with non-const references, we have to be ugly
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-   #define BOOST_CONTAINER_PP_PARAM_LIST(z, n, data) \
-   BOOST_PP_CAT(P, n) && BOOST_PP_CAT(p, n) \
-   //!
-#else
-   #define BOOST_CONTAINER_PP_PARAM_LIST(z, n, data) \
-   const BOOST_PP_CAT(P, n) & BOOST_PP_CAT(p, n) \
-   //!
-#endif   //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-#define BOOST_CONTAINER_PP_CONST_REF_PARAM_LIST_Q(z, n, Data) \
-const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \
-//!
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-   #define BOOST_CONTAINER_PP_PARAM(U, u) \
-   U && u \
-   //!
-#else
-   #define BOOST_CONTAINER_PP_PARAM(U, u) \
-   const U & u \
-   //!
-#endif   //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-   #define BOOST_CONTAINER_PP_PARAM_INIT(z, n, data) \
-   BOOST_PP_CAT(m_p, n) (::ndnboost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) ))           \
-   //!
-
-#else //BOOST_NO_CXX11_RVALUE_REFERENCES
-
-   #define BOOST_CONTAINER_PP_PARAM_INIT(z, n, data) \
-   BOOST_PP_CAT(m_p, n) (const_cast<BOOST_PP_CAT(P, n) &>(BOOST_PP_CAT(p, n))) \
-   //!
-#endif   //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-   #if defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
-
-      namespace ndnboost {
-      namespace container {
-      namespace container_detail {
-         template<class T>
-         struct ref_holder;
-
-         template<class T>
-         struct ref_holder<T &>
-         {
-            explicit ref_holder(T &t)
-               : t_(t)
-            {}
-            T &t_;
-            T & get() {  return t_;   }
-         };
-
-         template<class T>
-         struct ref_holder<const T>
-         {
-            explicit ref_holder(const T &t)
-               : t_(t)
-            {}
-            const T &t_;
-            const T & get() {  return t_;   }
-         };
-
-         template<class T>
-         struct ref_holder<const T &&>
-         {
-            explicit ref_holder(const T &t)
-               : t_(t)
-            {}
-            const T &t_;
-            const T & get() {  return t_;   }
-         };
-
-         template<class T>
-         struct ref_holder
-         {
-            explicit ref_holder(T &&t)
-               : t_(t)
-            {}
-            T &t_;
-            T && get() {  return ::ndnboost::move(t_);   }
-         };
-
-         template<class T>
-         struct ref_holder<T &&>
-         {
-            explicit ref_holder(T &&t)
-               : t_(t)
-            {}
-            T &t_;
-            T && get()  { return ::ndnboost::move(t_); }
-         };
-
-      }  //namespace container_detail {
-      }  //namespace container {
-      }  //namespace ndnboost {
-
-      #define BOOST_CONTAINER_PP_PARAM_DEFINE(z, n, data)  \
-         ::ndnboost::container::container_detail::ref_holder<BOOST_PP_CAT(P, n)> BOOST_PP_CAT(m_p, n);  \
-      //!
-
-   #else //BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
-
-      #define BOOST_CONTAINER_PP_PARAM_DEFINE(z, n, data)  \
-      BOOST_PP_CAT(P, n) && BOOST_PP_CAT(m_p, n);            \
-      //!
-
-   #endif //defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
-
-#else //BOOST_NO_CXX11_RVALUE_REFERENCES
-
-   #define BOOST_CONTAINER_PP_PARAM_DEFINE(z, n, data)  \
-   BOOST_PP_CAT(P, n) & BOOST_PP_CAT(m_p, n);             \
-   //!
-#endif   //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
-
-   #define BOOST_CONTAINER_PP_MEMBER_FORWARD(z, n, data) BOOST_PP_CAT(this->m_p, n).get() \
-   //!
-
-#else //!defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
-
-   #define BOOST_CONTAINER_PP_MEMBER_FORWARD(z, n, data) \
-   ::ndnboost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(this->m_p, n) ) \
-   //!
-
-#endif   //!defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
-
-#define BOOST_CONTAINER_PP_PARAM_INC(z, n, data)   \
-  BOOST_PP_CAT(++this->m_p, n)                     \
-//!
-
-#define BOOST_CONTAINER_PP_IDENTITY(z, n, data) data
-
-
-#define BOOST_CONTAINER_PP_PARAM_FORWARD(z, n, data) \
-::ndnboost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) ) \
-//!
-
-#define BOOST_CONTAINER_PP_DECLVAL(z, n, data) \
-::ndnboost::move_detail::declval< BOOST_PP_CAT(P, n) >() \
-//!
-
-#define BOOST_CONTAINER_PP_MEMBER_IT_FORWARD(z, n, data) \
-BOOST_PP_CAT(*this->m_p, n) \
-//!
-
-#define BOOST_CONTAINER_PP_TEMPLATE_PARAM_VOID_DEFAULT(z, n, data)   \
-  BOOST_PP_CAT(class P, n) = void                                    \
-//!
-
-#define BOOST_CONTAINER_PP_TEMPLATE_PARAM_WITH_DEFAULT(z, n, default_type) \
-  BOOST_PP_CAT(class P, n) = default_type                                  \
-//!
-
-#define BOOST_CONTAINER_PP_STATIC_PARAM_REF_DECLARE(z, n, data) \
-   static BOOST_PP_CAT(P, n) & BOOST_PP_CAT(p, n); \
-//!
-
-#define BOOST_CONTAINER_PP_PARAM_PASS(z, n, data) \
-   BOOST_PP_CAT(p, n) \
-//!
-
-#define BOOST_CONTAINER_PP_FWD_TYPE(z, n, data) \
-   typename ::ndnboost::move_detail::forward_type< BOOST_PP_CAT(P, n) >::type \
-//!
-
-#include <ndnboost/container/detail/config_end.hpp>
-
-//#else
-
-//#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
-//#error "This file is not needed when perfect forwarding is available"
-//#endif   //BOOST_CONTAINER_PERFECT_FORWARDING
-
-#endif //#ifndef BOOST_CONTAINER_DETAIL_PREPROCESSOR_HPP
diff --git a/ndnboost/container/detail/workaround.hpp b/ndnboost/container/detail/workaround.hpp
deleted file mode 100644
index e8d77c0..0000000
--- a/ndnboost/container/detail/workaround.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
-#define BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
-
-#include <ndnboost/container/detail/config_begin.hpp>
-
-#if    !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)\
-    && !defined(BOOST_INTERPROCESS_DISABLE_VARIADIC_TMPL)
-   #define BOOST_CONTAINER_PERFECT_FORWARDING
-#endif
-
-#if defined(BOOST_NO_CXX11_NOEXCEPT)
-   #if defined(BOOST_MSVC)
-      #define BOOST_CONTAINER_NOEXCEPT throw()
-   #else
-      #define BOOST_CONTAINER_NOEXCEPT
-   #endif
-   #define BOOST_CONTAINER_NOEXCEPT_IF(x)
-#else
-   #define BOOST_CONTAINER_NOEXCEPT    noexcept
-   #define BOOST_CONTAINER_NOEXCEPT_IF(x) noexcept(x)
-#endif
-
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && defined(__GXX_EXPERIMENTAL_CXX0X__)\
-    && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40700)
-   #define BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST
-#endif
-
-//Macros for documentation purposes. For code, expands to the argument
-#define BOOST_CONTAINER_IMPDEF(TYPE) TYPE
-#define BOOST_CONTAINER_SEEDOC(TYPE) TYPE
-
-#include <ndnboost/container/detail/config_end.hpp>
-
-#endif   //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
diff --git a/ndnboost/cstdlib.hpp b/ndnboost/cstdlib.hpp
new file mode 100644
index 0000000..5101ba7
--- /dev/null
+++ b/ndnboost/cstdlib.hpp
@@ -0,0 +1,41 @@
+//  boost/cstdlib.hpp header  ------------------------------------------------//
+
+//  Copyright Beman Dawes 2001.  Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/utility/cstdlib.html for documentation.
+
+//  Revision History
+//   26 Feb 01  Initial version (Beman Dawes)
+
+#ifndef BOOST_CSTDLIB_HPP
+#define BOOST_CSTDLIB_HPP
+
+#include <cstdlib>
+
+namespace ndnboost
+{
+   //  The intent is to propose the following for addition to namespace std
+   //  in the C++ Standard Library, and to then deprecate EXIT_SUCCESS and
+   //  EXIT_FAILURE.  As an implementation detail, this header defines the
+   //  new constants in terms of EXIT_SUCCESS and EXIT_FAILURE.  In a new
+   //  standard, the constants would be implementation-defined, although it
+   //  might be worthwhile to "suggest" (which a standard is allowed to do)
+   //  values of 0 and 1 respectively.
+
+   //  Rationale for having multiple failure values: some environments may
+   //  wish to distinguish between different classes of errors.
+   //  Rationale for choice of values: programs often use values < 100 for
+   //  their own error reporting.  Values > 255 are sometimes reserved for
+   //  system detected errors.  200/201 were suggested to minimize conflict.
+
+   const int exit_success = EXIT_SUCCESS;  // implementation-defined value
+   const int exit_failure = EXIT_FAILURE;  // implementation-defined value
+   const int exit_exception_failure = 200; // otherwise uncaught exception
+   const int exit_test_failure = 201;      // report_error or
+                                           //  report_critical_error called.
+}
+
+#endif
+
diff --git a/ndnboost/detail/binary_search.hpp b/ndnboost/detail/binary_search.hpp
new file mode 100644
index 0000000..da27f39
--- /dev/null
+++ b/ndnboost/detail/binary_search.hpp
@@ -0,0 +1,216 @@
+// Copyright (c)  2000 David Abrahams. 
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+// 
+// Copyright (c) 1994
+// Hewlett-Packard Company
+// 
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appear in all copies and
+// that both that copyright notice and this permission notice appear
+// in supporting documentation.  Hewlett-Packard Company makes no
+// representations about the suitability of this software for any
+// purpose.  It is provided "as is" without express or implied warranty.
+// 
+// Copyright (c) 1996
+// Silicon Graphics Computer Systems, Inc.
+// 
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appear in all copies and
+// that both that copyright notice and this permission notice appear
+// in supporting documentation.  Silicon Graphics makes no
+// representations about the suitability of this software for any
+// purpose.  It is provided "as is" without express or implied warranty.
+// 
+#ifndef BINARY_SEARCH_DWA_122600_H_
+# define BINARY_SEARCH_DWA_122600_H_
+
+# include <ndnboost/detail/iterator.hpp>
+# include <utility>
+
+namespace ndnboost { namespace detail {
+
+template <class ForwardIter, class Tp>
+ForwardIter lower_bound(ForwardIter first, ForwardIter last,
+                             const Tp& val) 
+{
+    typedef detail::iterator_traits<ForwardIter> traits;
+    
+    typename traits::difference_type len = ndnboost::detail::distance(first, last);
+    typename traits::difference_type half;
+    ForwardIter middle;
+
+    while (len > 0) {
+      half = len >> 1;
+      middle = first;
+      std::advance(middle, half);
+      if (*middle < val) {
+        first = middle;
+        ++first;
+        len = len - half - 1;
+      }
+      else
+        len = half;
+    }
+    return first;
+}
+
+template <class ForwardIter, class Tp, class Compare>
+ForwardIter lower_bound(ForwardIter first, ForwardIter last,
+                              const Tp& val, Compare comp)
+{
+  typedef detail::iterator_traits<ForwardIter> traits;
+
+  typename traits::difference_type len = ndnboost::detail::distance(first, last);
+  typename traits::difference_type half;
+  ForwardIter middle;
+
+  while (len > 0) {
+    half = len >> 1;
+    middle = first;
+    std::advance(middle, half);
+    if (comp(*middle, val)) {
+      first = middle;
+      ++first;
+      len = len - half - 1;
+    }
+    else
+      len = half;
+  }
+  return first;
+}
+
+template <class ForwardIter, class Tp>
+ForwardIter upper_bound(ForwardIter first, ForwardIter last,
+                           const Tp& val)
+{
+  typedef detail::iterator_traits<ForwardIter> traits;
+
+  typename traits::difference_type len = ndnboost::detail::distance(first, last);
+  typename traits::difference_type half;
+  ForwardIter middle;
+
+  while (len > 0) {
+    half = len >> 1;
+    middle = first;
+    std::advance(middle, half);
+    if (val < *middle)
+      len = half;
+    else {
+      first = middle;
+      ++first;
+      len = len - half - 1;
+    }
+  }
+  return first;
+}
+
+template <class ForwardIter, class Tp, class Compare>
+ForwardIter upper_bound(ForwardIter first, ForwardIter last,
+                           const Tp& val, Compare comp)
+{
+  typedef detail::iterator_traits<ForwardIter> traits;
+
+  typename traits::difference_type len = ndnboost::detail::distance(first, last);
+  typename traits::difference_type half;
+  ForwardIter middle;
+
+  while (len > 0) {
+    half = len >> 1;
+    middle = first;
+    std::advance(middle, half);
+    if (comp(val, *middle))
+      len = half;
+    else {
+      first = middle;
+      ++first;
+      len = len - half - 1;
+    }
+  }
+  return first;
+}
+
+template <class ForwardIter, class Tp>
+std::pair<ForwardIter, ForwardIter>
+equal_range(ForwardIter first, ForwardIter last, const Tp& val)
+{
+  typedef detail::iterator_traits<ForwardIter> traits;
+
+  typename traits::difference_type len = ndnboost::detail::distance(first, last);
+  typename traits::difference_type half;
+  ForwardIter middle, left, right;
+
+  while (len > 0) {
+    half = len >> 1;
+    middle = first;
+    std::advance(middle, half);
+    if (*middle < val) {
+      first = middle;
+      ++first;
+      len = len - half - 1;
+    }
+    else if (val < *middle)
+      len = half;
+    else {
+      left = ndnboost::detail::lower_bound(first, middle, val);
+      std::advance(first, len);
+      right = ndnboost::detail::upper_bound(++middle, first, val);
+      return std::pair<ForwardIter, ForwardIter>(left, right);
+    }
+  }
+  return std::pair<ForwardIter, ForwardIter>(first, first);
+}
+
+template <class ForwardIter, class Tp, class Compare>
+std::pair<ForwardIter, ForwardIter>
+equal_range(ForwardIter first, ForwardIter last, const Tp& val,
+              Compare comp)
+{
+  typedef detail::iterator_traits<ForwardIter> traits;
+
+  typename traits::difference_type len = ndnboost::detail::distance(first, last);
+  typename traits::difference_type half;
+  ForwardIter middle, left, right;
+
+  while (len > 0) {
+    half = len >> 1;
+    middle = first;
+    std::advance(middle, half);
+    if (comp(*middle, val)) {
+      first = middle;
+      ++first;
+      len = len - half - 1;
+    }
+    else if (comp(val, *middle))
+      len = half;
+    else {
+      left = ndnboost::detail::lower_bound(first, middle, val, comp);
+      std::advance(first, len);
+      right = ndnboost::detail::upper_bound(++middle, first, val, comp);
+      return std::pair<ForwardIter, ForwardIter>(left, right);
+    }
+  }
+  return std::pair<ForwardIter, ForwardIter>(first, first);
+}           
+
+template <class ForwardIter, class Tp>
+bool binary_search(ForwardIter first, ForwardIter last,
+                   const Tp& val) {
+  ForwardIter i = ndnboost::detail::lower_bound(first, last, val);
+  return i != last && !(val < *i);
+}
+
+template <class ForwardIter, class Tp, class Compare>
+bool binary_search(ForwardIter first, ForwardIter last,
+                   const Tp& val,
+                   Compare comp) {
+  ForwardIter i = ndnboost::detail::lower_bound(first, last, val, comp);
+  return i != last && !comp(val, *i);
+}
+
+}} // namespace ndnboost::detail
+
+#endif // BINARY_SEARCH_DWA_122600_H_
diff --git a/ndnboost/detail/endian.hpp b/ndnboost/detail/endian.hpp
new file mode 100644
index 0000000..ccee87f
--- /dev/null
+++ b/ndnboost/detail/endian.hpp
@@ -0,0 +1,126 @@
+// Copyright 2005 Caleb Epstein
+// Copyright 2006 John Maddock
+// Copyright 2010 Rene Rivera
+// Distributed under the Boost Software License, Version 1.0. (See accompany-
+// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+/*
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/*
+ * Copyright notice reproduced from <ndnboost/detail/limits.hpp>, from
+ * which this code was originally taken.
+ *
+ * Modified by Caleb Epstein to use <endian.h> with GNU libc and to
+ * defined the BOOST_ENDIAN macro.
+ */
+
+#ifndef BOOST_DETAIL_ENDIAN_HPP
+#define BOOST_DETAIL_ENDIAN_HPP
+
+//
+// Special cases come first:
+//
+#if defined (__GLIBC__)
+// GNU libc offers the helpful header <endian.h> which defines
+// __BYTE_ORDER
+# include <endian.h>
+# if (__BYTE_ORDER == __LITTLE_ENDIAN)
+#  define BOOST_LITTLE_ENDIAN
+# elif (__BYTE_ORDER == __BIG_ENDIAN)
+#  define BOOST_BIG_ENDIAN
+# elif (__BYTE_ORDER == __PDP_ENDIAN)
+#  define BOOST_PDP_ENDIAN
+# else
+#  error Unknown machine endianness detected.
+# endif
+# define BOOST_BYTE_ORDER __BYTE_ORDER
+
+#elif defined(__NetBSD__) || defined(__FreeBSD__) || \
+    defined(__OpenBSD__) || (__DragonFly__)
+//
+// BSD has endian.h, see https://svn.boost.org/trac/boost/ticket/6013
+#  if defined(__OpenBSD__)
+#  include <machine/endian.h>
+#  else
+#  include <sys/endian.h>
+#  endif
+# if (_BYTE_ORDER == _LITTLE_ENDIAN)
+#  define BOOST_LITTLE_ENDIAN
+# elif (_BYTE_ORDER == _BIG_ENDIAN)
+#  define BOOST_BIG_ENDIAN
+# elif (_BYTE_ORDER == _PDP_ENDIAN)
+#  define BOOST_PDP_ENDIAN
+# else
+#  error Unknown machine endianness detected.
+# endif
+# define BOOST_BYTE_ORDER _BYTE_ORDER
+
+#elif defined( __ANDROID__ )
+// Adroid specific code, see: https://svn.boost.org/trac/boost/ticket/7528
+// Here we can use machine/_types.h, see:
+// http://stackoverflow.com/questions/6212951/endianness-of-android-ndk
+# include "machine/_types.h"
+# ifdef __ARMEB__
+#  define BOOST_BIG_ENDIAN
+#  define BOOST_BYTE_ORDER 4321
+# else
+#  define BOOST_LITTLE_ENDIAN
+#  define BOOST_BYTE_ORDER 1234
+# endif // __ARMEB__
+
+#elif defined( _XBOX )
+//
+// XBox is always big endian??
+//
+# define BOOST_BIG_ENDIAN
+# define BOOST_BYTE_ORDER 4321
+
+#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \
+    defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) || \
+    defined(__BIGENDIAN__) && !defined(__LITTLEENDIAN__) || \
+    defined(_STLP_BIG_ENDIAN) && !defined(_STLP_LITTLE_ENDIAN)
+# define BOOST_BIG_ENDIAN
+# define BOOST_BYTE_ORDER 4321
+#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \
+    defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) || \
+    defined(__LITTLEENDIAN__) && !defined(__BIGENDIAN__) || \
+    defined(_STLP_LITTLE_ENDIAN) && !defined(_STLP_BIG_ENDIAN)
+# define BOOST_LITTLE_ENDIAN
+# define BOOST_BYTE_ORDER 1234
+#elif defined(__sparc) || defined(__sparc__) \
+   || defined(_POWER) || defined(__powerpc__) \
+   || defined(__ppc__) || defined(__hpux) || defined(__hppa) \
+   || defined(_MIPSEB) || defined(_POWER) \
+   || defined(__s390__) || defined(__ARMEB__)
+# define BOOST_BIG_ENDIAN
+# define BOOST_BYTE_ORDER 4321
+#elif defined(__i386__) || defined(__alpha__) \
+   || defined(__ia64) || defined(__ia64__) \
+   || defined(_M_IX86) || defined(_M_IA64) \
+   || defined(_M_ALPHA) || defined(__amd64) \
+   || defined(__amd64__) || defined(_M_AMD64) \
+   || defined(__x86_64) || defined(__x86_64__) \
+   || defined(_M_X64) || defined(__bfin__) \
+   || defined(__ARMEL__) \
+   || (defined(_WIN32) && defined(__ARM__) && defined(_MSC_VER)) // ARM Windows CE don't define anything reasonably unique, but there are no big-endian Windows versions 
+
+# define BOOST_LITTLE_ENDIAN
+# define BOOST_BYTE_ORDER 1234
+#else
+# error The file boost/detail/endian.hpp needs to be set up for your CPU type.
+#endif
+
+
+#endif
+
diff --git a/ndnboost/detail/fenv.hpp b/ndnboost/detail/fenv.hpp
new file mode 100644
index 0000000..4618b54
--- /dev/null
+++ b/ndnboost/detail/fenv.hpp
@@ -0,0 +1,74 @@
+/*=============================================================================
+    Copyright (c) 2010      Bryce Lelbach
+
+    Distributed under the Boost Software License, Version 1.0. (See accompanying
+    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+#include <ndnboost/config.hpp>
+
+#if defined(BOOST_NO_FENV_H)
+  #error This platform does not have a floating point environment
+#endif
+
+#if !defined(BOOST_DETAIL_FENV_HPP)
+#define BOOST_DETAIL_FENV_HPP
+
+/* If we're using clang + glibc, we have to get hacky. 
+ * See http://llvm.org/bugs/show_bug.cgi?id=6907 */
+#if defined(__clang__)       &&  (__clang_major__ < 3) &&    \
+    defined(__GNU_LIBRARY__) && /* up to version 5 */ \
+    defined(__GLIBC__) &&         /* version 6 + */ \
+    !defined(_FENV_H)
+  #define _FENV_H
+
+  #include <features.h>
+  #include <bits/fenv.h>
+
+  extern "C" {
+    extern int fegetexceptflag (fexcept_t*, int) __THROW;
+    extern int fesetexceptflag (__const fexcept_t*, int) __THROW;
+    extern int feclearexcept (int) __THROW;
+    extern int feraiseexcept (int) __THROW;
+    extern int fetestexcept (int) __THROW;
+    extern int fegetround (void) __THROW;
+    extern int fesetround (int) __THROW;
+    extern int fegetenv (fenv_t*) __THROW;
+    extern int fesetenv (__const fenv_t*) __THROW;
+    extern int feupdateenv (__const fenv_t*) __THROW;
+    extern int feholdexcept (fenv_t*) __THROW;
+
+    #ifdef __USE_GNU
+      extern int feenableexcept (int) __THROW;
+      extern int fedisableexcept (int) __THROW;
+      extern int fegetexcept (void) __THROW;
+    #endif
+  }
+
+  namespace std { namespace tr1 {
+    using ::fenv_t;
+    using ::fexcept_t;
+    using ::fegetexceptflag;
+    using ::fesetexceptflag;
+    using ::feclearexcept;
+    using ::feraiseexcept;
+    using ::fetestexcept;
+    using ::fegetround;
+    using ::fesetround;
+    using ::fegetenv;
+    using ::fesetenv;
+    using ::feupdateenv;
+    using ::feholdexcept;
+  } }
+
+#else /* if we're not using GNU's C stdlib, fenv.h should work with clang */
+  #if defined(__SUNPRO_CC) /* lol suncc */
+    #include <stdio.h>
+  #endif
+  
+  #include <fenv.h>
+
+#endif
+
+#endif /* BOOST_DETAIL_FENV_HPP */
+ 
diff --git a/ndnboost/detail/indirect_traits.hpp b/ndnboost/detail/indirect_traits.hpp
new file mode 100644
index 0000000..fa2d671
--- /dev/null
+++ b/ndnboost/detail/indirect_traits.hpp
@@ -0,0 +1,487 @@
+// Copyright David Abrahams 2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+#ifndef INDIRECT_TRAITS_DWA2002131_HPP
+# define INDIRECT_TRAITS_DWA2002131_HPP
+# include <ndnboost/type_traits/is_function.hpp>
+# include <ndnboost/type_traits/is_reference.hpp>
+# include <ndnboost/type_traits/is_pointer.hpp>
+# include <ndnboost/type_traits/is_class.hpp>
+# include <ndnboost/type_traits/is_const.hpp>
+# include <ndnboost/type_traits/is_volatile.hpp>
+# include <ndnboost/type_traits/is_member_function_pointer.hpp>
+# include <ndnboost/type_traits/is_member_pointer.hpp>
+# include <ndnboost/type_traits/remove_cv.hpp>
+# include <ndnboost/type_traits/remove_reference.hpp>
+# include <ndnboost/type_traits/remove_pointer.hpp>
+
+# include <ndnboost/type_traits/detail/ice_and.hpp>
+# include <ndnboost/detail/workaround.hpp>
+
+# include <ndnboost/mpl/eval_if.hpp>
+# include <ndnboost/mpl/if.hpp>
+# include <ndnboost/mpl/bool.hpp>
+# include <ndnboost/mpl/and.hpp>
+# include <ndnboost/mpl/not.hpp>
+# include <ndnboost/mpl/aux_/lambda_support.hpp>
+
+#  ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#   include <ndnboost/detail/is_function_ref_tester.hpp>
+#  endif 
+
+namespace ndnboost { namespace detail {
+
+namespace indirect_traits {
+
+#  ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+template <class T>
+struct is_reference_to_const : mpl::false_
+{
+};
+
+template <class T>
+struct is_reference_to_const<T const&> : mpl::true_
+{
+};
+
+#   if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
+template<class T>
+struct is_reference_to_const<T const volatile&> : mpl::true_
+{
+};
+#   endif 
+
+template <class T>
+struct is_reference_to_function : mpl::false_
+{
+};
+
+template <class T>
+struct is_reference_to_function<T&> : is_function<T>
+{
+};
+
+template <class T>
+struct is_pointer_to_function : mpl::false_
+{
+};
+
+// There's no such thing as a pointer-to-cv-function, so we don't need
+// specializations for those
+template <class T>
+struct is_pointer_to_function<T*> : is_function<T>
+{
+};
+
+template <class T>
+struct is_reference_to_member_function_pointer_impl : mpl::false_
+{
+};
+
+template <class T>
+struct is_reference_to_member_function_pointer_impl<T&>
+    : is_member_function_pointer<typename remove_cv<T>::type>
+{
+};
+
+
+template <class T>
+struct is_reference_to_member_function_pointer
+    : is_reference_to_member_function_pointer_impl<T>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T))
+};
+
+template <class T>
+struct is_reference_to_function_pointer_aux
+    : mpl::and_<
+          is_reference<T>
+        , is_pointer_to_function<
+              typename remove_cv<
+                  typename remove_reference<T>::type
+              >::type
+          >
+      >
+{
+    // There's no such thing as a pointer-to-cv-function, so we don't need specializations for those
+};
+
+template <class T>
+struct is_reference_to_function_pointer
+    : mpl::if_<
+          is_reference_to_function<T>
+        , mpl::false_
+        , is_reference_to_function_pointer_aux<T>
+     >::type
+{
+};
+
+template <class T>
+struct is_reference_to_non_const
+    : mpl::and_<
+          is_reference<T>
+        , mpl::not_<
+             is_reference_to_const<T>
+          >
+      >
+{
+};
+
+template <class T>
+struct is_reference_to_volatile : mpl::false_
+{
+};
+
+template <class T>
+struct is_reference_to_volatile<T volatile&> : mpl::true_
+{
+};
+
+#   if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
+template <class T>
+struct is_reference_to_volatile<T const volatile&> : mpl::true_
+{
+};
+#   endif 
+
+
+template <class T>
+struct is_reference_to_pointer : mpl::false_
+{
+};
+
+template <class T>
+struct is_reference_to_pointer<T*&> : mpl::true_
+{
+};
+
+template <class T>
+struct is_reference_to_pointer<T* const&> : mpl::true_
+{
+};
+
+template <class T>
+struct is_reference_to_pointer<T* volatile&> : mpl::true_
+{
+};
+
+template <class T>
+struct is_reference_to_pointer<T* const volatile&> : mpl::true_
+{
+};
+
+template <class T>
+struct is_reference_to_class
+    : mpl::and_<
+          is_reference<T>
+        , is_class<
+              typename remove_cv<
+                  typename remove_reference<T>::type
+              >::type
+          >
+      >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T))
+};
+
+template <class T>
+struct is_pointer_to_class
+    : mpl::and_<
+          is_pointer<T>
+        , is_class<
+              typename remove_cv<
+                  typename remove_pointer<T>::type
+              >::type
+          >
+      >
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_class,(T))
+};
+
+#  else
+
+using namespace ndnboost::detail::is_function_ref_tester_;
+
+typedef char (&inner_yes_type)[3];
+typedef char (&inner_no_type)[2];
+typedef char (&outer_no_type)[1];
+
+template <typename V>
+struct is_const_help
+{
+    typedef typename mpl::if_<
+          is_const<V>
+        , inner_yes_type
+        , inner_no_type
+        >::type type;
+};
+
+template <typename V>
+struct is_volatile_help
+{
+    typedef typename mpl::if_<
+          is_volatile<V>
+        , inner_yes_type
+        , inner_no_type
+        >::type type;
+};
+
+template <typename V>
+struct is_pointer_help
+{
+    typedef typename mpl::if_<
+          is_pointer<V>
+        , inner_yes_type
+        , inner_no_type
+        >::type type;
+};
+
+template <typename V>
+struct is_class_help
+{
+    typedef typename mpl::if_<
+          is_class<V>
+        , inner_yes_type
+        , inner_no_type
+        >::type type;
+};
+
+template <class T>
+struct is_reference_to_function_aux
+{
+    static T t;
+    BOOST_STATIC_CONSTANT(
+        bool, value = sizeof(detail::is_function_ref_tester(t,0)) == sizeof(::ndnboost::type_traits::yes_type));
+    typedef mpl::bool_<value> type;
+ };
+
+template <class T>
+struct is_reference_to_function
+    : mpl::if_<is_reference<T>, is_reference_to_function_aux<T>, mpl::bool_<false> >::type
+{
+};
+
+template <class T>
+struct is_pointer_to_function_aux
+{
+    static T t;
+    BOOST_STATIC_CONSTANT(
+        bool, value
+        = sizeof(::ndnboost::type_traits::is_function_ptr_tester(t)) == sizeof(::ndnboost::type_traits::yes_type));
+    typedef mpl::bool_<value> type;
+};
+
+template <class T>
+struct is_pointer_to_function
+    : mpl::if_<is_pointer<T>, is_pointer_to_function_aux<T>, mpl::bool_<false> >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_function,(T))
+};
+
+struct false_helper1
+{
+    template <class T>
+    struct apply : mpl::false_
+    {
+    };
+};
+
+template <typename V>
+typename is_const_help<V>::type reference_to_const_helper(V&);    
+outer_no_type
+reference_to_const_helper(...);
+
+struct true_helper1
+{
+    template <class T>
+    struct apply
+    {
+        static T t;
+        BOOST_STATIC_CONSTANT(
+            bool, value
+            = sizeof(reference_to_const_helper(t)) == sizeof(inner_yes_type));
+        typedef mpl::bool_<value> type;
+    };
+};
+
+template <bool ref = true>
+struct is_reference_to_const_helper1 : true_helper1
+{
+};
+
+template <>
+struct is_reference_to_const_helper1<false> : false_helper1
+{
+};
+
+
+template <class T>
+struct is_reference_to_const
+    : is_reference_to_const_helper1<is_reference<T>::value>::template apply<T>
+{
+};
+
+
+template <bool ref = true>
+struct is_reference_to_non_const_helper1
+{
+    template <class T>
+    struct apply
+    {
+        static T t;
+        BOOST_STATIC_CONSTANT(
+            bool, value
+            = sizeof(reference_to_const_helper(t)) == sizeof(inner_no_type));
+        
+        typedef mpl::bool_<value> type;
+    };
+};
+
+template <>
+struct is_reference_to_non_const_helper1<false> : false_helper1
+{
+};
+
+
+template <class T>
+struct is_reference_to_non_const
+    : is_reference_to_non_const_helper1<is_reference<T>::value>::template apply<T>
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_non_const,(T))
+};
+
+
+template <typename V>
+typename is_volatile_help<V>::type reference_to_volatile_helper(V&);    
+outer_no_type
+reference_to_volatile_helper(...);
+
+template <bool ref = true>
+struct is_reference_to_volatile_helper1
+{
+    template <class T>
+    struct apply
+    {
+        static T t;
+        BOOST_STATIC_CONSTANT(
+            bool, value
+            = sizeof(reference_to_volatile_helper(t)) == sizeof(inner_yes_type));
+        typedef mpl::bool_<value> type;
+    };
+};
+
+template <>
+struct is_reference_to_volatile_helper1<false> : false_helper1
+{
+};
+
+
+template <class T>
+struct is_reference_to_volatile
+    : is_reference_to_volatile_helper1<is_reference<T>::value>::template apply<T>
+{
+};
+
+template <typename V>
+typename is_pointer_help<V>::type reference_to_pointer_helper(V&);
+outer_no_type reference_to_pointer_helper(...);
+
+template <class T>
+struct reference_to_pointer_impl
+{
+    static T t;
+    BOOST_STATIC_CONSTANT(
+        bool, value
+        = (sizeof((reference_to_pointer_helper)(t)) == sizeof(inner_yes_type))
+        );
+    
+    typedef mpl::bool_<value> type;
+};
+    
+template <class T>
+struct is_reference_to_pointer
+  : mpl::eval_if<is_reference<T>, reference_to_pointer_impl<T>, mpl::false_>::type
+{   
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_pointer,(T))
+};
+
+template <class T>
+struct is_reference_to_function_pointer
+  : mpl::eval_if<is_reference<T>, is_pointer_to_function_aux<T>, mpl::false_>::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_function_pointer,(T))
+};
+
+
+template <class T>
+struct is_member_function_pointer_help
+    : mpl::if_<is_member_function_pointer<T>, inner_yes_type, inner_no_type>
+{};
+
+template <typename V>
+typename is_member_function_pointer_help<V>::type member_function_pointer_helper(V&);
+outer_no_type member_function_pointer_helper(...);
+
+template <class T>
+struct is_pointer_to_member_function_aux
+{
+    static T t;
+    BOOST_STATIC_CONSTANT(
+        bool, value
+        = sizeof((member_function_pointer_helper)(t)) == sizeof(inner_yes_type));
+    typedef mpl::bool_<value> type;
+};
+
+template <class T>
+struct is_reference_to_member_function_pointer
+    : mpl::if_<
+        is_reference<T>
+        , is_pointer_to_member_function_aux<T>
+        , mpl::bool_<false>
+     >::type
+{
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T))
+};
+
+template <typename V>
+typename is_class_help<V>::type reference_to_class_helper(V const volatile&);
+outer_no_type reference_to_class_helper(...);
+
+template <class T>
+struct is_reference_to_class
+{
+    static T t;
+    BOOST_STATIC_CONSTANT(
+        bool, value
+        = (is_reference<T>::value
+           & (sizeof(reference_to_class_helper(t)) == sizeof(inner_yes_type)))
+        );
+    typedef mpl::bool_<value> type;
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T))
+};
+
+template <typename V>
+typename is_class_help<V>::type pointer_to_class_helper(V const volatile*);
+outer_no_type pointer_to_class_helper(...);
+
+template <class T>
+struct is_pointer_to_class
+{
+    static T t;
+    BOOST_STATIC_CONSTANT(
+        bool, value
+        = (is_pointer<T>::value
+           && sizeof(pointer_to_class_helper(t)) == sizeof(inner_yes_type))
+        );
+    typedef mpl::bool_<value> type;
+};
+#  endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION 
+
+}
+
+using namespace indirect_traits;
+
+}} // namespace ndnboost::python::detail
+
+#endif // INDIRECT_TRAITS_DWA2002131_HPP
diff --git a/ndnboost/detail/is_function_ref_tester.hpp b/ndnboost/detail/is_function_ref_tester.hpp
new file mode 100644
index 0000000..b8301ec
--- /dev/null
+++ b/ndnboost/detail/is_function_ref_tester.hpp
@@ -0,0 +1,136 @@
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, 
+// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000.  
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#if !defined(BOOST_PP_IS_ITERATING)
+
+///// header body
+
+#ifndef BOOST_DETAIL_IS_FUNCTION_REF_TESTER_HPP_INCLUDED
+#define BOOST_DETAIL_IS_FUNCTION_REF_TESTER_HPP_INCLUDED
+
+#include "ndnboost/type_traits/detail/yes_no_type.hpp"
+#include "ndnboost/type_traits/config.hpp"
+
+#if defined(BOOST_TT_PREPROCESSING_MODE)
+#   include "ndnboost/preprocessor/iterate.hpp"
+#   include "ndnboost/preprocessor/enum_params.hpp"
+#   include "ndnboost/preprocessor/comma_if.hpp"
+#endif
+
+namespace ndnboost {
+namespace detail {
+namespace is_function_ref_tester_ {
+
+template <class T>
+ndnboost::type_traits::no_type BOOST_TT_DECL is_function_ref_tester(T& ...);
+
+#if !defined(BOOST_TT_PREPROCESSING_MODE)
+// preprocessor-generated part, don't edit by hand!
+
+template <class R>
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(), int);
+
+template <class R,class T0 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0), int);
+
+template <class R,class T0,class T1 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1), int);
+
+template <class R,class T0,class T1,class T2 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2), int);
+
+template <class R,class T0,class T1,class T2,class T3 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23), int);
+
+template <class R,class T0,class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10,class T11,class T12,class T13,class T14,class T15,class T16,class T17,class T18,class T19,class T20,class T21,class T22,class T23,class T24 >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24), int);
+
+#else
+
+#define BOOST_PP_ITERATION_PARAMS_1 \
+    (3, (0, 25, "ndnboost/detail/is_function_ref_tester.hpp"))
+#include BOOST_PP_ITERATE()
+
+#endif // BOOST_TT_PREPROCESSING_MODE
+
+} // namespace detail
+} // namespace python
+} // namespace ndnboost
+
+#endif // BOOST_DETAIL_IS_FUNCTION_REF_TESTER_HPP_INCLUDED
+
+///// iteration
+
+#else
+#define i BOOST_PP_FRAME_ITERATION(1)
+
+template <class R BOOST_PP_COMMA_IF(i) BOOST_PP_ENUM_PARAMS(i,class T) >
+ndnboost::type_traits::yes_type is_function_ref_tester(R (&)(BOOST_PP_ENUM_PARAMS(i,T)), int);
+
+#undef i
+#endif // BOOST_PP_IS_ITERATING
+
diff --git a/ndnboost/detail/lcast_precision.hpp b/ndnboost/detail/lcast_precision.hpp
new file mode 100644
index 0000000..b763a83
--- /dev/null
+++ b/ndnboost/detail/lcast_precision.hpp
@@ -0,0 +1,184 @@
+// Copyright Alexander Nasonov & Paul A. Bristow 2006.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED
+#define BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED
+
+#include <climits>
+#include <ios>
+#include <limits>
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/integer_traits.hpp>
+
+#ifndef BOOST_NO_IS_ABSTRACT
+// Fix for SF:1358600 - lexical_cast & pure virtual functions & VC 8 STL
+#include <ndnboost/mpl/if.hpp>
+#include <ndnboost/type_traits/is_abstract.hpp>
+#endif
+
+#if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || \
+  (defined(BOOST_MSVC) && (BOOST_MSVC<1310))
+
+#define BOOST_LCAST_NO_COMPILE_TIME_PRECISION
+#endif
+
+#ifdef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
+#include <ndnboost/assert.hpp>
+#else
+#include <ndnboost/static_assert.hpp>
+#endif
+
+namespace ndnboost { namespace detail {
+
+class lcast_abstract_stub {};
+
+#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
+// Calculate an argument to pass to std::ios_base::precision from
+// lexical_cast. See alternative implementation for broken standard
+// libraries in lcast_get_precision below. Keep them in sync, please.
+template<class T>
+struct lcast_precision
+{
+#ifdef BOOST_NO_IS_ABSTRACT
+    typedef std::numeric_limits<T> limits; // No fix for SF:1358600.
+#else
+    typedef BOOST_DEDUCED_TYPENAME ndnboost::mpl::if_<
+        ndnboost::is_abstract<T>
+      , std::numeric_limits<lcast_abstract_stub>
+      , std::numeric_limits<T>
+      >::type limits;
+#endif
+
+    BOOST_STATIC_CONSTANT(bool, use_default_precision =
+            !limits::is_specialized || limits::is_exact
+        );
+
+    BOOST_STATIC_CONSTANT(bool, is_specialized_bin =
+            !use_default_precision &&
+            limits::radix == 2 && limits::digits > 0
+        );
+
+    BOOST_STATIC_CONSTANT(bool, is_specialized_dec =
+            !use_default_precision &&
+            limits::radix == 10 && limits::digits10 > 0
+        );
+
+    BOOST_STATIC_CONSTANT(std::streamsize, streamsize_max =
+            ndnboost::integer_traits<std::streamsize>::const_max
+        );
+
+    BOOST_STATIC_CONSTANT(unsigned int, precision_dec = limits::digits10 + 1U);
+
+    BOOST_STATIC_ASSERT(!is_specialized_dec ||
+            precision_dec <= streamsize_max + 0UL
+        );
+
+    BOOST_STATIC_CONSTANT(unsigned long, precision_bin =
+            2UL + limits::digits * 30103UL / 100000UL
+        );
+
+    BOOST_STATIC_ASSERT(!is_specialized_bin ||
+            (limits::digits + 0UL < ULONG_MAX / 30103UL &&
+            precision_bin > limits::digits10 + 0UL &&
+            precision_bin <= streamsize_max + 0UL)
+        );
+
+    BOOST_STATIC_CONSTANT(std::streamsize, value =
+            is_specialized_bin ? precision_bin
+                               : is_specialized_dec ? precision_dec : 6
+        );
+};
+#endif
+
+template<class T>
+inline std::streamsize lcast_get_precision(T* = 0)
+{
+#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
+    return lcast_precision<T>::value;
+#else // Follow lcast_precision algorithm at run-time:
+
+#ifdef BOOST_NO_IS_ABSTRACT
+    typedef std::numeric_limits<T> limits; // No fix for SF:1358600.
+#else
+    typedef BOOST_DEDUCED_TYPENAME ndnboost::mpl::if_<
+        ndnboost::is_abstract<T>
+      , std::numeric_limits<lcast_abstract_stub>
+      , std::numeric_limits<T>
+      >::type limits;
+#endif
+
+    bool const use_default_precision =
+        !limits::is_specialized || limits::is_exact;
+
+    if(!use_default_precision)
+    { // Includes all built-in floating-point types, float, double ...
+      // and UDT types for which digits (significand bits) is defined (not zero)
+
+        bool const is_specialized_bin =
+            limits::radix == 2 && limits::digits > 0;
+        bool const is_specialized_dec =
+            limits::radix == 10 && limits::digits10 > 0;
+        std::streamsize const streamsize_max =
+            (ndnboost::integer_traits<std::streamsize>::max)();
+
+        if(is_specialized_bin)
+        { // Floating-point types with
+          // limits::digits defined by the specialization.
+
+            unsigned long const digits = limits::digits;
+            unsigned long const precision = 2UL + digits * 30103UL / 100000UL;
+            // unsigned long is selected because it is at least 32-bits
+            // and thus ULONG_MAX / 30103UL is big enough for all types.
+            BOOST_ASSERT(
+                    digits < ULONG_MAX / 30103UL &&
+                    precision > limits::digits10 + 0UL &&
+                    precision <= streamsize_max + 0UL
+                );
+            return precision;
+        }
+        else if(is_specialized_dec)
+        {   // Decimal Floating-point type, most likely a User Defined Type
+            // rather than a real floating-point hardware type.
+            unsigned int const precision = limits::digits10 + 1U;
+            BOOST_ASSERT(precision <= streamsize_max + 0UL);
+            return precision;
+        }
+    }
+
+    // Integral type (for which precision has no effect)
+    // or type T for which limits is NOT specialized,
+    // so assume stream precision remains the default 6 decimal digits.
+    // Warning: if your User-defined Floating-point type T is NOT specialized,
+    // then you may lose accuracy by only using 6 decimal digits.
+    // To avoid this, you need to specialize T with either
+    // radix == 2 and digits == the number of significand bits,
+    // OR
+    // radix = 10 and digits10 == the number of decimal digits.
+
+    return 6;
+#endif
+}
+
+template<class T>
+inline void lcast_set_precision(std::ios_base& stream, T*)
+{
+    stream.precision(lcast_get_precision<T>());
+}
+
+template<class Source, class Target>
+inline void lcast_set_precision(std::ios_base& stream, Source*, Target*)
+{
+    std::streamsize const s = lcast_get_precision(static_cast<Source*>(0));
+    std::streamsize const t = lcast_get_precision(static_cast<Target*>(0));
+    stream.precision(s > t ? s : t);
+}
+
+}}
+
+#endif //  BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED
+
diff --git a/ndnboost/detail/reference_content.hpp b/ndnboost/detail/reference_content.hpp
new file mode 100644
index 0000000..52d2c02
--- /dev/null
+++ b/ndnboost/detail/reference_content.hpp
@@ -0,0 +1,141 @@
+//-----------------------------------------------------------------------------
+// boost detail/reference_content.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2003
+// Eric Friedman
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_REFERENCE_CONTENT_HPP
+#define BOOST_DETAIL_REFERENCE_CONTENT_HPP
+
+#include "ndnboost/config.hpp"
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#   include "ndnboost/mpl/bool.hpp"
+#   include "ndnboost/type_traits/has_nothrow_copy.hpp"
+#else
+#   include "ndnboost/mpl/if.hpp"
+#   include "ndnboost/type_traits/is_reference.hpp"
+#endif
+
+#include "ndnboost/mpl/void.hpp"
+
+namespace ndnboost {
+
+namespace detail {
+
+///////////////////////////////////////////////////////////////////////////////
+// (detail) class template reference_content
+//
+// Non-Assignable wrapper for references.
+//
+template <typename RefT>
+class reference_content
+{
+private: // representation
+
+    RefT content_;
+
+public: // structors
+
+    ~reference_content()
+    {
+    }
+
+    reference_content(RefT r)
+        : content_( r )
+    {
+    }
+
+    reference_content(const reference_content& operand)
+        : content_( operand.content_ )
+    {
+    }
+
+private: // non-Assignable
+
+    reference_content& operator=(const reference_content&);
+
+public: // queries
+
+    RefT get() const
+    {
+        return content_;
+    }
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// (detail) metafunction make_reference_content
+//
+// Wraps with reference_content if specified type is reference.
+//
+
+template <typename T = mpl::void_> struct make_reference_content;
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template <typename T>
+struct make_reference_content
+{
+    typedef T type;
+};
+
+template <typename T>
+struct make_reference_content< T& >
+{
+    typedef reference_content<T&> type;
+};
+
+#else // defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template <typename T>
+struct make_reference_content
+    : mpl::if_<
+          is_reference<T>
+        , reference_content<T>
+        , T
+        >
+{
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION workaround
+
+template <>
+struct make_reference_content< mpl::void_ >
+{
+    template <typename T>
+    struct apply
+        : make_reference_content<T>
+    {
+    };
+
+    typedef mpl::void_ type;
+};
+
+} // namespace detail
+
+///////////////////////////////////////////////////////////////////////////////
+// reference_content<T&> type traits specializations
+//
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template <typename T>
+struct has_nothrow_copy<
+      ::ndnboost::detail::reference_content< T& >
+    >
+    : mpl::true_
+{
+};
+
+#endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+} // namespace ndnboost
+
+#endif // BOOST_DETAIL_REFERENCE_CONTENT_HPP
diff --git a/ndnboost/detail/select_type.hpp b/ndnboost/detail/select_type.hpp
deleted file mode 100644
index 8e3cac7..0000000
--- a/ndnboost/detail/select_type.hpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// (C) Copyright David Abrahams 2001.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org for most recent version including documentation.
-
-// Revision History
-// 09 Feb 01  Applied John Maddock's Borland patch Moving <true>
-//            specialization to unspecialized template (David Abrahams)
-// 06 Feb 01  Created (David Abrahams)
-
-#ifndef SELECT_TYPE_DWA20010206_HPP
-# define SELECT_TYPE_DWA20010206_HPP
-
-namespace ndnboost { namespace detail {
-
-  // Template class if_true -- select among 2 types based on a bool constant expression
-  // Usage:
-  //   typename if_true<(bool_const_expression)>::template then<true_type, false_type>::type
-
-  // HP aCC cannot deal with missing names for template value parameters
-  template <bool b> struct if_true
-  {
-      template <class T, class F>
-      struct then { typedef T type; };
-  };
-
-  template <>
-  struct if_true<false>
-  {
-      template <class T, class F>
-      struct then { typedef F type; };
-  };
-}}
-#endif // SELECT_TYPE_DWA20010206_HPP
diff --git a/ndnboost/detail/templated_streams.hpp b/ndnboost/detail/templated_streams.hpp
deleted file mode 100644
index b1159f8..0000000
--- a/ndnboost/detail/templated_streams.hpp
+++ /dev/null
@@ -1,74 +0,0 @@
-//-----------------------------------------------------------------------------
-// boost detail/templated_streams.hpp header file
-// See http://www.boost.org for updates, documentation, and revision history.
-//-----------------------------------------------------------------------------
-//
-// Copyright (c) 2003
-// Eric Friedman
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_DETAIL_TEMPLATED_STREAMS_HPP
-#define BOOST_DETAIL_TEMPLATED_STREAMS_HPP
-
-#include "ndnboost/config.hpp"
-
-///////////////////////////////////////////////////////////////////////////////
-// (detail) BOOST_TEMPLATED_STREAM_* macros
-//
-// Provides workaround platforms without stream class templates.
-//
-
-#if !defined(BOOST_NO_STD_LOCALE)
-
-#define BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) \
-    template < typename E , typename T >
-
-#define BOOST_TEMPLATED_STREAM_TEMPLATE_ALLOC(E,T,A) \
-    template < typename E , typename T , typename A >
-
-#define BOOST_TEMPLATED_STREAM_ARGS(E,T) \
-    typename E , typename T 
-
-#define BOOST_TEMPLATED_STREAM_ARGS_ALLOC(E,T,A) \
-    typename E , typename T , typename A 
-
-#define BOOST_TEMPLATED_STREAM_COMMA        ,
-
-#define BOOST_TEMPLATED_STREAM_ELEM(E)      E
-#define BOOST_TEMPLATED_STREAM_TRAITS(T)    T
-#define BOOST_TEMPLATED_STREAM_ALLOC(A)     A
-
-#define BOOST_TEMPLATED_STREAM(X,E,T) \
-    BOOST_JOIN(std::basic_,X)< E , T >
-
-#define BOOST_TEMPLATED_STREAM_WITH_ALLOC(X,E,T,A) \
-    BOOST_JOIN(std::basic_,X)< E , T , A >
-
-#else // defined(BOOST_NO_STD_LOCALE)
-
-#define BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) /**/
-
-#define BOOST_TEMPLATED_STREAM_TEMPLATE_ALLOC(E,T,A) /**/
-
-#define BOOST_TEMPLATED_STREAM_ARGS(E,T) /**/
-
-#define BOOST_TEMPLATED_STREAM_ARGS_ALLOC(E,T,A) /**/
-
-#define BOOST_TEMPLATED_STREAM_COMMA        /**/
-
-#define BOOST_TEMPLATED_STREAM_ELEM(E)      char
-#define BOOST_TEMPLATED_STREAM_TRAITS(T)    std::char_traits<char>
-#define BOOST_TEMPLATED_STREAM_ALLOC(A)     std::allocator<char>
-
-#define BOOST_TEMPLATED_STREAM(X,E,T) \
-    std::X
-
-#define BOOST_TEMPLATED_STREAM_WITH_ALLOC(X,E,T,A) \
-    std::X
-
-#endif // BOOST_NO_STD_LOCALE
-
-#endif // BOOST_DETAIL_TEMPLATED_STREAMS_HPP
diff --git a/ndnboost/exception/current_exception_cast.hpp b/ndnboost/exception/current_exception_cast.hpp
new file mode 100644
index 0000000..f4da16b
--- /dev/null
+++ b/ndnboost/exception/current_exception_cast.hpp
@@ -0,0 +1,43 @@
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_7E83C166200811DE885E826156D89593
+#define UUID_7E83C166200811DE885E826156D89593
+#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
+
+namespace
+ndnboost
+    {
+    template <class E>
+    inline
+    E *
+    current_exception_cast()
+        {
+        try
+            {
+            throw;
+            }
+        catch(
+        E & e )
+            {
+            return &e;
+            }
+        catch(
+        ...)
+            {
+            return 0;
+            }
+        }
+    }
+
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
+#endif
diff --git a/ndnboost/exception/detail/error_info_impl.hpp b/ndnboost/exception/detail/error_info_impl.hpp
new file mode 100644
index 0000000..9847814
--- /dev/null
+++ b/ndnboost/exception/detail/error_info_impl.hpp
@@ -0,0 +1,74 @@
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_CE6983AC753411DDA764247956D89593
+#define UUID_CE6983AC753411DDA764247956D89593
+#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
+
+#include <string>
+
+namespace
+ndnboost
+    {
+    namespace
+    exception_detail
+        {
+        class
+        error_info_base
+            {
+            public:
+
+            virtual std::string name_value_string() const = 0;
+
+            protected:
+
+            virtual
+            ~error_info_base() throw()
+                {
+                }
+            };
+        }
+
+    template <class Tag,class T>
+    class
+    error_info:
+        public exception_detail::error_info_base
+        {
+        public:
+
+        typedef T value_type;
+
+        error_info( value_type const & value );
+        ~error_info() throw();
+
+        value_type const &
+        value() const
+            {
+            return value_;
+            }
+
+        value_type &
+        value()
+            {
+            return value_;
+            }
+
+        private:
+
+        std::string name_value_string() const;
+
+        value_type value_;
+        };
+    }
+
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
+#endif
diff --git a/ndnboost/exception/detail/type_info.hpp b/ndnboost/exception/detail/type_info.hpp
new file mode 100644
index 0000000..d1c671f
--- /dev/null
+++ b/ndnboost/exception/detail/type_info.hpp
@@ -0,0 +1,83 @@
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_C3E1741C754311DDB2834CCA55D89593
+#define UUID_C3E1741C754311DDB2834CCA55D89593
+#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
+
+#include <ndnboost/detail/sp_typeinfo.hpp>
+#include <ndnboost/current_function.hpp>
+#include <ndnboost/config.hpp>
+#ifndef BOOST_NO_TYPEID
+#include <ndnboost/units/detail/utility.hpp>
+#endif
+#include <string>
+
+namespace
+ndnboost
+    {
+    template <class T>
+    inline
+    std::string
+    tag_type_name()
+        {
+#ifdef BOOST_NO_TYPEID
+        return BOOST_CURRENT_FUNCTION;
+#else
+        return units::detail::demangle(typeid(T*).name());
+#endif
+        }
+
+    template <class T>
+    inline
+    std::string
+    type_name()
+        {
+#ifdef BOOST_NO_TYPEID
+        return BOOST_CURRENT_FUNCTION;
+#else
+        return units::detail::demangle(typeid(T).name());
+#endif
+        }
+
+    namespace
+    exception_detail
+        {
+        struct
+        type_info_
+            {
+            detail::sp_typeinfo const * type_;
+
+            explicit
+            type_info_( detail::sp_typeinfo const & type ):
+                type_(&type)
+                {
+                }
+
+            friend
+            bool
+            operator<( type_info_ const & a, type_info_ const & b )
+                {
+                return 0!=(a.type_->before(*b.type_));
+                }
+            };
+        }
+    }
+
+#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::ndnboost::exception_detail::type_info_(BOOST_SP_TYPEID(T))
+
+#ifndef BOOST_NO_RTTI
+#define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::ndnboost::exception_detail::type_info_(typeid(x))
+#endif
+
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
+#endif
diff --git a/ndnboost/exception/get_error_info.hpp b/ndnboost/exception/get_error_info.hpp
new file mode 100644
index 0000000..9a798ed
--- /dev/null
+++ b/ndnboost/exception/get_error_info.hpp
@@ -0,0 +1,130 @@
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_1A590226753311DD9E4CCF6156D89593
+#define UUID_1A590226753311DD9E4CCF6156D89593
+#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
+
+#include <ndnboost/exception/exception.hpp>
+#include <ndnboost/exception/detail/error_info_impl.hpp>
+#include <ndnboost/exception/detail/type_info.hpp>
+#include <ndnboost/shared_ptr.hpp>
+
+namespace
+ndnboost
+    {
+    namespace
+    exception_detail
+        {
+        template <class ErrorInfo>
+        struct
+        get_info
+            {
+            static
+            typename ErrorInfo::value_type *
+            get( exception const & x )
+                {
+                if( exception_detail::error_info_container * c=x.data_.get() )
+                    if( shared_ptr<exception_detail::error_info_base> eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) )
+                        {
+#ifndef BOOST_NO_RTTI
+                        BOOST_ASSERT( 0!=dynamic_cast<ErrorInfo *>(eib.get()) );
+#endif
+                        ErrorInfo * w = static_cast<ErrorInfo *>(eib.get());
+                        return &w->value();
+                        }
+                return 0;
+                }
+            };
+
+        template <>
+        struct
+        get_info<throw_function>
+            {
+            static
+            char const * *
+            get( exception const & x )
+                {
+                return x.throw_function_ ? &x.throw_function_ : 0;
+                }
+            };
+
+        template <>
+        struct
+        get_info<throw_file>
+            {
+            static
+            char const * *
+            get( exception const & x )
+                {
+                return x.throw_file_ ? &x.throw_file_ : 0;
+                }
+            };
+
+        template <>
+        struct
+        get_info<throw_line>
+            {
+            static
+            int *
+            get( exception const & x )
+                {
+                return x.throw_line_!=-1 ? &x.throw_line_ : 0;
+                }
+            };
+
+        template <class T,class R>
+        struct
+        get_error_info_return_type
+            {
+            typedef R * type;
+            };
+
+        template <class T,class R>
+        struct
+        get_error_info_return_type<T const,R>
+            {
+            typedef R const * type;
+            };
+        }
+
+#ifdef BOOST_NO_RTTI
+    template <class ErrorInfo>
+    inline
+    typename ErrorInfo::value_type const *
+    get_error_info( ndnboost::exception const & x )
+        {
+        return exception_detail::get_info<ErrorInfo>::get(x);
+        }
+    template <class ErrorInfo>
+    inline
+    typename ErrorInfo::value_type *
+    get_error_info( ndnboost::exception & x )
+        {
+        return exception_detail::get_info<ErrorInfo>::get(x);
+        }
+#else
+    template <class ErrorInfo,class E>
+    inline
+    typename exception_detail::get_error_info_return_type<E,typename ErrorInfo::value_type>::type
+    get_error_info( E & some_exception )
+        {
+        if( exception const * x = dynamic_cast<exception const *>(&some_exception) )
+            return exception_detail::get_info<ErrorInfo>::get(*x);
+        else
+            return 0;
+        }
+#endif
+    }
+
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
+#endif
diff --git a/ndnboost/function/function_typeof.hpp b/ndnboost/function/function_typeof.hpp
new file mode 100644
index 0000000..e3d26c5
--- /dev/null
+++ b/ndnboost/function/function_typeof.hpp
@@ -0,0 +1,45 @@
+// Boost.Function library - Typeof support
+//  Copyright (C) Douglas Gregor 2008
+//
+//  Use, modification and distribution is subject to the Boost
+//  Software License, Version 1.0.  (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org
+#ifndef BOOST_FUNCTION_TYPEOF_HPP
+#define BOOST_FUNCTION_TYPEOF_HPP
+#include <ndnboost/function/function_fwd.hpp>
+#include <ndnboost/typeof/typeof.hpp>
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(ndnboost::bad_function_call)
+
+#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
+BOOST_TYPEOF_REGISTER_TEMPLATE(ndnboost::function, (typename))
+#endif
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(ndnboost::function0, (typename))
+BOOST_TYPEOF_REGISTER_TEMPLATE(ndnboost::function1, (typename)(typename))
+BOOST_TYPEOF_REGISTER_TEMPLATE(ndnboost::function2, (typename)(typename)(typename))
+BOOST_TYPEOF_REGISTER_TEMPLATE(ndnboost::function3, 
+  (typename)(typename)(typename)(typename))
+BOOST_TYPEOF_REGISTER_TEMPLATE(ndnboost::function4, 
+  (typename)(typename)(typename)(typename)(typename))
+BOOST_TYPEOF_REGISTER_TEMPLATE(ndnboost::function5, 
+  (typename)(typename)(typename)(typename)(typename)(typename))
+BOOST_TYPEOF_REGISTER_TEMPLATE(ndnboost::function6, 
+  (typename)(typename)(typename)(typename)(typename)(typename)(typename))
+BOOST_TYPEOF_REGISTER_TEMPLATE(ndnboost::function7, 
+  (typename)(typename)(typename)(typename)(typename)(typename)(typename)
+  (typename))
+BOOST_TYPEOF_REGISTER_TEMPLATE(ndnboost::function8, 
+  (typename)(typename)(typename)(typename)(typename)(typename)(typename)
+  (typename)(typename))
+BOOST_TYPEOF_REGISTER_TEMPLATE(ndnboost::function9, 
+  (typename)(typename)(typename)(typename)(typename)(typename)(typename)
+  (typename)(typename)(typename))
+BOOST_TYPEOF_REGISTER_TEMPLATE(ndnboost::function10, 
+  (typename)(typename)(typename)(typename)(typename)(typename)(typename)
+  (typename)(typename)(typename)(typename))
+#endif
diff --git a/ndnboost/function/gen_function_N.pl b/ndnboost/function/gen_function_N.pl
new file mode 100644
index 0000000..7fc53c9
--- /dev/null
+++ b/ndnboost/function/gen_function_N.pl
@@ -0,0 +1,26 @@
+#!/usr/bin/perl -w
+#
+# Boost.Function library
+#
+# Copyright Douglas Gregor 2001-2003. Use, modification and
+# distribution is subject to the Boost Software License, Version
+# 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+# For more information, see http://www.boost.org
+use English;
+
+if ($#ARGV < 0) {
+  print "Usage: perl gen_function_N <number of arguments>\n";
+  exit;
+}
+
+
+$totalNumArgs = $ARGV[0];
+for ($numArgs = 0; $numArgs <= $totalNumArgs; ++$numArgs) {
+  open OUT, ">function$numArgs.hpp";
+  print OUT "#define BOOST_FUNCTION_NUM_ARGS $numArgs\n";
+  print OUT "#include <ndnboost/function/detail/maybe_include.hpp>\n";
+  print OUT "#undef BOOST_FUNCTION_NUM_ARGS\n";
+  close OUT;
+}
diff --git a/ndnboost/functional/factory.hpp b/ndnboost/functional/factory.hpp
deleted file mode 100644
index 161465d..0000000
--- a/ndnboost/functional/factory.hpp
+++ /dev/null
@@ -1,163 +0,0 @@
-/*=============================================================================
-    Copyright (c) 2007 Tobias Schwinger
-  
-    Use modification and distribution are subject to the Boost Software 
-    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-    http://www.boost.org/LICENSE_1_0.txt).
-==============================================================================*/
-
-#ifndef BOOST_FUNCTIONAL_FACTORY_HPP_INCLUDED
-#   ifndef BOOST_PP_IS_ITERATING
-
-#     include <ndnboost/preprocessor/iteration/iterate.hpp>
-#     include <ndnboost/preprocessor/repetition/enum_params.hpp>
-#     include <ndnboost/preprocessor/repetition/enum_binary_params.hpp>
-
-#     include <new>
-#     include <ndnboost/pointee.hpp>
-#     include <ndnboost/none_t.hpp>
-#     include <ndnboost/get_pointer.hpp>
-#     include <ndnboost/non_type.hpp>
-#     include <ndnboost/type_traits/remove_cv.hpp>
-
-#     ifndef BOOST_FUNCTIONAL_FACTORY_MAX_ARITY
-#       define BOOST_FUNCTIONAL_FACTORY_MAX_ARITY 10
-#     elif BOOST_FUNCTIONAL_FACTORY_MAX_ARITY < 3
-#       undef  BOOST_FUNCTIONAL_FACTORY_MAX_ARITY
-#       define BOOST_FUNCTIONAL_FACTORY_MAX_ARITY 3
-#     endif
-
-namespace ndnboost
-{
-    enum factory_alloc_propagation
-    {
-        factory_alloc_for_pointee_and_deleter,
-        factory_passes_alloc_to_smart_pointer
-    };
-
-    template< typename Pointer, class Allocator = ndnboost::none_t,
-        factory_alloc_propagation AP = factory_alloc_for_pointee_and_deleter >
-    class factory;
-
-    //----- ---- --- -- - -  -   -
-
-    template< typename Pointer, factory_alloc_propagation AP >
-    class factory<Pointer, ndnboost::none_t, AP> 
-    {
-      public:
-        typedef typename ndnboost::remove_cv<Pointer>::type result_type;
-        typedef typename ndnboost::pointee<result_type>::type value_type;
-
-        factory()
-        { }
-
-#     define BOOST_PP_FILENAME_1 <ndnboost/functional/factory.hpp>
-#     define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUNCTIONAL_FACTORY_MAX_ARITY)
-#     include BOOST_PP_ITERATE()
-    };
-
-    template< class Pointer, class Allocator, factory_alloc_propagation AP >
-    class factory
-        : private Allocator::template rebind< typename ndnboost::pointee<
-            typename ndnboost::remove_cv<Pointer>::type >::type >::other
-    {
-      public:
-        typedef typename ndnboost::remove_cv<Pointer>::type result_type;
-        typedef typename ndnboost::pointee<result_type>::type value_type;
-
-        typedef typename Allocator::template rebind<value_type>::other
-            allocator_type;
-
-        explicit factory(allocator_type const & a = allocator_type())
-          : allocator_type(a)
-        { }
-
-      private:
-
-        struct deleter
-            : allocator_type
-        {
-            inline deleter(allocator_type const& that) 
-              : allocator_type(that)
-            { }
-
-            allocator_type& get_allocator() const
-            {
-                return *const_cast<allocator_type*>(
-                    static_cast<allocator_type const*>(this));
-            }
-
-            void operator()(value_type* ptr) const
-            {
-                if (!! ptr) ptr->~value_type();
-                const_cast<allocator_type*>(static_cast<allocator_type const*>(
-                    this))->deallocate(ptr,1);
-            }
-        };
-
-        inline allocator_type& get_allocator() const
-        {
-            return *const_cast<allocator_type*>(
-                static_cast<allocator_type const*>(this));
-        }
-
-        inline result_type make_pointer(value_type* ptr, ndnboost::non_type<
-            factory_alloc_propagation,factory_passes_alloc_to_smart_pointer>)
-        const
-        {
-            return result_type(ptr,deleter(this->get_allocator()));
-        }
-        inline result_type make_pointer(value_type* ptr, ndnboost::non_type<
-            factory_alloc_propagation,factory_alloc_for_pointee_and_deleter>)
-        const
-        {
-            return result_type(ptr,deleter(this->get_allocator()),
-                this->get_allocator());
-        }
-
-      public:
-
-#     define BOOST_TMP_MACRO
-#     define BOOST_PP_FILENAME_1 <ndnboost/functional/factory.hpp>
-#     define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUNCTIONAL_FACTORY_MAX_ARITY)
-#     include BOOST_PP_ITERATE()
-#     undef BOOST_TMP_MACRO
-    };
-
-    template< typename Pointer, class Allocator, factory_alloc_propagation AP > 
-    class factory<Pointer&, Allocator, AP>;
-    // forbidden, would create a dangling reference
-}
-
-#     define BOOST_FUNCTIONAL_FACTORY_HPP_INCLUDED
-#   else // defined(BOOST_PP_IS_ITERATING)
-#     define N BOOST_PP_ITERATION()
-#     if !defined(BOOST_TMP_MACRO)
-#       if N > 0
-    template< BOOST_PP_ENUM_PARAMS(N, typename T) >
-#       endif
-    inline result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const
-    {
-        return result_type( new value_type(BOOST_PP_ENUM_PARAMS(N,a)) );
-    }
-#     else // defined(BOOST_TMP_MACRO)
-#       if N > 0
-    template< BOOST_PP_ENUM_PARAMS(N, typename T) >
-#       endif
-    inline result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const
-    {
-        value_type* memory = this->get_allocator().allocate(1);
-        try
-        { 
-            return make_pointer(
-                new(memory) value_type(BOOST_PP_ENUM_PARAMS(N,a)),
-                ndnboost::non_type<factory_alloc_propagation,AP>() );
-        }
-        catch (...) { this->get_allocator().deallocate(memory,1); throw; }
-    }
-#     endif
-#     undef N
-#   endif // defined(BOOST_PP_IS_ITERATING)
-
-#endif // include guard
-
diff --git a/ndnboost/functional/forward_adapter.hpp b/ndnboost/functional/forward_adapter.hpp
deleted file mode 100644
index 2bb5623..0000000
--- a/ndnboost/functional/forward_adapter.hpp
+++ /dev/null
@@ -1,472 +0,0 @@
-/*=============================================================================
-    Copyright (c) 2007-2008 Tobias Schwinger
-  
-    Use modification and distribution are subject to the Boost Software 
-    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-    http://www.boost.org/LICENSE_1_0.txt).  
-==============================================================================*/
-
-#ifndef BOOST_FUNCTIONAL_FORWARD_ADAPTER_HPP_INCLUDED
-#   ifndef BOOST_PP_IS_ITERATING
-
-#   include <ndnboost/config.hpp>
-#   include <ndnboost/detail/workaround.hpp>
-
-#   include <ndnboost/preprocessor/iteration/iterate.hpp>
-#   include <ndnboost/preprocessor/repetition/enum_params.hpp>
-#   include <ndnboost/preprocessor/repetition/enum_binary_params.hpp>
-#   include <ndnboost/preprocessor/facilities/intercept.hpp>
-#   include <ndnboost/preprocessor/arithmetic/dec.hpp>
-
-#   include <ndnboost/utility/result_of.hpp>
-
-#   ifndef BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY
-#     define BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY 6
-#   elif BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY < 3
-#     undef  BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY
-#     define BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY 3
-#   endif
-
-
-namespace ndnboost 
-{
-    template< typename Function, int Arity_Or_MinArity = -1, int MaxArity = -1 >
-    class forward_adapter;
-
-    //----- ---- --- -- - -  -   -
-
-    namespace detail
-    {
-        template< class MostDerived, typename Function, typename FunctionConst, 
-            int Arity, int MinArity >
-        struct forward_adapter_impl;
-
-        struct forward_adapter_result
-        {
-            template< typename Sig > struct apply;
-
-            // Utility metafunction for qualification adjustment on arguments
-            template< typename T > struct q          { typedef T const t; };
-            template< typename T > struct q<T const> { typedef T const t; };
-            template< typename T > struct q<T &>     { typedef T       t; };
-
-            // Utility metafunction to choose target function qualification
-            template< typename T > struct c
-            { typedef typename T::target_function_t t; };
-            template< typename T > struct c<T&      >
-            { typedef typename T::target_function_t t; };
-            template< typename T > struct c<T const >
-            { typedef typename T::target_function_const_t t; };
-            template< typename T > struct c<T const&>
-            { typedef typename T::target_function_const_t t; };
-        };
-    }
-
-#   define BOOST_TMP_MACRO(f,fn,fc) \
-        ndnboost::detail::forward_adapter_impl< \
-            forward_adapter<f,Arity_Or_MinArity,MaxArity>, fn, fc, \
-            (MaxArity!=-1? MaxArity :Arity_Or_MinArity!=-1? Arity_Or_MinArity \
-                :BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY), \
-            (Arity_Or_MinArity!=-1? Arity_Or_MinArity : 0) >
-
-    template< typename Function, int Arity_Or_MinArity, int MaxArity >
-    class forward_adapter
-        : public BOOST_TMP_MACRO(Function,Function,Function const)
-        , private Function
-    {
-      public:
-        forward_adapter(Function const& f = Function()) 
-          : Function(f) 
-        { }
-
-        typedef Function        target_function_t;
-        typedef Function const  target_function_const_t;
-
-        Function       & target_function()       { return *this; }
-        Function const & target_function() const { return *this; }
-
-        template< typename Sig > struct result
-            : detail::forward_adapter_result::template apply<Sig>
-        { };
-
-        using BOOST_TMP_MACRO(Function,Function, Function const)::operator();
-    };
-    template< typename Function, int Arity_Or_MinArity, int MaxArity >
-    class forward_adapter< Function const, Arity_Or_MinArity, MaxArity >
-        : public BOOST_TMP_MACRO(Function const, Function const, Function const)
-        , private Function
-    {
-      public:
-        forward_adapter(Function const& f = Function())
-          : Function(f) 
-        { }
-
-        typedef Function const target_function_t;
-        typedef Function const target_function_const_t;
-
-        Function const & target_function() const { return *this; }
-
-        template< typename Sig > struct result
-            : detail::forward_adapter_result::template apply<Sig>
-        { };
-
-        using BOOST_TMP_MACRO(Function const,Function const, Function const)
-            ::operator();
-    };
-    template< typename Function, int Arity_Or_MinArity, int MaxArity >
-    class forward_adapter< Function &, Arity_Or_MinArity, MaxArity >
-        : public BOOST_TMP_MACRO(Function&, Function, Function)
-    {
-        Function& ref_function;
-      public:
-        forward_adapter(Function& f)
-          : ref_function(f) 
-        { }
-
-        typedef Function target_function_t;
-        typedef Function target_function_const_t;
-
-        Function & target_function() const { return this->ref_function; }
-
-        template< typename Sig > struct result
-            : detail::forward_adapter_result::template apply<Sig>
-        { };
-
-        using BOOST_TMP_MACRO(Function&, Function, Function)::operator();
-    }; 
-
-    #undef BOOST_TMP_MACRO
-
-    namespace detail
-    {
-        template< class Self >
-        struct forward_adapter_result::apply< Self() >
-            : ndnboost::result_of< BOOST_DEDUCED_TYPENAME c<Self>::t() >
-        { };
-
-        template< class MD, class F, class FC >
-        struct forward_adapter_impl<MD,F,FC,0,0>
-        {
-            inline typename ndnboost::result_of< FC() >::type
-            operator()() const
-            {
-                return static_cast<MD const*>(this)->target_function()();
-            }
-
-            inline typename ndnboost::result_of< F() >::type
-            operator()()
-            {
-                return static_cast<MD*>(this)->target_function()();
-            }
-
-        // closing brace gets generated by preprocessing code, below
-
-#       define BOOST_TMP_MACRO(tpl_params,arg_types,params,args)              \
-            template< tpl_params >                                             \
-            inline typename ndnboost::result_of< FC(arg_types) >::type            \
-            operator()(params) const                                           \
-            {                                                                  \
-                return static_cast<MD const*>(this)->target_function()(args);  \
-            }                                                                  \
-            template< tpl_params >                                             \
-            inline typename ndnboost::result_of< F(arg_types)>::type              \
-            operator()(params)                                                 \
-            {                                                                  \
-                return static_cast<MD*>(this)->target_function()(args);        \
-            }
-
-#       // This is the total number of iterations we need
-#       define count ((1 << BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY+1)-2)
-
-#       // Chain file iteration to virtually one loop
-#       if BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY <= 7
-#         define limit1 count
-#         define limit2 0
-#         define limit3 0
-#       else
-#         if BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY <= 15
-#           define limit1 (count >> 8)
-#           define limit2 255
-#           define limit3 0
-#         else
-#           define limit1 (count >> 16)
-#           define limit2 255
-#           define limit3 255
-#         endif
-#       endif
-
-#       define N 0
-
-#       define  BOOST_PP_FILENAME_1 <ndnboost/functional/forward_adapter.hpp>
-#       define  BOOST_PP_ITERATION_LIMITS (0,limit1)
-#       include BOOST_PP_ITERATE()
-
-#       undef N
-#       undef limit3
-#       undef limit2
-#       undef limit1
-#       undef count
-#       undef BOOST_TMP_MACRO
-
-        };
-
-    } // namespace detail
-
-    template<class F, int A0, int A1>
-    struct result_of<ndnboost::forward_adapter<F,A0,A1> const ()>
-        : ndnboost::detail::forward_adapter_result::template apply<
-            ndnboost::forward_adapter<F,A0,A1> const () >
-    { };
-    template<class F, int A0, int A1>
-    struct result_of<ndnboost::forward_adapter<F,A0,A1>()>
-        : ndnboost::detail::forward_adapter_result::template apply<
-            ndnboost::forward_adapter<F,A0,A1>() >
-    { };
-    template<class F, int A0, int A1>
-    struct result_of<ndnboost::forward_adapter<F,A0,A1> const& ()>
-        : ndnboost::detail::forward_adapter_result::template apply<
-            ndnboost::forward_adapter<F,A0,A1> const () >
-    { };
-    template<class F, int A0, int A1>
-    struct result_of<ndnboost::forward_adapter<F,A0,A1>& ()>
-        : ndnboost::detail::forward_adapter_result::template apply<
-            ndnboost::forward_adapter<F,A0,A1>() >
-    { };
-}
-
-#       define BOOST_FUNCTIONAL_FORWARD_ADAPTER_HPP_INCLUDED
-
-#   elif BOOST_PP_ITERATION_DEPTH() == 1 && limit2
-#     define  BOOST_PP_FILENAME_2 <ndnboost/functional/forward_adapter.hpp>
-#     define  BOOST_PP_ITERATION_LIMITS (0,limit2)
-#     include BOOST_PP_ITERATE()
-#   elif BOOST_PP_ITERATION_DEPTH() == 2 && limit3
-#     define  BOOST_PP_FILENAME_3 <ndnboost/functional/forward_adapter.hpp>
-#     define  BOOST_PP_ITERATION_LIMITS (0,limit3)
-#     include BOOST_PP_ITERATE()
-
-#   else
-
-#     // I is the loop counter
-#     if limit2 && limit3
-#       define I (BOOST_PP_ITERATION_1 << 16 | BOOST_PP_ITERATION_2 << 8 | \
-            BOOST_PP_ITERATION_3)
-#     elif limit2
-#       define I (BOOST_PP_ITERATION_1 << 8 | BOOST_PP_ITERATION_2)
-#     else
-#       define I BOOST_PP_ITERATION_1
-#     endif
-
-#     if I < count
-
-#       // Done for this arity? Increment N
-#       if (I+2 >> N+1) 
-#         if N == 0
-#           undef N
-#           define N 1
-#         elif N == 1
-#           undef N
-#           define N 2
-#         elif N == 2
-#           undef N
-#           define N 3
-#         elif N == 3
-#           undef N
-#           define N 4
-#         elif N == 4
-#           undef N
-#           define N 5
-#         elif N == 5
-#           undef N
-#           define N 6
-#         elif N == 6
-#           undef N
-#           define N 7
-#         elif N == 7
-#           undef N
-#           define N 8
-#         elif N == 8
-#           undef N
-#           define N 9
-#         elif N == 9
-#           undef N
-#           define N 10
-#         elif N == 10
-#           undef N
-#           define N 11
-#         elif N == 11
-#           undef N
-#           define N 12
-#         elif N == 12
-#           undef N
-#           define N 13
-#         elif N == 13
-#           undef N
-#           define N 14
-#         elif N == 14
-#           undef N
-#           define N 15
-#         elif N == 15
-#           undef N
-#           define N 16
-#         endif
-
-        };
-
-        template< class Self, BOOST_PP_ENUM_PARAMS(N,typename T) >
-        struct forward_adapter_result::apply< Self(BOOST_PP_ENUM_PARAMS(N,T)) >
-            : ndnboost::result_of< 
-                BOOST_DEDUCED_TYPENAME c<Self>::t(BOOST_PP_ENUM_BINARY_PARAMS(N, 
-                      typename q<T,>::t& BOOST_PP_INTERCEPT)) >
-        { };
-
-        template< class MD, class F, class FC >
-        struct forward_adapter_impl<MD,F,FC,BOOST_PP_DEC(N),N>
-        {
-            template< BOOST_PP_ENUM_PARAMS(N,typename T) >
-            inline typename ndnboost::result_of< F(
-                BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT)) >::type
-            operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT));
-        };
-
-        template< class MD, class F, class FC, int MinArity >
-        struct forward_adapter_impl<MD,F,FC,N,MinArity>
-            : forward_adapter_impl<MD,F,FC,BOOST_PP_DEC(N),MinArity>
-        {
-            using forward_adapter_impl<MD,F,FC,BOOST_PP_DEC(N),MinArity>::operator();
-
-#       endif
-
-#       // Zero based count for each arity would be I-(1<<N)+2, but we don't
-#       // need it, unless we need a nicer order.
-
-#       // Macros for the parameter's type modifiers.
-#       if I & 0x000001
-#         define PT0 T0 &
-#       else
-#         define PT0 T0 const &
-#       endif
-#       if I & 0x000002
-#         define PT1 T1 &
-#       else
-#         define PT1 T1 const &
-#       endif
-#       if I & 0x000004
-#         define PT2 T2 &
-#       else
-#         define PT2 T2 const &
-#       endif
-#       if I & 0x000008
-#         define PT3 T3 &
-#       else
-#         define PT3 T3 const &
-#       endif
-#       if I & 0x000010
-#         define PT4 T4 &
-#       else
-#         define PT4 T4 const &
-#       endif
-#       if I & 0x000020
-#         define PT5 T5 &
-#       else
-#         define PT5 T5 const &
-#       endif
-#       if I & 0x000040
-#         define PT6 T6 &
-#       else
-#         define PT6 T6 const &
-#       endif
-#       if I & 0x000080
-#         define PT7 T7 &
-#       else
-#         define PT7 T7 const &
-#       endif
-#       if I & 0x000100
-#         define PT8 T8 &
-#       else
-#         define PT8 T8 const &
-#       endif
-#       if I & 0x000200
-#         define PT9 T9 &
-#       else
-#         define PT9 T9 const &
-#       endif
-#       if I & 0x000400
-#         define PT10 T10 &
-#       else
-#         define PT10 T10 const &
-#       endif
-#       if I & 0x000800
-#         define PT11 T11 &
-#       else
-#         define PT11 T11 const &
-#       endif
-#       if I & 0x001000
-#         define PT12 T12 &
-#       else
-#         define PT12 T12 const &
-#       endif
-#       if I & 0x002000
-#         define PT13 T13 &
-#       else
-#         define PT13 T13 const &
-#       endif
-#       if I & 0x004000
-#         define PT14 T14 &
-#       else
-#         define PT14 T14 const &
-#       endif
-#       if I & 0x008000
-#         define PT15 T15 &
-#       else
-#         define PT15 T15 const &
-#       endif
-
-#       if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1400)) 
-            template< BOOST_PP_ENUM_PARAMS(N,typename T) >
-            inline typename ndnboost::result_of<  FC(BOOST_PP_ENUM_PARAMS(N,PT)) 
-                >::type
-            operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a)) const
-            {
-                return static_cast<MD const* const>(this)
-                    ->target_function()(BOOST_PP_ENUM_PARAMS(N,a));
-            }
-            template< BOOST_PP_ENUM_PARAMS(N,typename T) >
-            inline typename ndnboost::result_of<  F(BOOST_PP_ENUM_PARAMS(N,PT))
-                >::type
-            operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a))
-            {
-                return static_cast<MD* const>(this)
-                    ->target_function()(BOOST_PP_ENUM_PARAMS(N,a));
-            }
-#       else
-        BOOST_TMP_MACRO(BOOST_PP_ENUM_PARAMS(N,typename T),
-            BOOST_PP_ENUM_PARAMS(N,PT), BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a),
-            BOOST_PP_ENUM_PARAMS(N,a) )
-        // ...generates uglier code but is faster - it caches ENUM_*
-#       endif
-
-#       undef PT0
-#       undef PT1
-#       undef PT2
-#       undef PT3
-#       undef PT4
-#       undef PT5
-#       undef PT6
-#       undef PT7
-#       undef PT8
-#       undef PT9
-#       undef PT10
-#       undef PT11
-#       undef PT12
-#       undef PT13
-#       undef PT14
-#       undef PT15
-
-#     endif // I < count
-
-#     undef I
-#   endif // defined(BOOST_PP_IS_ITERATING)
-
-#endif // include guard
-
diff --git a/ndnboost/functional/hash.hpp b/ndnboost/functional/hash.hpp
deleted file mode 100644
index bcc68bc..0000000
--- a/ndnboost/functional/hash.hpp
+++ /dev/null
@@ -1,7 +0,0 @@
-
-// Copyright 2005-2009 Daniel James.
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#include <ndnboost/functional/hash/hash.hpp>
-
diff --git a/ndnboost/functional/hash/detail/float_functions.hpp b/ndnboost/functional/hash/detail/float_functions.hpp
deleted file mode 100644
index 5a6dce4..0000000
--- a/ndnboost/functional/hash/detail/float_functions.hpp
+++ /dev/null
@@ -1,336 +0,0 @@
-
-// Copyright 2005-2009 Daniel James.
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP)
-#define BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP
-
-#include <ndnboost/config.hpp>
-#include <ndnboost/config/no_tr1/cmath.hpp>
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-// Set BOOST_HASH_CONFORMANT_FLOATS to 1 for libraries known to have
-// sufficiently good floating point support to not require any
-// workarounds.
-//
-// When set to 0, the library tries to automatically
-// use the best available implementation. This normally works well, but
-// breaks when ambiguities are created by odd namespacing of the functions.
-//
-// Note that if this is set to 0, the library should still take full
-// advantage of the platform's floating point support.
-
-#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
-#   define BOOST_HASH_CONFORMANT_FLOATS 0
-#elif defined(__LIBCOMO__)
-#   define BOOST_HASH_CONFORMANT_FLOATS 0
-#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
-// Rogue Wave library:
-#   define BOOST_HASH_CONFORMANT_FLOATS 0
-#elif defined(_LIBCPP_VERSION)
-// libc++
-#   define BOOST_HASH_CONFORMANT_FLOATS 1
-#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
-// GNU libstdc++ 3
-#   if defined(__GNUC__) && __GNUC__ >= 4
-#       define BOOST_HASH_CONFORMANT_FLOATS 1
-#   else
-#       define BOOST_HASH_CONFORMANT_FLOATS 0
-#   endif
-#elif defined(__STL_CONFIG_H)
-// generic SGI STL
-#   define BOOST_HASH_CONFORMANT_FLOATS 0
-#elif defined(__MSL_CPP__)
-// MSL standard lib:
-#   define BOOST_HASH_CONFORMANT_FLOATS 0
-#elif defined(__IBMCPP__)
-// VACPP std lib (probably conformant for much earlier version).
-#   if __IBMCPP__ >= 1210
-#       define BOOST_HASH_CONFORMANT_FLOATS 1
-#   else
-#       define BOOST_HASH_CONFORMANT_FLOATS 0
-#   endif
-#elif defined(MSIPL_COMPILE_H)
-// Modena C++ standard library
-#   define BOOST_HASH_CONFORMANT_FLOATS 0
-#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
-// Dinkumware Library (this has to appear after any possible replacement libraries):
-#   if _CPPLIB_VER >= 405
-#       define BOOST_HASH_CONFORMANT_FLOATS 1
-#   else
-#       define BOOST_HASH_CONFORMANT_FLOATS 0
-#   endif
-#else
-#   define BOOST_HASH_CONFORMANT_FLOATS 0
-#endif
-
-#if BOOST_HASH_CONFORMANT_FLOATS
-
-// The standard library is known to be compliant, so don't use the
-// configuration mechanism.
-
-namespace ndnboost {
-    namespace hash_detail {
-        template <typename Float>
-        struct call_ldexp {
-            typedef Float float_type;
-            inline Float operator()(Float x, int y) const {
-                return std::ldexp(x, y);
-            }
-        };
-
-        template <typename Float>
-        struct call_frexp {
-            typedef Float float_type;
-            inline Float operator()(Float x, int* y) const {
-                return std::frexp(x, y);
-            }
-        };
-
-        template <typename Float>
-        struct select_hash_type
-        {
-            typedef Float type;
-        };
-    }
-}
-
-#else // BOOST_HASH_CONFORMANT_FLOATS == 0
-
-// The C++ standard requires that the C float functions are overloarded
-// for float, double and long double in the std namespace, but some of the older
-// library implementations don't support this. On some that don't, the C99
-// float functions (frexpf, frexpl, etc.) are available.
-//
-// The following tries to automatically detect which are available.
-
-namespace ndnboost {
-    namespace hash_detail {
-
-        // Returned by dummy versions of the float functions.
-    
-        struct not_found {
-            // Implicitly convertible to float and long double in order to avoid
-            // a compile error when the dummy float functions are used.
-
-            inline operator float() const { return 0; }
-            inline operator long double() const { return 0; }
-        };
-          
-        // A type for detecting the return type of functions.
-
-        template <typename T> struct is;
-        template <> struct is<float> { char x[10]; };
-        template <> struct is<double> { char x[20]; };
-        template <> struct is<long double> { char x[30]; };
-        template <> struct is<ndnboost::hash_detail::not_found> { char x[40]; };
-            
-        // Used to convert the return type of a function to a type for sizeof.
-
-        template <typename T> is<T> float_type(T);
-
-        // call_ldexp
-        //
-        // This will get specialized for float and long double
-        
-        template <typename Float> struct call_ldexp
-        {
-            typedef double float_type;
-            
-            inline double operator()(double a, int b) const
-            {
-                using namespace std;
-                return ldexp(a, b);
-            }
-        };
-
-        // call_frexp
-        //
-        // This will get specialized for float and long double
-
-        template <typename Float> struct call_frexp
-        {
-            typedef double float_type;
-            
-            inline double operator()(double a, int* b) const
-            {
-                using namespace std;
-                return frexp(a, b);
-            }
-        };
-    }
-}
-            
-// A namespace for dummy functions to detect when the actual function we want
-// isn't available. ldexpl, ldexpf etc. might be added tby the macros below.
-//
-// AFAICT these have to be outside of the boost namespace, as if they're in
-// the boost namespace they'll always be preferable to any other function
-// (since the arguments are built in types, ADL can't be used).
-
-namespace ndnboost_hash_detect_float_functions {
-    template <class Float> ndnboost::hash_detail::not_found ldexp(Float, int);
-    template <class Float> ndnboost::hash_detail::not_found frexp(Float, int*);    
-}
-
-// Macros for generating specializations of call_ldexp and call_frexp.
-//
-// check_cpp and check_c99 check if the C++ or C99 functions are available.
-//
-// Then the call_* functions select an appropriate implementation.
-//
-// I used c99_func in a few places just to get a unique name.
-//
-// Important: when using 'using namespace' at namespace level, include as
-// little as possible in that namespace, as Visual C++ has an odd bug which
-// can cause the namespace to be imported at the global level. This seems to
-// happen mainly when there's a template in the same namesapce.
-
-#define BOOST_HASH_CALL_FLOAT_FUNC(cpp_func, c99_func, type1, type2)    \
-namespace ndnboost_hash_detect_float_functions {                           \
-    template <class Float>                                              \
-    ndnboost::hash_detail::not_found c99_func(Float, type2);               \
-}                                                                       \
-                                                                        \
-namespace ndnboost {                                                       \
-    namespace hash_detail {                                             \
-        namespace c99_func##_detect {                                   \
-            using namespace std;                                        \
-            using namespace ndnboost_hash_detect_float_functions;          \
-                                                                        \
-            struct check {                                              \
-                static type1 x;                                         \
-                static type2 y;                                         \
-                BOOST_STATIC_CONSTANT(bool, cpp =                       \
-                    sizeof(float_type(cpp_func(x,y)))                   \
-                        == sizeof(is<type1>));                          \
-                BOOST_STATIC_CONSTANT(bool, c99 =                       \
-                    sizeof(float_type(c99_func(x,y)))                   \
-                        == sizeof(is<type1>));                          \
-            };                                                          \
-        }                                                               \
-                                                                        \
-        template <bool x>                                               \
-        struct call_c99_##c99_func :                                    \
-            ndnboost::hash_detail::call_##cpp_func<double> {};             \
-                                                                        \
-        template <>                                                     \
-        struct call_c99_##c99_func<true> {                              \
-            typedef type1 float_type;                                   \
-                                                                        \
-            template <typename T>                                       \
-            inline type1 operator()(type1 a, T b)  const                \
-            {                                                           \
-                using namespace std;                                    \
-                return c99_func(a, b);                                  \
-            }                                                           \
-        };                                                              \
-                                                                        \
-        template <bool x>                                               \
-        struct call_cpp_##c99_func :                                    \
-            call_c99_##c99_func<                                        \
-                ::ndnboost::hash_detail::c99_func##_detect::check::c99     \
-            > {};                                                       \
-                                                                        \
-        template <>                                                     \
-        struct call_cpp_##c99_func<true> {                              \
-            typedef type1 float_type;                                   \
-                                                                        \
-            template <typename T>                                       \
-            inline type1 operator()(type1 a, T b)  const                \
-            {                                                           \
-                using namespace std;                                    \
-                return cpp_func(a, b);                                  \
-            }                                                           \
-        };                                                              \
-                                                                        \
-        template <>                                                     \
-        struct call_##cpp_func<type1> :                                 \
-            call_cpp_##c99_func<                                        \
-                ::ndnboost::hash_detail::c99_func##_detect::check::cpp     \
-            > {};                                                       \
-    }                                                                   \
-}
-
-#define BOOST_HASH_CALL_FLOAT_MACRO(cpp_func, c99_func, type1, type2)   \
-namespace ndnboost {                                                       \
-    namespace hash_detail {                                             \
-                                                                        \
-        template <>                                                     \
-        struct call_##cpp_func<type1> {                                 \
-            typedef type1 float_type;                                   \
-            inline type1 operator()(type1 x, type2 y) const {           \
-                return c99_func(x, y);                                  \
-            }                                                           \
-        };                                                              \
-    }                                                                   \
-}
-
-#if defined(ldexpf)
-BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpf, float, int)
-#else
-BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpf, float, int)
-#endif
-
-#if defined(ldexpl)
-BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpl, long double, int)
-#else
-BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpl, long double, int)
-#endif
-
-#if defined(frexpf)
-BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpf, float, int*)
-#else
-BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpf, float, int*)
-#endif
-
-#if defined(frexpl)
-BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpl, long double, int*)
-#else
-BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpl, long double, int*)
-#endif
-
-#undef BOOST_HASH_CALL_FLOAT_MACRO
-#undef BOOST_HASH_CALL_FLOAT_FUNC
-
-
-namespace ndnboost
-{
-    namespace hash_detail
-    {
-        template <typename Float1, typename Float2>
-        struct select_hash_type_impl {
-            typedef double type;
-        };
-
-        template <>
-        struct select_hash_type_impl<float, float> {
-            typedef float type;
-        };
-
-        template <>
-        struct select_hash_type_impl<long double, long double> {
-            typedef long double type;
-        };
-
-
-        // select_hash_type
-        //
-        // If there is support for a particular floating point type, use that
-        // otherwise use double (there's always support for double).
-             
-        template <typename Float>
-        struct select_hash_type : select_hash_type_impl<
-                BOOST_DEDUCED_TYPENAME call_ldexp<Float>::float_type,
-                BOOST_DEDUCED_TYPENAME call_frexp<Float>::float_type
-            > {};            
-    }
-}
-
-#endif // BOOST_HASH_CONFORMANT_FLOATS
-
-#endif
diff --git a/ndnboost/functional/hash/detail/hash_float.hpp b/ndnboost/functional/hash/detail/hash_float.hpp
deleted file mode 100644
index c15a139..0000000
--- a/ndnboost/functional/hash/detail/hash_float.hpp
+++ /dev/null
@@ -1,277 +0,0 @@
-
-// Copyright 2005-2012 Daniel James.
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER)
-#define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-#include <ndnboost/config.hpp>
-#include <ndnboost/functional/hash/detail/float_functions.hpp>
-#include <ndnboost/functional/hash/detail/limits.hpp>
-#include <ndnboost/utility/enable_if.hpp>
-#include <ndnboost/integer/static_log2.hpp>
-#include <ndnboost/cstdint.hpp>
-#include <ndnboost/assert.hpp>
-#include <ndnboost/limits.hpp>
-#include <cstring>
-
-#if defined(BOOST_MSVC)
-#pragma warning(push)
-#if BOOST_MSVC >= 1400
-#pragma warning(disable:6294) // Ill-defined for-loop: initial condition does
-                              // not satisfy test. Loop body not executed
-#endif
-#endif
-
-// Can we use fpclassify?
-
-// STLport
-#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
-#define BOOST_HASH_USE_FPCLASSIFY 0
-
-// GNU libstdc++ 3
-#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
-#  if (defined(__USE_ISOC99) || defined(_GLIBCXX_USE_C99_MATH)) && \
-      !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
-#    define BOOST_HASH_USE_FPCLASSIFY 1
-#  else
-#    define BOOST_HASH_USE_FPCLASSIFY 0
-#  endif
-
-// Everything else
-#else
-#  define BOOST_HASH_USE_FPCLASSIFY 0
-#endif
-
-namespace ndnboost
-{
-    namespace hash_detail
-    {
-        inline void hash_float_combine(std::size_t& seed, std::size_t value)
-        {
-            seed ^= value + (seed<<6) + (seed>>2);
-        }
-
-        ////////////////////////////////////////////////////////////////////////
-        // Binary hash function
-        //
-        // Only used for floats with known iec559 floats, and certain values in
-        // numeric_limits
-
-        inline std::size_t hash_binary(char* ptr, std::size_t length)
-        {
-            std::size_t seed = 0;
-
-            if (length >= sizeof(std::size_t)) {
-                seed = *(std::size_t*) ptr;
-                length -= sizeof(std::size_t);
-                ptr += sizeof(std::size_t);
-
-                while(length >= sizeof(std::size_t)) {
-                    std::size_t buffer = 0;
-                    std::memcpy(&buffer, ptr, sizeof(std::size_t));
-                    hash_float_combine(seed, buffer);
-                    length -= sizeof(std::size_t);
-                    ptr += sizeof(std::size_t);
-                }
-            }
-
-            if (length > 0) {
-                std::size_t buffer = 0;
-                std::memcpy(&buffer, ptr, length);
-                hash_float_combine(seed, buffer);
-            }
-
-            return seed;
-        }
-
-        template <typename Float>
-        inline std::size_t float_hash_impl(Float v,
-            BOOST_DEDUCED_TYPENAME ndnboost::enable_if_c<
-                std::numeric_limits<Float>::is_iec559 &&
-                std::numeric_limits<Float>::digits == 24 &&
-                std::numeric_limits<Float>::radix == 2 &&
-                std::numeric_limits<Float>::max_exponent == 128,
-                int>::type
-            )
-        {
-            return hash_binary((char*) &v, 4);
-        }
-
-
-        template <typename Float>
-        inline std::size_t float_hash_impl(Float v,
-            BOOST_DEDUCED_TYPENAME ndnboost::enable_if_c<
-                std::numeric_limits<Float>::is_iec559 &&
-                std::numeric_limits<Float>::digits == 53 &&
-                std::numeric_limits<Float>::radix == 2 &&
-                std::numeric_limits<Float>::max_exponent == 1024,
-                int>::type
-            )
-        {
-            return hash_binary((char*) &v, 8);
-        }
-
-        template <typename Float>
-        inline std::size_t float_hash_impl(Float v,
-            BOOST_DEDUCED_TYPENAME ndnboost::enable_if_c<
-                std::numeric_limits<Float>::is_iec559 &&
-                std::numeric_limits<Float>::digits == 64 &&
-                std::numeric_limits<Float>::radix == 2 &&
-                std::numeric_limits<Float>::max_exponent == 16384,
-                int>::type
-            )
-        {
-            return hash_binary((char*) &v, 10);
-        }
-
-        template <typename Float>
-        inline std::size_t float_hash_impl(Float v,
-            BOOST_DEDUCED_TYPENAME ndnboost::enable_if_c<
-                std::numeric_limits<Float>::is_iec559 &&
-                std::numeric_limits<Float>::digits == 113 &&
-                std::numeric_limits<Float>::radix == 2 &&
-                std::numeric_limits<Float>::max_exponent == 16384,
-                int>::type
-            )
-        {
-            return hash_binary((char*) &v, 16);
-        }
-
-        ////////////////////////////////////////////////////////////////////////
-        // Portable hash function
-        //
-        // Used as a fallback when the binary hash function isn't supported.
-
-        template <class T>
-        inline std::size_t float_hash_impl2(T v)
-        {
-            ndnboost::hash_detail::call_frexp<T> frexp;
-            ndnboost::hash_detail::call_ldexp<T> ldexp;
-
-            int exp = 0;
-
-            v = frexp(v, &exp);
-
-            // A postive value is easier to hash, so combine the
-            // sign with the exponent and use the absolute value.
-            if(v < 0) {
-                v = -v;
-                exp += limits<T>::max_exponent -
-                    limits<T>::min_exponent;
-            }
-
-            v = ldexp(v, limits<std::size_t>::digits);
-            std::size_t seed = static_cast<std::size_t>(v);
-            v -= static_cast<T>(seed);
-
-            // ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1;
-            std::size_t const length
-                = (limits<T>::digits *
-                        ndnboost::static_log2<limits<T>::radix>::value
-                        + limits<std::size_t>::digits - 1)
-                / limits<std::size_t>::digits;
-
-            for(std::size_t i = 0; i != length; ++i)
-            {
-                v = ldexp(v, limits<std::size_t>::digits);
-                std::size_t part = static_cast<std::size_t>(v);
-                v -= static_cast<T>(part);
-                hash_float_combine(seed, part);
-            }
-
-            hash_float_combine(seed, exp);
-
-            return seed;
-        }
-
-#if !defined(BOOST_HASH_DETAIL_TEST_WITHOUT_GENERIC)
-        template <class T>
-        inline std::size_t float_hash_impl(T v, ...)
-        {
-            typedef BOOST_DEDUCED_TYPENAME select_hash_type<T>::type type;
-            return float_hash_impl2(static_cast<type>(v));
-        }
-#endif
-    }
-}
-
-#if BOOST_HASH_USE_FPCLASSIFY
-
-#include <ndnboost/config/no_tr1/cmath.hpp>
-
-namespace ndnboost
-{
-    namespace hash_detail
-    {
-        template <class T>
-        inline std::size_t float_hash_value(T v)
-        {
-#if defined(fpclassify)
-            switch (fpclassify(v))
-#elif BOOST_HASH_CONFORMANT_FLOATS
-            switch (std::fpclassify(v))
-#else
-            using namespace std;
-            switch (fpclassify(v))
-#endif
-            {
-            case FP_ZERO:
-                return 0;
-            case FP_INFINITE:
-                return (std::size_t)(v > 0 ? -1 : -2);
-            case FP_NAN:
-                return (std::size_t)(-3);
-            case FP_NORMAL:
-            case FP_SUBNORMAL:
-                return float_hash_impl(v, 0);
-            default:
-                BOOST_ASSERT(0);
-                return 0;
-            }
-        }
-    }
-}
-
-#else // !BOOST_HASH_USE_FPCLASSIFY
-
-namespace ndnboost
-{
-    namespace hash_detail
-    {
-        template <class T>
-        inline bool is_zero(T v)
-        {
-#if !defined(__GNUC__)
-            return v == 0;
-#else
-            // GCC's '-Wfloat-equal' will complain about comparing
-            // v to 0, but because it disables warnings for system
-            // headers it won't complain if you use std::equal_to to
-            // compare with 0. Resulting in this silliness:
-            return std::equal_to<T>()(v, 0);
-#endif
-        }
-
-        template <class T>
-        inline std::size_t float_hash_value(T v)
-        {
-            return ndnboost::hash_detail::is_zero(v) ? 0 : float_hash_impl(v, 0);
-        }
-    }
-}
-
-#endif // BOOST_HASH_USE_FPCLASSIFY
-
-#undef BOOST_HASH_USE_FPCLASSIFY
-
-#if defined(BOOST_MSVC)
-#pragma warning(pop)
-#endif
-
-#endif
diff --git a/ndnboost/functional/hash/detail/limits.hpp b/ndnboost/functional/hash/detail/limits.hpp
deleted file mode 100644
index aff26da..0000000
--- a/ndnboost/functional/hash/detail/limits.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-
-// Copyright 2005-2009 Daniel James.
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// On some platforms std::limits gives incorrect values for long double.
-// This tries to work around them.
-
-#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER)
-#define BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-#include <ndnboost/limits.hpp>
-
-// On OpenBSD, numeric_limits is not reliable for long doubles, but
-// the macros defined in <float.h> are and support long double when STLport
-// doesn't.
-
-#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE)
-#include <float.h>
-#endif
-
-namespace ndnboost
-{
-    namespace hash_detail
-    {
-        template <class T>
-        struct limits : std::numeric_limits<T> {};
-
-#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE)
-        template <>
-        struct limits<long double>
-             : std::numeric_limits<long double>
-        {
-            static long double epsilon() {
-                return LDBL_EPSILON;
-            }
-
-            static long double (max)() {
-                return LDBL_MAX;
-            }
-
-            static long double (min)() {
-                return LDBL_MIN;
-            }
-
-            BOOST_STATIC_CONSTANT(int, digits = LDBL_MANT_DIG);
-            BOOST_STATIC_CONSTANT(int, max_exponent = LDBL_MAX_EXP);
-            BOOST_STATIC_CONSTANT(int, min_exponent = LDBL_MIN_EXP);
-#if defined(_STLP_NO_LONG_DOUBLE)
-            BOOST_STATIC_CONSTANT(int, radix = FLT_RADIX);
-#endif
-        };
-#endif // __OpenBSD__
-    }
-}
-
-#endif
diff --git a/ndnboost/functional/hash/extensions.hpp b/ndnboost/functional/hash/extensions.hpp
deleted file mode 100644
index 119043b..0000000
--- a/ndnboost/functional/hash/extensions.hpp
+++ /dev/null
@@ -1,379 +0,0 @@
-
-// Copyright 2005-2009 Daniel James.
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-//  Based on Peter Dimov's proposal
-//  http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
-//  issue 6.18. 
-
-// This implements the extensions to the standard.
-// It's undocumented, so you shouldn't use it....
-
-#if !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP)
-#define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP
-
-#include <ndnboost/functional/hash/hash.hpp>
-#include <ndnboost/detail/container_fwd.hpp>
-#include <ndnboost/utility/enable_if.hpp>
-#include <ndnboost/static_assert.hpp>
-#include <ndnboost/preprocessor/repetition/repeat_from_to.hpp>
-#include <ndnboost/preprocessor/repetition/enum_params.hpp>
-
-#if !defined(BOOST_NO_CXX11_HDR_ARRAY)
-#   include <array>
-#endif
-
-#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
-#   include <tuple>
-#endif
-
-#if !defined(BOOST_NO_CXX11_HDR_MEMORY)
-#   include <memory>
-#endif
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
-#include <ndnboost/type_traits/is_array.hpp>
-#endif
-
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-#include <ndnboost/type_traits/is_const.hpp>
-#endif
-
-namespace ndnboost
-{
-    template <class A, class B>
-    std::size_t hash_value(std::pair<A, B> const&);
-    template <class T, class A>
-    std::size_t hash_value(std::vector<T, A> const&);
-    template <class T, class A>
-    std::size_t hash_value(std::list<T, A> const& v);
-    template <class T, class A>
-    std::size_t hash_value(std::deque<T, A> const& v);
-    template <class K, class C, class A>
-    std::size_t hash_value(std::set<K, C, A> const& v);
-    template <class K, class C, class A>
-    std::size_t hash_value(std::multiset<K, C, A> const& v);
-    template <class K, class T, class C, class A>
-    std::size_t hash_value(std::map<K, T, C, A> const& v);
-    template <class K, class T, class C, class A>
-    std::size_t hash_value(std::multimap<K, T, C, A> const& v);
-
-    template <class T>
-    std::size_t hash_value(std::complex<T> const&);
-
-    template <class A, class B>
-    std::size_t hash_value(std::pair<A, B> const& v)
-    {
-        std::size_t seed = 0;
-        ndnboost::hash_combine(seed, v.first);
-        ndnboost::hash_combine(seed, v.second);
-        return seed;
-    }
-
-    template <class T, class A>
-    std::size_t hash_value(std::vector<T, A> const& v)
-    {
-        return ndnboost::hash_range(v.begin(), v.end());
-    }
-
-    template <class T, class A>
-    std::size_t hash_value(std::list<T, A> const& v)
-    {
-        return ndnboost::hash_range(v.begin(), v.end());
-    }
-
-    template <class T, class A>
-    std::size_t hash_value(std::deque<T, A> const& v)
-    {
-        return ndnboost::hash_range(v.begin(), v.end());
-    }
-
-    template <class K, class C, class A>
-    std::size_t hash_value(std::set<K, C, A> const& v)
-    {
-        return ndnboost::hash_range(v.begin(), v.end());
-    }
-
-    template <class K, class C, class A>
-    std::size_t hash_value(std::multiset<K, C, A> const& v)
-    {
-        return ndnboost::hash_range(v.begin(), v.end());
-    }
-
-    template <class K, class T, class C, class A>
-    std::size_t hash_value(std::map<K, T, C, A> const& v)
-    {
-        return ndnboost::hash_range(v.begin(), v.end());
-    }
-
-    template <class K, class T, class C, class A>
-    std::size_t hash_value(std::multimap<K, T, C, A> const& v)
-    {
-        return ndnboost::hash_range(v.begin(), v.end());
-    }
-
-    template <class T>
-    std::size_t hash_value(std::complex<T> const& v)
-    {
-        ndnboost::hash<T> hasher;
-        std::size_t seed = hasher(v.imag());
-        seed ^= hasher(v.real()) + (seed<<6) + (seed>>2);
-        return seed;
-    }
-
-#if !defined(BOOST_NO_CXX11_HDR_ARRAY)
-    template <class T, std::size_t N>
-    std::size_t hash_value(std::array<T, N> const& v)
-    {
-        return ndnboost::hash_range(v.begin(), v.end());
-    }
-#endif
-
-#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
-    namespace hash_detail {
-        template <std::size_t I, typename T>
-        inline typename ndnboost::enable_if_c<(I == std::tuple_size<T>::value),
-                void>::type
-            hash_combine_tuple(std::size_t&, T const&)
-        {
-        }
-
-        template <std::size_t I, typename T>
-        inline typename ndnboost::enable_if_c<(I < std::tuple_size<T>::value),
-                void>::type
-            hash_combine_tuple(std::size_t& seed, T const& v)
-        {
-            ndnboost::hash_combine(seed, std::get<I>(v));
-            ndnboost::hash_detail::hash_combine_tuple<I + 1>(seed, v);
-        }
-
-        template <typename T>
-        inline std::size_t hash_tuple(T const& v)
-        {
-            std::size_t seed = 0;
-            ndnboost::hash_detail::hash_combine_tuple<0>(seed, v);
-            return seed;
-        }
-    }
-
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-    template <typename... T>
-    inline std::size_t hash_value(std::tuple<T...> const& v)
-    {
-        return ndnboost::hash_detail::hash_tuple(v);
-    }
-#else
-
-    inline std::size_t hash_value(std::tuple<> const& v)
-    {
-        return ndnboost::hash_detail::hash_tuple(v);
-    }
-
-#   define BOOST_HASH_TUPLE_F(z, n, _)                                      \
-    template<                                                               \
-        BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)                            \
-    >                                                                       \
-    inline std::size_t hash_value(std::tuple<                               \
-        BOOST_PP_ENUM_PARAMS_Z(z, n, A)                                     \
-    > const& v)                                                             \
-    {                                                                       \
-        return ndnboost::hash_detail::hash_tuple(v);                           \
-    }
-
-    BOOST_PP_REPEAT_FROM_TO(1, 11, BOOST_HASH_TUPLE_F, _)
-#   undef BOOST_HASH_TUPLE_F
-#endif
-
-#endif
-
-#if !defined(BOOST_NO_CXX11_SMART_PTR)
-    template <typename T>
-    inline std::size_t hash_value(std::shared_ptr<T> const& x) {
-        return ndnboost::hash_value(x.get());
-    }
-
-    template <typename T, typename Deleter>
-    inline std::size_t hash_value(std::unique_ptr<T, Deleter> const& x) {
-        return ndnboost::hash_value(x.get());
-    }
-#endif
-
-    //
-    // call_hash_impl
-    //
-
-    // On compilers without function template ordering, this deals with arrays.
-
-#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
-    namespace hash_detail
-    {
-        template <bool IsArray>
-        struct call_hash_impl
-        {
-            template <class T>
-            struct inner
-            {
-                static std::size_t call(T const& v)
-                {
-                    using namespace ndnboost;
-                    return hash_value(v);
-                }
-            };
-        };
-
-        template <>
-        struct call_hash_impl<true>
-        {
-            template <class Array>
-            struct inner
-            {
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-                static std::size_t call(Array const& v)
-#else
-                static std::size_t call(Array& v)
-#endif
-                {
-                    const int size = sizeof(v) / sizeof(*v);
-                    return ndnboost::hash_range(v, v + size);
-                }
-            };
-        };
-
-        template <class T>
-        struct call_hash
-            : public call_hash_impl<ndnboost::is_array<T>::value>
-                ::BOOST_NESTED_TEMPLATE inner<T>
-        {
-        };
-    }
-#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
-    //
-    // ndnboost::hash
-    //
-
-
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-    template <class T> struct hash
-        : std::unary_function<T, std::size_t>
-    {
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
-        std::size_t operator()(T const& val) const
-        {
-            return hash_value(val);
-        }
-#else
-        std::size_t operator()(T const& val) const
-        {
-            return hash_detail::call_hash<T>::call(val);
-        }
-#endif
-    };
-
-#if BOOST_WORKAROUND(__DMC__, <= 0x848)
-    template <class T, unsigned int n> struct hash<T[n]>
-        : std::unary_function<T[n], std::size_t>
-    {
-        std::size_t operator()(const T* val) const
-        {
-            return ndnboost::hash_range(val, val+n);
-        }
-    };
-#endif
-
-#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
-    // On compilers without partial specialization, ndnboost::hash<T>
-    // has already been declared to deal with pointers, so just
-    // need to supply the non-pointer version of hash_impl.
-
-    namespace hash_detail
-    {
-        template <bool IsPointer>
-        struct hash_impl;
-
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-
-        template <>
-        struct hash_impl<false>
-        {
-            template <class T>
-            struct inner
-                : std::unary_function<T, std::size_t>
-            {
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
-                std::size_t operator()(T const& val) const
-                {
-                    return hash_value(val);
-                }
-#else
-                std::size_t operator()(T const& val) const
-                {
-                    return hash_detail::call_hash<T>::call(val);
-                }
-#endif
-            };
-        };
-
-#else // Visual C++ 6.5
-
-        // Visual C++ 6.5 has problems with nested member functions and
-        // applying const to const types in templates. So we get this:
-
-        template <bool IsConst>
-        struct hash_impl_msvc
-        {
-            template <class T>
-            struct inner
-                : public std::unary_function<T, std::size_t>
-            {
-                std::size_t operator()(T const& val) const
-                {
-                    return hash_detail::call_hash<T const>::call(val);
-                }
-
-                std::size_t operator()(T& val) const
-                {
-                    return hash_detail::call_hash<T>::call(val);
-                }
-            };
-        };
-
-        template <>
-        struct hash_impl_msvc<true>
-        {
-            template <class T>
-            struct inner
-                : public std::unary_function<T, std::size_t>
-            {
-                std::size_t operator()(T& val) const
-                {
-                    return hash_detail::call_hash<T>::call(val);
-                }
-            };
-        };
-        
-        template <class T>
-        struct hash_impl_msvc2
-            : public hash_impl_msvc<ndnboost::is_const<T>::value>
-                    ::BOOST_NESTED_TEMPLATE inner<T> {};
-        
-        template <>
-        struct hash_impl<false>
-        {
-            template <class T>
-            struct inner : public hash_impl_msvc2<T> {};
-        };
-
-#endif // Visual C++ 6.5
-    }
-#endif  // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-}
-
-#endif
diff --git a/ndnboost/functional/hash/hash.hpp b/ndnboost/functional/hash/hash.hpp
deleted file mode 100644
index c61793c..0000000
--- a/ndnboost/functional/hash/hash.hpp
+++ /dev/null
@@ -1,530 +0,0 @@
-
-// Copyright 2005-2009 Daniel James.
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-//  Based on Peter Dimov's proposal
-//  http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
-//  issue 6.18. 
-
-#if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP)
-#define BOOST_FUNCTIONAL_HASH_HASH_HPP
-
-#include <ndnboost/functional/hash/hash_fwd.hpp>
-#include <functional>
-#include <ndnboost/functional/hash/detail/hash_float.hpp>
-#include <string>
-#include <ndnboost/limits.hpp>
-#include <ndnboost/type_traits/is_enum.hpp>
-#include <ndnboost/type_traits/is_integral.hpp>
-#include <ndnboost/utility/enable_if.hpp>
-
-#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-#include <ndnboost/type_traits/is_pointer.hpp>
-#endif
-
-#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
-#include <typeindex>
-#endif
-
-#if BOOST_WORKAROUND(__GNUC__, < 3) \
-    && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
-#define BOOST_HASH_CHAR_TRAITS string_char_traits
-#else
-#define BOOST_HASH_CHAR_TRAITS char_traits
-#endif
-
-namespace ndnboost
-{
-    namespace hash_detail
-    {
-        struct enable_hash_value { typedef std::size_t type; };
-
-        template <typename T> struct basic_numbers {};
-        template <typename T> struct long_numbers;
-        template <typename T> struct ulong_numbers;
-        template <typename T> struct float_numbers {};
-
-        template <> struct basic_numbers<bool> :
-            ndnboost::hash_detail::enable_hash_value {};
-        template <> struct basic_numbers<char> :
-            ndnboost::hash_detail::enable_hash_value {};
-        template <> struct basic_numbers<unsigned char> :
-            ndnboost::hash_detail::enable_hash_value {};
-        template <> struct basic_numbers<signed char> :
-            ndnboost::hash_detail::enable_hash_value {};
-        template <> struct basic_numbers<short> :
-            ndnboost::hash_detail::enable_hash_value {};
-        template <> struct basic_numbers<unsigned short> :
-            ndnboost::hash_detail::enable_hash_value {};
-        template <> struct basic_numbers<int> :
-            ndnboost::hash_detail::enable_hash_value {};
-        template <> struct basic_numbers<unsigned int> :
-            ndnboost::hash_detail::enable_hash_value {};
-        template <> struct basic_numbers<long> :
-            ndnboost::hash_detail::enable_hash_value {};
-        template <> struct basic_numbers<unsigned long> :
-            ndnboost::hash_detail::enable_hash_value {};
-
-#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
-        template <> struct basic_numbers<wchar_t> :
-            ndnboost::hash_detail::enable_hash_value {};
-#endif
-
-        // long_numbers is defined like this to allow for separate
-        // specialization for long_long and int128_type, in case
-        // they conflict.
-        template <typename T> struct long_numbers2 {};
-        template <typename T> struct ulong_numbers2 {};
-        template <typename T> struct long_numbers : long_numbers2<T> {};
-        template <typename T> struct ulong_numbers : ulong_numbers2<T> {};
-
-#if !defined(BOOST_NO_LONG_LONG)
-        template <> struct long_numbers<ndnboost::long_long_type> :
-            ndnboost::hash_detail::enable_hash_value {};
-        template <> struct ulong_numbers<ndnboost::ulong_long_type> :
-            ndnboost::hash_detail::enable_hash_value {};
-#endif
-
-#if defined(BOOST_HAS_INT128)
-        template <> struct long_numbers2<ndnboost::int128_type> :
-            ndnboost::hash_detail::enable_hash_value {};
-        template <> struct ulong_numbers2<ndnboost::uint128_type> :
-            ndnboost::hash_detail::enable_hash_value {};
-#endif
-
-        template <> struct float_numbers<float> :
-            ndnboost::hash_detail::enable_hash_value {};
-        template <> struct float_numbers<double> :
-            ndnboost::hash_detail::enable_hash_value {};
-        template <> struct float_numbers<long double> :
-            ndnboost::hash_detail::enable_hash_value {};
-    }
-
-    template <typename T>
-    typename ndnboost::hash_detail::basic_numbers<T>::type hash_value(T);
-    template <typename T>
-    typename ndnboost::hash_detail::long_numbers<T>::type hash_value(T);
-    template <typename T>
-    typename ndnboost::hash_detail::ulong_numbers<T>::type hash_value(T);
-
-    template <typename T>
-    typename ndnboost::enable_if<ndnboost::is_enum<T>, std::size_t>::type
-        hash_value(T);
-
-#if !BOOST_WORKAROUND(__DMC__, <= 0x848)
-    template <class T> std::size_t hash_value(T* const&);
-#else
-    template <class T> std::size_t hash_value(T*);
-#endif
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
-    template< class T, unsigned N >
-    std::size_t hash_value(const T (&x)[N]);
-
-    template< class T, unsigned N >
-    std::size_t hash_value(T (&x)[N]);
-#endif
-
-    template <class Ch, class A>
-    std::size_t hash_value(
-        std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const&);
-
-    template <typename T>
-    typename ndnboost::hash_detail::float_numbers<T>::type hash_value(T);
-
-#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
-    std::size_t hash_value(std::type_index);
-#endif
-
-    // Implementation
-
-    namespace hash_detail
-    {
-        template <class T>
-        inline std::size_t hash_value_signed(T val)
-        {
-             const int size_t_bits = std::numeric_limits<std::size_t>::digits;
-             // ceiling(std::numeric_limits<T>::digits / size_t_bits) - 1
-             const int length = (std::numeric_limits<T>::digits - 1)
-                 / size_t_bits;
-
-             std::size_t seed = 0;
-             T positive = val < 0 ? -1 - val : val;
-
-             // Hopefully, this loop can be unrolled.
-             for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits)
-             {
-                 seed ^= (std::size_t) (positive >> i) + (seed<<6) + (seed>>2);
-             }
-             seed ^= (std::size_t) val + (seed<<6) + (seed>>2);
-
-             return seed;
-        }
-
-        template <class T>
-        inline std::size_t hash_value_unsigned(T val)
-        {
-             const int size_t_bits = std::numeric_limits<std::size_t>::digits;
-             // ceiling(std::numeric_limits<T>::digits / size_t_bits) - 1
-             const int length = (std::numeric_limits<T>::digits - 1)
-                 / size_t_bits;
-
-             std::size_t seed = 0;
-
-             // Hopefully, this loop can be unrolled.
-             for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits)
-             {
-                 seed ^= (std::size_t) (val >> i) + (seed<<6) + (seed>>2);
-             }
-             seed ^= (std::size_t) val + (seed<<6) + (seed>>2);
-
-             return seed;
-        }
-    }
-
-    template <typename T>
-    typename ndnboost::hash_detail::basic_numbers<T>::type hash_value(T v)
-    {
-        return static_cast<std::size_t>(v);
-    }
-
-    template <typename T>
-    typename ndnboost::hash_detail::long_numbers<T>::type hash_value(T v)
-    {
-        return hash_detail::hash_value_signed(v);
-    }
-
-    template <typename T>
-    typename ndnboost::hash_detail::ulong_numbers<T>::type hash_value(T v)
-    {
-        return hash_detail::hash_value_unsigned(v);
-    }
-
-    template <typename T>
-    typename ndnboost::enable_if<ndnboost::is_enum<T>, std::size_t>::type
-        hash_value(T v)
-    {
-        return static_cast<std::size_t>(v);
-    }
-
-    // Implementation by Alberto Barbati and Dave Harris.
-#if !BOOST_WORKAROUND(__DMC__, <= 0x848)
-    template <class T> std::size_t hash_value(T* const& v)
-#else
-    template <class T> std::size_t hash_value(T* v)
-#endif
-    {
-#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
-    // for some reason ptrdiff_t on OpenVMS compiler with
-    // 64 bit is not 64 bit !!!
-        std::size_t x = static_cast<std::size_t>(
-           reinterpret_cast<long long int>(v));
-#else
-        std::size_t x = static_cast<std::size_t>(
-           reinterpret_cast<std::ptrdiff_t>(v));
-#endif
-        return x + (x >> 3);
-    }
-
-#if defined(BOOST_MSVC)
-#pragma warning(push)
-#if BOOST_MSVC <= 1400
-#pragma warning(disable:4267) // 'argument' : conversion from 'size_t' to
-                              // 'unsigned int', possible loss of data
-                              // A misguided attempt to detect 64-bit
-                              // incompatability.
-#endif
-#endif
-
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-    template <class T>
-    inline void hash_combine(std::size_t& seed, T& v)
-#else
-    template <class T>
-    inline void hash_combine(std::size_t& seed, T const& v)
-#endif
-    {
-        ndnboost::hash<T> hasher;
-        seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2);
-    }
-
-#if defined(BOOST_MSVC)
-#pragma warning(pop)
-#endif
-
-    template <class It>
-    inline std::size_t hash_range(It first, It last)
-    {
-        std::size_t seed = 0;
-
-        for(; first != last; ++first)
-        {
-            hash_combine(seed, *first);
-        }
-
-        return seed;
-    }
-
-    template <class It>
-    inline void hash_range(std::size_t& seed, It first, It last)
-    {
-        for(; first != last; ++first)
-        {
-            hash_combine(seed, *first);
-        }
-    }
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
-    template <class T>
-    inline std::size_t hash_range(T* first, T* last)
-    {
-        std::size_t seed = 0;
-
-        for(; first != last; ++first)
-        {
-            ndnboost::hash<T> hasher;
-            seed ^= hasher(*first) + 0x9e3779b9 + (seed<<6) + (seed>>2);
-        }
-
-        return seed;
-    }
-
-    template <class T>
-    inline void hash_range(std::size_t& seed, T* first, T* last)
-    {
-        for(; first != last; ++first)
-        {
-            ndnboost::hash<T> hasher;
-            seed ^= hasher(*first) + 0x9e3779b9 + (seed<<6) + (seed>>2);
-        }
-    }
-#endif
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
-    template< class T, unsigned N >
-    inline std::size_t hash_value(const T (&x)[N])
-    {
-        return hash_range(x, x + N);
-    }
-
-    template< class T, unsigned N >
-    inline std::size_t hash_value(T (&x)[N])
-    {
-        return hash_range(x, x + N);
-    }
-#endif
-
-    template <class Ch, class A>
-    inline std::size_t hash_value(
-        std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const& v)
-    {
-        return hash_range(v.begin(), v.end());
-    }
-
-    template <typename T>
-    typename ndnboost::hash_detail::float_numbers<T>::type hash_value(T v)
-    {
-        return ndnboost::hash_detail::float_hash_value(v);
-    }
-
-#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
-    inline std::size_t hash_value(std::type_index v)
-    {
-        return v.hash_code();
-    }
-#endif
-
-    //
-    // ndnboost::hash
-    //
-    
-    // Define the specializations required by the standard. The general purpose
-    // ndnboost::hash is defined later in extensions.hpp if
-    // BOOST_HASH_NO_EXTENSIONS is not defined.
-    
-    // BOOST_HASH_SPECIALIZE - define a specialization for a type which is
-    // passed by copy.
-    //
-    // BOOST_HASH_SPECIALIZE_REF - define a specialization for a type which is
-    // passed by copy.
-    //
-    // These are undefined later.
-
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-#define BOOST_HASH_SPECIALIZE(type) \
-    template <> struct hash<type> \
-         : public std::unary_function<type, std::size_t> \
-    { \
-        std::size_t operator()(type v) const \
-        { \
-            return ndnboost::hash_value(v); \
-        } \
-    };
-
-#define BOOST_HASH_SPECIALIZE_REF(type) \
-    template <> struct hash<type> \
-         : public std::unary_function<type, std::size_t> \
-    { \
-        std::size_t operator()(type const& v) const \
-        { \
-            return ndnboost::hash_value(v); \
-        } \
-    };
-#else
-#define BOOST_HASH_SPECIALIZE(type) \
-    template <> struct hash<type> \
-         : public std::unary_function<type, std::size_t> \
-    { \
-        std::size_t operator()(type v) const \
-        { \
-            return ndnboost::hash_value(v); \
-        } \
-    }; \
-    \
-    template <> struct hash<const type> \
-         : public std::unary_function<const type, std::size_t> \
-    { \
-        std::size_t operator()(const type v) const \
-        { \
-            return ndnboost::hash_value(v); \
-        } \
-    };
-
-#define BOOST_HASH_SPECIALIZE_REF(type) \
-    template <> struct hash<type> \
-         : public std::unary_function<type, std::size_t> \
-    { \
-        std::size_t operator()(type const& v) const \
-        { \
-            return ndnboost::hash_value(v); \
-        } \
-    }; \
-    \
-    template <> struct hash<const type> \
-         : public std::unary_function<const type, std::size_t> \
-    { \
-        std::size_t operator()(type const& v) const \
-        { \
-            return ndnboost::hash_value(v); \
-        } \
-    };
-#endif
-
-    BOOST_HASH_SPECIALIZE(bool)
-    BOOST_HASH_SPECIALIZE(char)
-    BOOST_HASH_SPECIALIZE(signed char)
-    BOOST_HASH_SPECIALIZE(unsigned char)
-#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
-    BOOST_HASH_SPECIALIZE(wchar_t)
-#endif
-    BOOST_HASH_SPECIALIZE(short)
-    BOOST_HASH_SPECIALIZE(unsigned short)
-    BOOST_HASH_SPECIALIZE(int)
-    BOOST_HASH_SPECIALIZE(unsigned int)
-    BOOST_HASH_SPECIALIZE(long)
-    BOOST_HASH_SPECIALIZE(unsigned long)
-
-    BOOST_HASH_SPECIALIZE(float)
-    BOOST_HASH_SPECIALIZE(double)
-    BOOST_HASH_SPECIALIZE(long double)
-
-    BOOST_HASH_SPECIALIZE_REF(std::string)
-#if !defined(BOOST_NO_STD_WSTRING)
-    BOOST_HASH_SPECIALIZE_REF(std::wstring)
-#endif
-
-#if !defined(BOOST_NO_LONG_LONG)
-    BOOST_HASH_SPECIALIZE(ndnboost::long_long_type)
-    BOOST_HASH_SPECIALIZE(ndnboost::ulong_long_type)
-#endif
-
-#if defined(BOOST_HAS_INT128)
-    BOOST_HASH_SPECIALIZE(ndnboost::int128_type)
-    BOOST_HASH_SPECIALIZE(ndnboost::uint128_type)
-#endif
-
-#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
-    BOOST_HASH_SPECIALIZE(std::type_index)
-#endif
-
-#undef BOOST_HASH_SPECIALIZE
-#undef BOOST_HASH_SPECIALIZE_REF
-
-// Specializing ndnboost::hash for pointers.
-
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-    template <class T>
-    struct hash<T*>
-        : public std::unary_function<T*, std::size_t>
-    {
-        std::size_t operator()(T* v) const
-        {
-#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
-            return ndnboost::hash_value(v);
-#else
-            std::size_t x = static_cast<std::size_t>(
-                reinterpret_cast<std::ptrdiff_t>(v));
-
-            return x + (x >> 3);
-#endif
-        }
-    };
-
-#else
-
-    // For compilers without partial specialization, we define a
-    // ndnboost::hash for all remaining types. But hash_impl is only defined
-    // for pointers in 'extensions.hpp' - so when BOOST_HASH_NO_EXTENSIONS
-    // is defined there will still be a compile error for types not supported
-    // in the standard.
-
-    namespace hash_detail
-    {
-        template <bool IsPointer>
-        struct hash_impl;
-
-        template <>
-        struct hash_impl<true>
-        {
-            template <class T>
-            struct inner
-                : public std::unary_function<T, std::size_t>
-            {
-                std::size_t operator()(T val) const
-                {
-#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 590)
-                    return ndnboost::hash_value(val);
-#else
-                    std::size_t x = static_cast<std::size_t>(
-                        reinterpret_cast<std::ptrdiff_t>(val));
-
-                    return x + (x >> 3);
-#endif
-                }
-            };
-        };
-    }
-
-    template <class T> struct hash
-        : public ndnboost::hash_detail::hash_impl<ndnboost::is_pointer<T>::value>
-            ::BOOST_NESTED_TEMPLATE inner<T>
-    {
-    };
-
-#endif
-}
-
-#undef BOOST_HASH_CHAR_TRAITS
-
-#endif // BOOST_FUNCTIONAL_HASH_HASH_HPP
-
-// Include this outside of the include guards in case the file is included
-// twice - once with BOOST_HASH_NO_EXTENSIONS defined, and then with it
-// undefined.
-
-#if !defined(BOOST_HASH_NO_EXTENSIONS) \
-    && !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP)
-#include <ndnboost/functional/hash/extensions.hpp>
-#endif
diff --git a/ndnboost/functional/lightweight_forward_adapter.hpp b/ndnboost/functional/lightweight_forward_adapter.hpp
deleted file mode 100644
index 8312a2c..0000000
--- a/ndnboost/functional/lightweight_forward_adapter.hpp
+++ /dev/null
@@ -1,259 +0,0 @@
-/*=============================================================================
-    Copyright (c) 2007 Tobias Schwinger
-  
-    Use modification and distribution are subject to the Boost Software 
-    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-    http://www.boost.org/LICENSE_1_0.txt).
-==============================================================================*/
-
-#ifndef BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_HPP_INCLUDED
-#   ifndef BOOST_PP_IS_ITERATING
-
-#   include <ndnboost/config.hpp>
-#   include <ndnboost/detail/workaround.hpp>
-
-#   include <ndnboost/preprocessor/cat.hpp>
-#   include <ndnboost/preprocessor/iteration/iterate.hpp>
-#   include <ndnboost/preprocessor/repetition/enum.hpp>
-#   include <ndnboost/preprocessor/repetition/enum_params.hpp>
-#   include <ndnboost/preprocessor/repetition/enum_binary_params.hpp>
-#   include <ndnboost/preprocessor/facilities/intercept.hpp>
-
-#   include <ndnboost/utility/result_of.hpp>
-#   include <ndnboost/ref.hpp>
-
-#   ifndef BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY
-#     define BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY 10
-#   elif BOOST_FUNCTIONAL_FORDWARD_ADAPTER_MAX_ARITY < 3
-#     undef  BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY
-#     define BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY 3
-#   endif
-
-namespace ndnboost 
-{
-    template< typename Function, int Arity_Or_MinArity = -1, int MaxArity = -1 >
-    class lightweight_forward_adapter;
-
-    //----- ---- --- -- - -  -   -
-
-    namespace detail
-    {
-        template< class MostDerived, typename Function, typename FunctionConst, 
-            int Arity, int MinArity >
-        struct lightweight_forward_adapter_impl;
-
-        struct lightweight_forward_adapter_result
-        {
-            template< typename Sig > struct apply;
-
-            // Utility metafunction for argument transform
-            template< typename T > struct x  { typedef T const& t; };
-            template< typename T > struct x< ndnboost::reference_wrapper<T> >
-            { typedef T& t; };
-            template< typename T > struct x<T&>       : x<T> { };
-            template< typename T > struct x<T const&> : x<T> { };
-            template< typename T > struct x<T const>  : x<T> { };
-
-            // Utility metafunction to choose target function qualification
-            template< typename T > struct c
-            { typedef typename T::target_function_t t; };
-            template< typename T > struct c<T&      >
-            { typedef typename T::target_function_t t; };
-            template< typename T > struct c<T const >
-            { typedef typename T::target_function_const_t t; };
-            template< typename T > struct c<T const&>
-            { typedef typename T::target_function_const_t t; };
-        };
-    }
-
-#   define BOOST_TMP_MACRO(f,fn,fc) \
-        ndnboost::detail::lightweight_forward_adapter_impl< \
-            lightweight_forward_adapter<f,Arity_Or_MinArity,MaxArity>, fn, fc, \
-            (MaxArity!=-1? MaxArity :Arity_Or_MinArity!=-1? Arity_Or_MinArity \
-                :BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY), \
-            (Arity_Or_MinArity!=-1? Arity_Or_MinArity : 0) >
-
-    template< typename Function, int Arity_Or_MinArity, int MaxArity >
-    class lightweight_forward_adapter
-        : public BOOST_TMP_MACRO(Function,Function,Function const)
-        , private Function
-    {
-      public:
-        lightweight_forward_adapter(Function const& f = Function()) 
-          : Function(f) 
-        { }
-
-        typedef Function        target_function_t;
-        typedef Function const  target_function_const_t;
-
-        Function       & target_function()       { return *this; }
-        Function const & target_function() const { return *this; }
-
-        template< typename Sig > struct result
-            : detail::lightweight_forward_adapter_result::template apply<Sig>
-        { };
-
-        using BOOST_TMP_MACRO(Function,Function, Function const)::operator();
-    };
-    template< typename Function, int Arity_Or_MinArity, int MaxArity >
-    class lightweight_forward_adapter< Function const, Arity_Or_MinArity, 
-        MaxArity >
-        : public BOOST_TMP_MACRO(Function const, Function const, Function const)
-        , private Function
-    {
-      public:
-        lightweight_forward_adapter(Function const& f = Function())
-          : Function(f) 
-        { }
-
-        typedef Function const target_function_t;
-        typedef Function const target_function_const_t;
-
-        Function const & target_function() const { return *this; }
-
-        template< typename Sig > struct result
-            : detail::lightweight_forward_adapter_result::template apply<Sig>
-        { };
-
-        using BOOST_TMP_MACRO(Function const,Function const, Function const)
-            ::operator();
-    };
-    template< typename Function, int Arity_Or_MinArity, int MaxArity >
-    class lightweight_forward_adapter< Function &, Arity_Or_MinArity, MaxArity >
-        : public BOOST_TMP_MACRO(Function&, Function, Function)
-    {
-        Function& ref_function;
-      public:
-        lightweight_forward_adapter(Function& f)
-          : ref_function(f) 
-        { }
-
-        typedef Function target_function_t;
-        typedef Function target_function_const_t;
-
-        Function & target_function() const { return this->ref_function; }
-
-        template< typename Sig > struct result
-            : detail::lightweight_forward_adapter_result::template apply<Sig>
-        { };
-
-        using BOOST_TMP_MACRO(Function&, Function, Function)::operator();
-    }; 
-
-    #undef BOOST_TMP_MACRO
-
-    namespace detail
-    {
-        template< class Self >
-        struct lightweight_forward_adapter_result::apply< Self() >
-            : ndnboost::result_of< BOOST_DEDUCED_TYPENAME c<Self>::t() >
-        { };
-
-        template< class MD, class F, class FC >
-        struct lightweight_forward_adapter_impl<MD,F,FC,0,0>
-            : lightweight_forward_adapter_result
-        {
-            inline typename ndnboost::result_of< FC() >::type
-            operator()() const
-            {
-                return static_cast<MD const*>(this)->target_function()();
-            }
-
-            inline typename ndnboost::result_of< F() >::type
-            operator()()
-            {
-                return static_cast<MD*>(this)->target_function()();
-            }
-        };
-
-#       define  BOOST_PP_FILENAME_1 \
-            <ndnboost/functional/lightweight_forward_adapter.hpp>
-#       define  BOOST_PP_ITERATION_LIMITS                                     \
-            (1,BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY) 
-#       include BOOST_PP_ITERATE()
-
-    } // namespace detail
-
-    template<class F, int A0, int A1>
-    struct result_of<ndnboost::lightweight_forward_adapter<F,A0,A1> const ()>
-        : ndnboost::detail::lightweight_forward_adapter_result::template apply<
-            ndnboost::lightweight_forward_adapter<F,A0,A1> const () >
-    { };
-    template<class F, int A0, int A1>
-    struct result_of<ndnboost::lightweight_forward_adapter<F,A0,A1>()>
-        : ndnboost::detail::lightweight_forward_adapter_result::template apply<
-            ndnboost::lightweight_forward_adapter<F,A0,A1>() >
-    { };
-    template<class F, int A0, int A1>
-    struct result_of<ndnboost::lightweight_forward_adapter<F,A0,A1> const& ()>
-        : ndnboost::detail::lightweight_forward_adapter_result::template apply<
-            ndnboost::lightweight_forward_adapter<F,A0,A1> const () >
-    { };
-    template<class F, int A0, int A1>
-    struct result_of<ndnboost::lightweight_forward_adapter<F,A0,A1>& ()>
-        : ndnboost::detail::lightweight_forward_adapter_result::template apply<
-            ndnboost::lightweight_forward_adapter<F,A0,A1>() >
-    { };
-}
-
-#     define BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_HPP_INCLUDED
-
-#   else // defined(BOOST_PP_IS_ITERATING)
-#     define N BOOST_PP_ITERATION() 
-
-        template< class Self, BOOST_PP_ENUM_PARAMS(N,typename T) >
-        struct lightweight_forward_adapter_result::apply<
-            Self (BOOST_PP_ENUM_PARAMS(N,T)) >
-            : ndnboost::result_of<
-                BOOST_DEDUCED_TYPENAME c<Self>::t (BOOST_PP_ENUM_BINARY_PARAMS(N,
-                    typename x<T,>::t BOOST_PP_INTERCEPT)) >
-        { };
-
-        template< class MD, class F, class FC >
-        struct lightweight_forward_adapter_impl<MD,F,FC,BOOST_PP_DEC(N),N>
-            : lightweight_forward_adapter_result
-        {
-            template< BOOST_PP_ENUM_PARAMS(N,typename T) >
-            inline typename ndnboost::result_of< F(BOOST_PP_ENUM_BINARY_PARAMS(N,
-                T,const& BOOST_PP_INTERCEPT)) >::type
-            operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT));
-        };
-
-        template< class MD, class F, class FC, int MinArity >
-        struct lightweight_forward_adapter_impl<MD,F,FC,N,MinArity>
-            : lightweight_forward_adapter_impl<MD,F,FC,BOOST_PP_DEC(N),MinArity>
-        {
-            using lightweight_forward_adapter_impl<MD,F,FC,BOOST_PP_DEC(N),
-                MinArity>::operator();
-
-#     define M(z,i,d) \
-          static_cast<typename d::template x<T##i>::t>(a##i)
-
-            template< BOOST_PP_ENUM_PARAMS(N,typename T) >
-            inline typename lightweight_forward_adapter_result::template apply<
-                MD const (BOOST_PP_ENUM_BINARY_PARAMS(N,
-                    T,const& BOOST_PP_INTERCEPT)) >::type
-            operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& a)) const
-            {
-                typedef lightweight_forward_adapter_result _;
-                return static_cast<MD const*>(this)->target_function()(
-                    BOOST_PP_ENUM(N,M,_));
-            }
-            template< BOOST_PP_ENUM_PARAMS(N,typename T) >
-            inline typename lightweight_forward_adapter_result::template apply<
-                MD (BOOST_PP_ENUM_BINARY_PARAMS(N,
-                    T,const& BOOST_PP_INTERCEPT)) >::type
-            operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& a))
-            {
-                typedef lightweight_forward_adapter_result _;
-                return static_cast<MD*>(this)->target_function()(
-                    BOOST_PP_ENUM(N,M,_));
-            }
-#     undef M
-      };
-
-#     undef N
-#   endif // defined(BOOST_PP_IS_ITERATING)
-
-#endif // include guard
-
diff --git a/ndnboost/functional/overloaded_function.hpp b/ndnboost/functional/overloaded_function.hpp
deleted file mode 100644
index d2a1369..0000000
--- a/ndnboost/functional/overloaded_function.hpp
+++ /dev/null
@@ -1,311 +0,0 @@
-
-// Copyright (C) 2009-2012 Lorenzo Caminiti
-// Distributed under the Boost Software License, Version 1.0
-// (see accompanying file LICENSE_1_0.txt or a copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-// Home at http://www.boost.org/libs/functional/overloaded_function
-
-#ifndef DOXYGEN // Doxygen documentation only.
-
-#if !BOOST_PP_IS_ITERATING
-#   ifndef BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_HPP_
-#       define BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_HPP_
-
-#       include <ndnboost/functional/overloaded_function/detail/base.hpp>
-#       include <ndnboost/functional/overloaded_function/detail/function_type.hpp>
-#       include <ndnboost/functional/overloaded_function/config.hpp>
-#       include <ndnboost/typeof/typeof.hpp>
-#       include <ndnboost/preprocessor/iteration/iterate.hpp>
-#       include <ndnboost/preprocessor/repetition/enum.hpp>
-#       include <ndnboost/preprocessor/repetition/repeat.hpp>
-#       include <ndnboost/preprocessor/control/expr_iif.hpp>
-#       include <ndnboost/preprocessor/control/expr_if.hpp>
-#       include <ndnboost/preprocessor/comparison/greater.hpp>
-#       include <ndnboost/preprocessor/comparison/less.hpp>
-#       include <ndnboost/preprocessor/cat.hpp>
-#       include <ndnboost/preprocessor/arithmetic/add.hpp>
-#       include <ndnboost/preprocessor/arithmetic/sub.hpp>
-#       include <ndnboost/preprocessor/tuple/eat.hpp>
-#       include <ndnboost/preprocessor/logical/and.hpp>
-#       include <ndnboost/preprocessor/logical/not.hpp>
-#       include <ndnboost/preprocessor/facilities/expand.hpp>
-
-#define BOOST_FUNCTIONAL_f_type(z, n, unused) \
-    BOOST_PP_CAT(F, n)
-
-#define BOOST_FUNCTIONAL_f_arg(z, n, unused) \
-    BOOST_PP_CAT(f, n)
-
-#define BOOST_FUNCTIONAL_f_tparam(z, n, unused) \
-    typename BOOST_FUNCTIONAL_f_type(z, n, ~) \
-
-#define BOOST_FUNCTIONAL_f_tparam_dflt(z, n, is_tspec) \
-    BOOST_FUNCTIONAL_f_tparam(z, n, ~) \
-    /* overload requires at least 2 functors so F0 and F1 not optional */ \
-    BOOST_PP_EXPR_IIF(BOOST_PP_AND(BOOST_PP_NOT(is_tspec), \
-            BOOST_PP_GREATER(n, 1)), \
-        = void \
-    )
-
-#define BOOST_FUNCTIONAL_f_arg_decl(z, n, unused) \
-    BOOST_FUNCTIONAL_f_type(z, n, ~) /* no qualifier to deduce tparam */ \
-    BOOST_FUNCTIONAL_f_arg(z, n, ~)
-
-#define BOOST_FUNCTIONAL_g_type(z, n, unused) \
-    BOOST_PP_CAT(G, n)
-
-#define BOOST_FUNCTIONAL_g_arg(z, n, unused) \
-    BOOST_PP_CAT(g, n)
-
-#define BOOST_FUNCTIONAL_g_tparam(z, n, unused) \
-    typename BOOST_FUNCTIONAL_g_type(z, n, ~)
-
-#define BOOST_FUNCTIONAL_g_arg_decl(z, n, unused) \
-    BOOST_FUNCTIONAL_g_type(z, n, ~) /* no qualifier to deduce tparam */ \
-    BOOST_FUNCTIONAL_g_arg(z, n, ~)
-
-#define BOOST_FUNCTIONAL_base(z, n, unused) \
-    ::ndnboost::overloaded_function_detail::base< \
-        BOOST_FUNCTIONAL_f_type(z, n, ~) \
-    >
-
-#define BOOST_FUNCTIONAL_inherit(z, n, unused) \
-    public BOOST_FUNCTIONAL_base(z, n, ~)
-
-#define BOOST_FUNCTIONAL_base_init(z, n, unused) \
-    BOOST_FUNCTIONAL_base(z, n, ~)(BOOST_FUNCTIONAL_g_arg(z, n, ~))
-
-#define BOOST_FUNCTIONAL_using_operator_call(z, n, unused) \
-    using BOOST_FUNCTIONAL_base(z, n, ~)::operator();
-
-#define BOOST_FUNCTIONAL_function_type(z, n, unused) \
-    typename ::ndnboost::overloaded_function_detail::function_type< \
-        BOOST_FUNCTIONAL_f_type(z, n, ~) \
-    >::type
-
-#       define BOOST_PP_ITERATION_PARAMS_1 \
-            /* at least 2 func to overload so start from 2 to MAX */ \
-            /* (cannot iterate [0, MAX-2) because error on Sun) */ \
-            (3, (2, BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX, \
-            "ndnboost/functional/overloaded_function.hpp"))
-#       include BOOST_PP_ITERATE() // Iterate over function arity.
-
-#undef BOOST_FUNCTIONAL_f_type
-#undef BOOST_FUNCTIONAL_f_arg
-#undef BOOST_FUNCTIONAL_f_tparam
-#undef BOOST_FUNCTIONAL_f_arg_decl
-#undef BOOST_FUNCTIONAL_f_tparam_dflt
-#undef BOOST_FUNCTIONAL_g_type
-#undef BOOST_FUNCTIONAL_g_arg
-#undef BOOST_FUNCTIONAL_g_tparam
-#undef BOOST_FUNCTIONAL_g_arg_decl
-#undef BOOST_FUNCTIONAL_base
-#undef BOOST_FUNCTIONAL_inherit
-#undef BOOST_FUNCTIONAL_base_init
-#undef BOOST_FUNCTIONAL_using_operator_call
-#undef BOOST_FUNCTIONAL_function_type
-
-#   endif // #include guard
-
-#elif BOOST_PP_ITERATION_DEPTH() == 1
-#   define BOOST_FUNCTIONAL_overloads \
-        /* iterate as OVERLOADS, OVERLOADS-1, OVERLOADS-2, ... */ \
-        /* (add 2 because iteration started from 2 to MAX) */ \
-        BOOST_PP_ADD(2, BOOST_PP_SUB( \
-                BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX, \
-                BOOST_PP_FRAME_ITERATION(1)))
-#   define BOOST_FUNCTIONAL_is_tspec \
-        /* if template specialization */ \
-        BOOST_PP_LESS(BOOST_FUNCTIONAL_overloads, \
-                BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX)
-
-// For type-of emulation: This must be included at this pp iteration level.
-#   include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
-
-namespace ndnboost {
-
-template<
-    BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_f_tparam_dflt,
-            BOOST_FUNCTIONAL_is_tspec)
->
-class overloaded_function
-    // Template specialization.
-    BOOST_PP_EXPR_IIF(BOOST_PP_EXPAND(BOOST_FUNCTIONAL_is_tspec), <)
-    BOOST_PP_IIF(BOOST_FUNCTIONAL_is_tspec,
-        BOOST_PP_ENUM
-    ,
-        BOOST_PP_TUPLE_EAT(3)
-    )(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_f_type, ~)
-    BOOST_PP_EXPR_IIF(BOOST_PP_EXPAND(BOOST_FUNCTIONAL_is_tspec), >)
-    // Bases (overloads >= 2 so always at least 2 bases).
-    : BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads,
-            BOOST_FUNCTIONAL_inherit, ~)
-{
-public:
-    template<
-        BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_g_tparam, ~)
-    > /* implicit */ inline overloaded_function(
-            BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads,
-                    BOOST_FUNCTIONAL_g_arg_decl, ~))
-            // Overloads >= 2 so always at least 2 bases to initialize.
-            : BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads,
-                    BOOST_FUNCTIONAL_base_init, ~)
-    {}
-
-    BOOST_PP_REPEAT(BOOST_FUNCTIONAL_overloads, 
-            BOOST_FUNCTIONAL_using_operator_call, ~)
-};
-
-template<
-    BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_f_tparam, ~)
->
-overloaded_function<
-    BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_function_type, ~)
-> make_overloaded_function(
-    BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_f_arg_decl, ~)
-) {
-    return overloaded_function<
-        BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads,
-                BOOST_FUNCTIONAL_function_type, ~)
-    >(BOOST_PP_ENUM(BOOST_FUNCTIONAL_overloads, BOOST_FUNCTIONAL_f_arg, ~));
-}
-
-} // namespace
-
-// For type-of emulation: Register overloaded function type (for _AUTO, etc).
-BOOST_TYPEOF_REGISTER_TEMPLATE(ndnboost::overloaded_function,
-    BOOST_FUNCTIONAL_overloads)
-
-#   undef BOOST_FUNCTIONAL_overloads
-#   undef BOOST_FUNCTIONAL_is_tspec
-#endif // iteration
-
-// DOCUMENTATION //
-
-#else // DOXYGEN
-
-/** @file
-@brief Overload distinct function pointers, function references, and
-monomorphic function objects into a single function object.
-*/
-
-namespace ndnboost {
-
-/**
-@brief Function object to overload functions with distinct signatures.
-
-This function object aggregates together calls to functions of all the
-specified function types <c>F1</c>, <c>F2</c>, etc which must have distinct
-function signatures from one another.
-
-@Params
-@Param{F<em>i</em>,
-Each function type must be specified using the following syntax (which is
-Boost.Function's preferred syntax):
-@code
-    result_type (argument1_type\, argumgnet2_type\, ...)
-@endcode
-}
-@EndParams
-
-In some cases, the @RefFunc{make_overloaded_function} function template can be
-useful to construct an overloaded function object without explicitly
-specifying the function types.
-
-At least two distinct function types must be specified (because there is
-nothing to overload between one or zero functions).
-The maximum number of functions to overload is given by the
-@RefMacro{BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX}
-configuration macro.
-The maximum number of function parameters for each of the specified function
-types is given by the
-@RefMacro{BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX}
-configuration macro.
-
-@See @RefSect{tutorial, Tutorial} section, @RefFunc{make_overloaded_function},
-@RefMacro{BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX},
-@RefMacro{BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX},
-Boost.Function.
-*/
-template<typename F1, typename F2, ...>
-class overloaded_function {
-public:
-    /**
-    @brief Construct the overloaded function object.
-
-    Any function pointer, function reference, and monomorphic function object
-    that can be converted to a <c>ndnboost::function</c> function object can be
-    specified as parameter.
-
-    @Note Unfortunately, it is not possible to support polymorphic function
-    objects (as explained <a
-    href="http://lists.boost.org/Archives/boost/2012/03/191744.php">here</a>).
-    */
-    overloaded_function(const ndnboost::function<F1>&,
-            const ndnboost::function<F2>&, ...);
-
-    /**
-    @brief Call operator matching the signature of the function type specified
-    as 1st template parameter.
-
-    This will in turn invoke the call operator of the 1st function passed to
-    the constructor.
-    */
-    typename ndnboost::function_traits<F1>::result_type operator()(
-            typename ndnboost::function_traits<F1>::arg1_type,
-            typename ndnboost::function_traits<F1>::arg2_type,
-            ...) const;
-
-    /**
-    @brief Call operator matching the signature of the function type specified
-    as 2nd template parameter.
-
-    This will in turn invoke the call operator of the 2nd function passed to
-    the constructor.
-
-    @Note Similar call operators are present for all specified function types
-    <c>F1</c>, <c>F2</c>, etc (even if not exhaustively listed by this
-    documentation).
-    */
-    typename ndnboost::function_traits<F2>::result_type operator()(
-            typename ndnboost::function_traits<F2>::arg1_type,
-            typename ndnboost::function_traits<F2>::arg2_type,
-            ...) const;
-};
-
-/**
-@brief Make an overloaded function object without explicitly specifying the
-function types.
-
-This function template creates and returns an @RefClass{overloaded_function}
-object that overloads all the specified functions <c>f1</c>, <c>f2</c>, etc.
-
-The function types are internally determined from the template parameter types
-so they do not need to be explicitly specified.
-Therefore, this function template usually has a more concise syntax when
-compared with @RefClass{overloaded_function}.
-This is especially useful when the explicit type of the returned
-@RefClass{overloaded_function} object does not need to be known (e.g., when
-used with Boost.Typeof's <c>BOOST_AUTO</c>, C++11 <c>auto</c>, or when the
-overloaded function object is handled using a function template parameter, see
-the @RefSect{tutorial, Tutorial} section).
-
-The maximum number of functions to overload is given by the
-@RefMacro{BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX}
-configuration macro.
-
-@Note In this documentation, <c>__function_type__</c> is a placeholder for a
-symbol that is specific to the implementation of this library.
-
-@See @RefSect{tutorial, Tutorial} section, @RefClass{overloaded_function},
-@RefMacro{BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX}.
-*/
-template<typename F1, typename F2, ...>
-overloaded_function<
-    __function_type__<F1>, __function_type__<F2>, ...
-> make_overloaded_function(F1 f1, F2 f2, ...);
-
-} // namespace
-
-#endif // DOXYGEN
-
diff --git a/ndnboost/functional/overloaded_function/config.hpp b/ndnboost/functional/overloaded_function/config.hpp
deleted file mode 100644
index 33ff1b5..0000000
--- a/ndnboost/functional/overloaded_function/config.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-
-// Copyright (C) 2009-2012 Lorenzo Caminiti
-// Distributed under the Boost Software License, Version 1.0
-// (see accompanying file LICENSE_1_0.txt or a copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-// Home at http://www.boost.org/libs/functional/overloaded_function
-
-#ifndef BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_HPP_
-#define BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_HPP_
-
-/** @file
-@brief Change the compile-time configuration of this library.
-*/
-
-/**
-@brief Specify the maximum number of arguments of the functions being
-overloaded.
-
-If this macro is left undefined by the user, it has a default value of 5
-(increasing this number might increase compilation time).
-When specified by the user, this macro must be a non-negative integer number.
-
-@See @RefSect{getting_started, Getting Started},
-@RefClass{ndnboost::overloaded_function}.
-*/
-#ifndef BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX 
-#   define BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX 5
-#endif
-
-/**
-@brief Specify the maximum number of functions that can be overloaded.
-
-If this macro is left undefined by the user, it has a default value of 5
-(increasing this number might increase compilation time).
-When defined by the user, this macro must be an integer number greater or
-equal than 2 (because at least two distinct functions need to be specified in
-order to define an overload).
-
-@See @RefSect{getting_started, Getting Started},
-@RefClass{ndnboost::overloaded_function}.
-*/
-#ifndef BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX
-#   define BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX 5
-#endif
-#if BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_OVERLOAD_MAX < 2
-#   error "maximum overload macro cannot be less than 2"
-#endif
-
-#endif // #include guard
-
diff --git a/ndnboost/functional/overloaded_function/detail/base.hpp b/ndnboost/functional/overloaded_function/detail/base.hpp
deleted file mode 100644
index c4cef04..0000000
--- a/ndnboost/functional/overloaded_function/detail/base.hpp
+++ /dev/null
@@ -1,86 +0,0 @@
-
-// Copyright (C) 2009-2012 Lorenzo Caminiti
-// Distributed under the Boost Software License, Version 1.0
-// (see accompanying file LICENSE_1_0.txt or a copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-// Home at http://www.boost.org/libs/functional/overloaded_function
-
-#if !BOOST_PP_IS_ITERATING
-#   ifndef BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_DETAIL_BASE_HPP_
-#       define BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_DETAIL_BASE_HPP_
-
-#       include <ndnboost/functional/overloaded_function/config.hpp>
-#       include <ndnboost/function.hpp>
-#       include <ndnboost/preprocessor/iteration/iterate.hpp>
-#       include <ndnboost/preprocessor/repetition/enum.hpp>
-#       include <ndnboost/preprocessor/cat.hpp>
-#       include <ndnboost/preprocessor/comma_if.hpp>
-
-#define BOOST_FUNCTIONAL_DETAIL_arg_type(z, n, unused) \
-    BOOST_PP_CAT(A, n)
-
-#define BOOST_FUNCTIONAL_DETAIL_arg_name(z, n, unused) \
-    BOOST_PP_CAT(a, n)
-
-#define BOOST_FUNCTIONAL_DETAIL_arg_tparam(z, n, unused) \
-    typename BOOST_FUNCTIONAL_DETAIL_arg_type(z, n, unused)
-
-#define BOOST_FUNCTIONAL_DETAIL_arg(z, n, unused) \
-    BOOST_FUNCTIONAL_DETAIL_arg_type(z, n, unused) \
-    BOOST_FUNCTIONAL_DETAIL_arg_name(z, n, unused)
-
-#define BOOST_FUNCTIONAL_DETAIL_f \
-    R (BOOST_PP_ENUM(BOOST_FUNCTIONAL_DETAIL_arity, \
-            BOOST_FUNCTIONAL_DETAIL_arg_type, ~))
-
-// Do not use namespace ::detail because overloaded_function is already a class.
-namespace ndnboost { namespace overloaded_function_detail {
-
-template<typename F>
-class base {}; // Empty template cannot be used directly (only its spec).
-
-#       define BOOST_PP_ITERATION_PARAMS_1 \
-                (3, (0, BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_CONFIG_ARITY_MAX, \
-                "ndnboost/functional/overloaded_function/detail/base.hpp"))
-#       include BOOST_PP_ITERATE() // Iterate over funciton arity.
-
-} } // namespace
-
-#undef BOOST_FUNCTIONAL_DETAIL_arg_type
-#undef BOOST_FUNCTIONAL_DETAIL_arg_name
-#undef BOOST_FUNCTIONAL_DETAIL_arg_tparam
-#undef BOOST_FUNCTIONAL_DETAIL_arg
-#undef BOOST_FUNCTIONAL_DETAIL_f
-
-#   endif // #include guard
-
-#elif BOOST_PP_ITERATION_DEPTH() == 1
-#   define BOOST_FUNCTIONAL_DETAIL_arity BOOST_PP_FRAME_ITERATION(1)
-
-template<
-    typename R
-    BOOST_PP_COMMA_IF(BOOST_FUNCTIONAL_DETAIL_arity)
-    BOOST_PP_ENUM(BOOST_FUNCTIONAL_DETAIL_arity,
-            BOOST_FUNCTIONAL_DETAIL_arg_tparam, ~)
->
-class base< BOOST_FUNCTIONAL_DETAIL_f > {
-public:
-    /* implicit */ inline base(
-            // This requires specified type to be implicitly convertible to
-            // a ndnboost::function<> functor.
-            ndnboost::function< BOOST_FUNCTIONAL_DETAIL_f > const& f): f_(f)
-    {}
-
-    inline R operator()(BOOST_PP_ENUM(BOOST_FUNCTIONAL_DETAIL_arity,
-            BOOST_FUNCTIONAL_DETAIL_arg, ~)) const {
-        return f_(BOOST_PP_ENUM(BOOST_FUNCTIONAL_DETAIL_arity,
-                BOOST_FUNCTIONAL_DETAIL_arg_name, ~));
-    }
-
-private:
-    ndnboost::function< BOOST_FUNCTIONAL_DETAIL_f > const f_;
-};
-
-#   undef BOOST_FUNCTIONAL_DETAIL_arity
-#endif // iteration
-
diff --git a/ndnboost/functional/overloaded_function/detail/function_type.hpp b/ndnboost/functional/overloaded_function/detail/function_type.hpp
deleted file mode 100644
index 7119f93..0000000
--- a/ndnboost/functional/overloaded_function/detail/function_type.hpp
+++ /dev/null
@@ -1,85 +0,0 @@
-
-// Copyright (C) 2009-2012 Lorenzo Caminiti
-// Distributed under the Boost Software License, Version 1.0
-// (see accompanying file LICENSE_1_0.txt or a copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-// Home at http://www.boost.org/libs/functional/overloaded_function
-
-#ifndef BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_DETAIL_FUNCTION_TYPE_HPP_
-#define BOOST_FUNCTIONAL_OVERLOADED_FUNCTION_DETAIL_FUNCTION_TYPE_HPP_
-
-#include <ndnboost/function_types/is_function.hpp>
-#include <ndnboost/function_types/is_function_pointer.hpp>
-#include <ndnboost/function_types/is_function_reference.hpp>
-#include <ndnboost/function_types/function_type.hpp>
-#include <ndnboost/function_types/parameter_types.hpp>
-#include <ndnboost/function_types/result_type.hpp>
-#include <ndnboost/type_traits/remove_pointer.hpp>
-#include <ndnboost/type_traits/remove_reference.hpp>
-#include <ndnboost/function.hpp>
-#include <ndnboost/mpl/if.hpp>
-#include <ndnboost/mpl/identity.hpp>
-#include <ndnboost/mpl/pop_front.hpp>
-#include <ndnboost/mpl/push_front.hpp>
-#include <ndnboost/typeof/typeof.hpp>
-
-// Do not use namespace ::detail because overloaded_function is already a class.
-namespace ndnboost { namespace overloaded_function_detail {
-
-// Requires: F is a monomorphic functor (i.e., has non-template `operator()`).
-// Returns: F's function type `result_type (arg1_type, arg2_type, ...)`.
-// It does not assume F typedef result_type, arg1_type, ... but needs typeof.
-template<typename F>
-class functor_type {
-    // NOTE: clang does not accept extra parenthesis `&(...)`.
-    typedef BOOST_TYPEOF_TPL(&F::operator()) call_ptr;
-public:
-    typedef
-        typename ndnboost::function_types::function_type<
-            typename ndnboost::mpl::push_front<
-                  typename ndnboost::mpl::pop_front< // Remove functor type (1st).
-                    typename ndnboost::function_types::parameter_types<
-                            call_ptr>::type
-                  >::type
-                , typename ndnboost::function_types::result_type<call_ptr>::type
-            >::type
-        >::type
-    type;
-};
-
-// NOTE: When using ndnboost::function in Boost.Typeof emulation mode, the user
-// has to register ndnboost::functionN instead of ndnboost::function in oder to
-// do TYPEOF(F::operator()). That is confusing, so ndnboost::function is handled
-// separately so it does not require any Boost.Typeof registration at all.
-template<typename F>
-struct functor_type< ndnboost::function<F> > {
-    typedef F type;
-};
-
-// Requires: F is a function type, pointer, reference, or monomorphic functor.
-// Returns: F's function type `result_type (arg1_type, arg2_type, ...)`.
-template<typename F>
-struct function_type {
-    typedef
-        typename ndnboost::mpl::if_<ndnboost::function_types::is_function<F>,
-            ndnboost::mpl::identity<F>
-        ,
-            typename ndnboost::mpl::if_<ndnboost::function_types::
-                    is_function_pointer<F>,
-                ndnboost::remove_pointer<F>
-            ,
-                typename ndnboost::mpl::if_<ndnboost::function_types::
-                        is_function_reference<F>,
-                    ndnboost::remove_reference<F>
-                , // Else, requires that F is a functor.
-                    functor_type<F>
-                >::type
-            >::type
-        >::type
-    ::type type;
-};
-
-} } // namespace
-
-#endif // #include guard
-
diff --git a/ndnboost/functional/value_factory.hpp b/ndnboost/functional/value_factory.hpp
deleted file mode 100644
index c917519..0000000
--- a/ndnboost/functional/value_factory.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*=============================================================================
-    Copyright (c) 2007 Tobias Schwinger
-  
-    Use modification and distribution are subject to the Boost Software 
-    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-    http://www.boost.org/LICENSE_1_0.txt).
-==============================================================================*/
-
-#ifndef BOOST_FUNCTIONAL_VALUE_FACTORY_HPP_INCLUDED
-#   ifndef BOOST_PP_IS_ITERATING
-
-#     include <ndnboost/preprocessor/iteration/iterate.hpp>
-#     include <ndnboost/preprocessor/repetition/enum_params.hpp>
-#     include <ndnboost/preprocessor/repetition/enum_binary_params.hpp>
-
-#     include <new>
-#     include <ndnboost/pointee.hpp>
-#     include <ndnboost/none_t.hpp>
-#     include <ndnboost/get_pointer.hpp>
-#     include <ndnboost/non_type.hpp>
-#     include <ndnboost/type_traits/remove_cv.hpp>
-
-#     ifndef BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY
-#       define BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY 10
-#     elif BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY < 3
-#       undef  BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY
-#       define BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY 3
-#     endif
-
-namespace ndnboost
-{
-    template< typename T >
-    class value_factory;
-
-    //----- ---- --- -- - -  -   -
-
-    template< typename T >
-    class value_factory
-    {
-      public:
-        typedef T result_type;
-
-        value_factory()
-        { }
-
-#     define BOOST_PP_FILENAME_1 <ndnboost/functional/value_factory.hpp>
-#     define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY)
-#     include BOOST_PP_ITERATE()
-    };
-
-    template< typename T > class value_factory<T&>;
-    // forbidden, would create a dangling reference
-}
-#     define BOOST_FUNCTIONAL_VALUE_FACTORY_HPP_INCLUDED
-#   else // defined(BOOST_PP_IS_ITERATING)
-
-#     define N BOOST_PP_ITERATION()
-#     if N > 0
-    template< BOOST_PP_ENUM_PARAMS(N, typename T) >
-#     endif
-    inline result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const
-    {
-        return result_type(BOOST_PP_ENUM_PARAMS(N,a));
-    }
-#     undef N
-
-#   endif // defined(BOOST_PP_IS_ITERATING)
-
-#endif // include guard
-
diff --git a/ndnboost/indirect_reference.hpp b/ndnboost/indirect_reference.hpp
new file mode 100644
index 0000000..fdd5e72
--- /dev/null
+++ b/ndnboost/indirect_reference.hpp
@@ -0,0 +1,43 @@
+#ifndef INDIRECT_REFERENCE_DWA200415_HPP
+# define INDIRECT_REFERENCE_DWA200415_HPP
+
+//
+// Copyright David Abrahams 2004. Use, modification and distribution is
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// typename indirect_reference<P>::type provides the type of *p.
+//
+// http://www.boost.org/libs/iterator/doc/pointee.html
+//
+
+# include <ndnboost/detail/is_incrementable.hpp>
+# include <ndnboost/iterator/iterator_traits.hpp>
+# include <ndnboost/type_traits/remove_cv.hpp>
+# include <ndnboost/mpl/eval_if.hpp>
+# include <ndnboost/pointee.hpp>
+
+namespace ndnboost { 
+
+namespace detail
+{
+  template <class P>
+  struct smart_ptr_reference
+  {
+      typedef typename ndnboost::pointee<P>::type& type;
+  };
+}
+
+template <class P>
+struct indirect_reference
+  : mpl::eval_if<
+        detail::is_incrementable<P>
+      , iterator_reference<P>
+      , detail::smart_ptr_reference<P>
+    >
+{
+};
+  
+} // namespace ndnboost
+
+#endif // INDIRECT_REFERENCE_DWA200415_HPP
diff --git a/ndnboost/io/ios_state.hpp b/ndnboost/io/ios_state.hpp
new file mode 100644
index 0000000..bee1422
--- /dev/null
+++ b/ndnboost/io/ios_state.hpp
@@ -0,0 +1,439 @@
+//  Boost io/ios_state.hpp header file  --------------------------------------//
+
+//  Copyright 2002, 2005 Daryle Walker.  Use, modification, and distribution
+//  are subject to the Boost Software License, Version 1.0.  (See accompanying
+//  file LICENSE_1_0.txt or a copy at <http://www.boost.org/LICENSE_1_0.txt>.)
+
+//  See <http://www.boost.org/libs/io/> for the library's home page.
+
+#ifndef BOOST_IO_IOS_STATE_HPP
+#define BOOST_IO_IOS_STATE_HPP
+
+#include <ndnboost/io_fwd.hpp>  // self include
+#include <ndnboost/detail/workaround.hpp>
+
+#include <ios>        // for std::ios_base, std::basic_ios, etc.
+#ifndef BOOST_NO_STD_LOCALE
+#include <locale>     // for std::locale
+#endif
+#include <ostream>    // for std::basic_ostream
+#include <streambuf>  // for std::basic_streambuf
+#include <string>     // for std::char_traits
+
+
+namespace ndnboost
+{
+namespace io
+{
+
+
+//  Basic stream state saver class declarations  -----------------------------//
+
+class ios_flags_saver
+{
+public:
+    typedef ::std::ios_base            state_type;
+    typedef ::std::ios_base::fmtflags  aspect_type;
+
+    explicit  ios_flags_saver( state_type &s )
+        : s_save_( s ), a_save_( s.flags() )
+        {}
+    ios_flags_saver( state_type &s, aspect_type const &a )
+        : s_save_( s ), a_save_( s.flags(a) )
+        {}
+    ~ios_flags_saver()
+        { this->restore(); }
+
+    void  restore()
+        { s_save_.flags( a_save_ ); }
+
+private:
+    state_type &       s_save_;
+    aspect_type const  a_save_;
+
+    ios_flags_saver& operator=(const ios_flags_saver&);
+};
+
+class ios_precision_saver
+{
+public:
+    typedef ::std::ios_base    state_type;
+    typedef ::std::streamsize  aspect_type;
+
+    explicit  ios_precision_saver( state_type &s )
+        : s_save_( s ), a_save_( s.precision() )
+        {}
+    ios_precision_saver( state_type &s, aspect_type const &a )
+        : s_save_( s ), a_save_( s.precision(a) )
+        {}
+    ~ios_precision_saver()
+        { this->restore(); }
+
+    void  restore()
+        { s_save_.precision( a_save_ ); }
+
+private:
+    state_type &       s_save_;
+    aspect_type const  a_save_;
+
+    ios_precision_saver& operator=(const ios_precision_saver&);
+};
+
+class ios_width_saver
+{
+public:
+    typedef ::std::ios_base    state_type;
+    typedef ::std::streamsize  aspect_type;
+
+    explicit  ios_width_saver( state_type &s )
+        : s_save_( s ), a_save_( s.width() )
+        {}
+    ios_width_saver( state_type &s, aspect_type const &a )
+        : s_save_( s ), a_save_( s.width(a) )
+        {}
+    ~ios_width_saver()
+        { this->restore(); }
+
+    void  restore()
+        { s_save_.width( a_save_ ); }
+
+private:
+    state_type &       s_save_;
+    aspect_type const  a_save_;
+    ios_width_saver& operator=(const ios_width_saver&);
+};
+
+
+//  Advanced stream state saver class template declarations  -----------------//
+
+template < typename Ch, class Tr >
+class basic_ios_iostate_saver
+{
+public:
+    typedef ::std::basic_ios<Ch, Tr>  state_type;
+    typedef ::std::ios_base::iostate  aspect_type;
+
+    explicit  basic_ios_iostate_saver( state_type &s )
+        : s_save_( s ), a_save_( s.rdstate() )
+        {}
+    basic_ios_iostate_saver( state_type &s, aspect_type const &a )
+        : s_save_( s ), a_save_( s.rdstate() )
+        { s.clear(a); }
+    ~basic_ios_iostate_saver()
+        { this->restore(); }
+
+    void  restore()
+        { s_save_.clear( a_save_ ); }
+
+private:
+    state_type &       s_save_;
+    aspect_type const  a_save_;
+    basic_ios_iostate_saver& operator=(const basic_ios_iostate_saver&);
+};
+
+template < typename Ch, class Tr >
+class basic_ios_exception_saver
+{
+public:
+    typedef ::std::basic_ios<Ch, Tr>  state_type;
+    typedef ::std::ios_base::iostate  aspect_type;
+
+    explicit  basic_ios_exception_saver( state_type &s )
+        : s_save_( s ), a_save_( s.exceptions() )
+        {}
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+    basic_ios_exception_saver( state_type &s, aspect_type a )
+#else
+    basic_ios_exception_saver( state_type &s, aspect_type const &a )
+#endif
+        : s_save_( s ), a_save_( s.exceptions() )
+        { s.exceptions(a); }
+    ~basic_ios_exception_saver()
+        { this->restore(); }
+
+    void  restore()
+        { s_save_.exceptions( a_save_ ); }
+
+private:
+    state_type &       s_save_;
+    aspect_type const  a_save_;
+    basic_ios_exception_saver& operator=(const basic_ios_exception_saver&);
+};
+
+template < typename Ch, class Tr >
+class basic_ios_tie_saver
+{
+public:
+    typedef ::std::basic_ios<Ch, Tr>        state_type;
+    typedef ::std::basic_ostream<Ch, Tr> *  aspect_type;
+
+    explicit  basic_ios_tie_saver( state_type &s )
+        : s_save_( s ), a_save_( s.tie() )
+        {}
+    basic_ios_tie_saver( state_type &s, aspect_type const &a )
+        : s_save_( s ), a_save_( s.tie(a) )
+        {}
+    ~basic_ios_tie_saver()
+        { this->restore(); }
+
+    void  restore()
+        { s_save_.tie( a_save_ ); }
+
+private:
+    state_type &       s_save_;
+    aspect_type const  a_save_;
+    basic_ios_tie_saver& operator=(const basic_ios_tie_saver&);
+};
+
+template < typename Ch, class Tr >
+class basic_ios_rdbuf_saver
+{
+public:
+    typedef ::std::basic_ios<Ch, Tr>          state_type;
+    typedef ::std::basic_streambuf<Ch, Tr> *  aspect_type;
+
+    explicit  basic_ios_rdbuf_saver( state_type &s )
+        : s_save_( s ), a_save_( s.rdbuf() )
+        {}
+    basic_ios_rdbuf_saver( state_type &s, aspect_type const &a )
+        : s_save_( s ), a_save_( s.rdbuf(a) )
+        {}
+    ~basic_ios_rdbuf_saver()
+        { this->restore(); }
+
+    void  restore()
+        { s_save_.rdbuf( a_save_ ); }
+
+private:
+    state_type &       s_save_;
+    aspect_type const  a_save_;
+    basic_ios_rdbuf_saver& operator=(const basic_ios_rdbuf_saver&);
+};
+
+template < typename Ch, class Tr >
+class basic_ios_fill_saver
+{
+public:
+    typedef ::std::basic_ios<Ch, Tr>        state_type;
+    typedef typename state_type::char_type  aspect_type;
+
+    explicit  basic_ios_fill_saver( state_type &s )
+        : s_save_( s ), a_save_( s.fill() )
+        {}
+    basic_ios_fill_saver( state_type &s, aspect_type const &a )
+        : s_save_( s ), a_save_( s.fill(a) )
+        {}
+    ~basic_ios_fill_saver()
+        { this->restore(); }
+
+    void  restore()
+        { s_save_.fill( a_save_ ); }
+
+private:
+    state_type &       s_save_;
+    aspect_type const  a_save_;
+    basic_ios_fill_saver& operator=(const basic_ios_fill_saver&);
+};
+
+#ifndef BOOST_NO_STD_LOCALE
+template < typename Ch, class Tr >
+class basic_ios_locale_saver
+{
+public:
+    typedef ::std::basic_ios<Ch, Tr> state_type;
+    typedef ::std::locale aspect_type;
+
+    explicit basic_ios_locale_saver( state_type &s )
+        : s_save_( s ), a_save_( s.getloc() )
+        {}
+    basic_ios_locale_saver( state_type &s, aspect_type const &a )
+        : s_save_( s ), a_save_( s.imbue(a) )
+        {}
+    ~basic_ios_locale_saver()
+        { this->restore(); }
+
+    void  restore()
+        { s_save_.imbue( a_save_ ); }
+
+private:
+    state_type &       s_save_;
+    aspect_type const  a_save_;
+    basic_ios_locale_saver& operator=(const basic_ios_locale_saver&);
+};
+#endif
+
+
+//  User-defined stream state saver class declarations  ----------------------//
+
+class ios_iword_saver
+{
+public:
+    typedef ::std::ios_base  state_type;
+    typedef int              index_type;
+    typedef long             aspect_type;
+
+    explicit ios_iword_saver( state_type &s, index_type i )
+        : s_save_( s ), a_save_( s.iword(i) ), i_save_( i )
+        {}
+    ios_iword_saver( state_type &s, index_type i, aspect_type const &a )
+        : s_save_( s ), a_save_( s.iword(i) ), i_save_( i )
+        { s.iword(i) = a; }
+    ~ios_iword_saver()
+        { this->restore(); }
+
+    void  restore()
+        { s_save_.iword( i_save_ ) = a_save_; }
+
+private:
+    state_type &       s_save_;
+    aspect_type const  a_save_;
+    index_type const   i_save_;
+
+    ios_iword_saver& operator=(const ios_iword_saver&);
+};
+
+class ios_pword_saver
+{
+public:
+    typedef ::std::ios_base  state_type;
+    typedef int              index_type;
+    typedef void *           aspect_type;
+
+    explicit  ios_pword_saver( state_type &s, index_type i )
+        : s_save_( s ), a_save_( s.pword(i) ), i_save_( i )
+        {}
+    ios_pword_saver( state_type &s, index_type i, aspect_type const &a )
+        : s_save_( s ), a_save_( s.pword(i) ), i_save_( i )
+        { s.pword(i) = a; }
+    ~ios_pword_saver()
+        { this->restore(); }
+
+    void  restore()
+        { s_save_.pword( i_save_ ) = a_save_; }
+
+private:
+    state_type &       s_save_;
+    aspect_type const  a_save_;
+    index_type const   i_save_;
+
+    ios_pword_saver operator=(const ios_pword_saver&);
+};
+
+
+//  Combined stream state saver class (template) declarations  ---------------//
+
+class ios_base_all_saver
+{
+public:
+    typedef ::std::ios_base  state_type;
+
+    explicit  ios_base_all_saver( state_type &s )
+        : s_save_( s ), a1_save_( s.flags() ), a2_save_( s.precision() )
+        , a3_save_( s.width() )
+        {}
+
+    ~ios_base_all_saver()
+        { this->restore(); }
+
+    void  restore()
+    {
+        s_save_.width( a3_save_ );
+        s_save_.precision( a2_save_ );
+        s_save_.flags( a1_save_ );
+    }
+
+private:
+    state_type &                s_save_;
+    state_type::fmtflags const  a1_save_;
+    ::std::streamsize const     a2_save_;
+    ::std::streamsize const     a3_save_;
+
+    ios_base_all_saver& operator=(const ios_base_all_saver&);
+};
+
+template < typename Ch, class Tr >
+class basic_ios_all_saver
+{
+public:
+    typedef ::std::basic_ios<Ch, Tr>  state_type;
+
+    explicit  basic_ios_all_saver( state_type &s )
+        : s_save_( s ), a1_save_( s.flags() ), a2_save_( s.precision() )
+        , a3_save_( s.width() ), a4_save_( s.rdstate() )
+        , a5_save_( s.exceptions() ), a6_save_( s.tie() )
+        , a7_save_( s.rdbuf() ), a8_save_( s.fill() )
+        #ifndef BOOST_NO_STD_LOCALE
+        , a9_save_( s.getloc() )
+        #endif
+        {}
+
+    ~basic_ios_all_saver()
+        { this->restore(); }
+
+    void  restore()
+    {
+        #ifndef BOOST_NO_STD_LOCALE
+        s_save_.imbue( a9_save_ );
+        #endif
+        s_save_.fill( a8_save_ );
+        s_save_.rdbuf( a7_save_ );
+        s_save_.tie( a6_save_ );
+        s_save_.exceptions( a5_save_ );
+        s_save_.clear( a4_save_ );
+        s_save_.width( a3_save_ );
+        s_save_.precision( a2_save_ );
+        s_save_.flags( a1_save_ );
+    }
+
+private:
+    state_type &                            s_save_;
+    typename state_type::fmtflags const     a1_save_;
+    ::std::streamsize const                 a2_save_;
+    ::std::streamsize const                 a3_save_;
+    typename state_type::iostate const      a4_save_;
+    typename state_type::iostate const      a5_save_;
+    ::std::basic_ostream<Ch, Tr> * const    a6_save_;
+    ::std::basic_streambuf<Ch, Tr> * const  a7_save_;
+    typename state_type::char_type const    a8_save_;
+    #ifndef BOOST_NO_STD_LOCALE
+    ::std::locale const                     a9_save_;
+    #endif
+
+    basic_ios_all_saver& operator=(const basic_ios_all_saver&);
+};
+
+class ios_all_word_saver
+{
+public:
+    typedef ::std::ios_base  state_type;
+    typedef int              index_type;
+
+    ios_all_word_saver( state_type &s, index_type i )
+        : s_save_( s ), i_save_( i ), a1_save_( s.iword(i) )
+        , a2_save_( s.pword(i) )
+        {}
+
+    ~ios_all_word_saver()
+        { this->restore(); }
+
+    void  restore()
+    {
+        s_save_.pword( i_save_ ) = a2_save_;
+        s_save_.iword( i_save_ ) = a1_save_;
+    }
+
+private:
+    state_type &      s_save_;
+    index_type const  i_save_;
+    long const        a1_save_;
+    void * const      a2_save_;
+
+    ios_all_word_saver& operator=(const ios_all_word_saver&);
+};
+
+
+}  // namespace io
+}  // namespace ndnboost
+
+
+#endif  // BOOST_IO_IOS_STATE_HPP
diff --git a/ndnboost/io_fwd.hpp b/ndnboost/io_fwd.hpp
new file mode 100644
index 0000000..c58e9e3
--- /dev/null
+++ b/ndnboost/io_fwd.hpp
@@ -0,0 +1,67 @@
+//  Boost io_fwd.hpp header file  --------------------------------------------//
+
+//  Copyright 2002 Daryle Walker.  Use, modification, and distribution are subject
+//  to the Boost Software License, Version 1.0.  (See accompanying file
+//  LICENSE_1_0.txt or a copy at <http://www.boost.org/LICENSE_1_0.txt>.)
+
+//  See <http://www.boost.org/libs/io/> for the library's home page.
+
+#ifndef BOOST_IO_FWD_HPP
+#define BOOST_IO_FWD_HPP
+
+#include <iosfwd>  // for std::char_traits (declaration)
+
+
+namespace ndnboost
+{
+namespace io
+{
+
+
+//  From <ndnboost/io/ios_state.hpp>  -------------------------------------------//
+
+class ios_flags_saver;
+class ios_precision_saver;
+class ios_width_saver;
+class ios_base_all_saver;
+
+template < typename Ch, class Tr = ::std::char_traits<Ch> >
+    class basic_ios_iostate_saver;
+template < typename Ch, class Tr = ::std::char_traits<Ch> >
+    class basic_ios_exception_saver;
+template < typename Ch, class Tr = ::std::char_traits<Ch> >
+    class basic_ios_tie_saver;
+template < typename Ch, class Tr = ::std::char_traits<Ch> >
+    class basic_ios_rdbuf_saver;
+template < typename Ch, class Tr = ::std::char_traits<Ch> >
+    class basic_ios_fill_saver;
+template < typename Ch, class Tr = ::std::char_traits<Ch> >
+    class basic_ios_locale_saver;
+template < typename Ch, class Tr = ::std::char_traits<Ch> >
+    class basic_ios_all_saver;
+
+typedef basic_ios_iostate_saver<char>        ios_iostate_saver;
+typedef basic_ios_iostate_saver<wchar_t>    wios_iostate_saver;
+typedef basic_ios_exception_saver<char>      ios_exception_saver;
+typedef basic_ios_exception_saver<wchar_t>  wios_exception_saver;
+typedef basic_ios_tie_saver<char>            ios_tie_saver;
+typedef basic_ios_tie_saver<wchar_t>        wios_tie_saver;
+typedef basic_ios_rdbuf_saver<char>          ios_rdbuf_saver;
+typedef basic_ios_rdbuf_saver<wchar_t>      wios_rdbuf_saver;
+typedef basic_ios_fill_saver<char>           ios_fill_saver;
+typedef basic_ios_fill_saver<wchar_t>       wios_fill_saver;
+typedef basic_ios_locale_saver<char>         ios_locale_saver;
+typedef basic_ios_locale_saver<wchar_t>     wios_locale_saver;
+typedef basic_ios_all_saver<char>            ios_all_saver;
+typedef basic_ios_all_saver<wchar_t>        wios_all_saver;
+
+class ios_iword_saver;
+class ios_pword_saver;
+class ios_all_word_saver;
+
+
+}  // namespace io
+}  // namespace ndnboost
+
+
+#endif  // BOOST_IO_FWD_HPP
diff --git a/ndnboost/is_placeholder.hpp b/ndnboost/is_placeholder.hpp
new file mode 100644
index 0000000..e358ca6
--- /dev/null
+++ b/ndnboost/is_placeholder.hpp
@@ -0,0 +1,31 @@
+#ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED
+#define BOOST_IS_PLACEHOLDER_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined( _MSC_VER ) && ( _MSC_VER >= 1020 )
+# pragma once
+#endif
+
+
+//  is_placeholder.hpp - TR1 is_placeholder metafunction
+//
+//  Copyright (c) 2006 Peter Dimov
+//
+//  Distributed under the Boost Software License, Version 1.0.
+//
+//  See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt
+
+
+namespace ndnboost
+{
+
+template< class T > struct is_placeholder
+{
+    enum _vt { value = 0 };
+};
+
+} // namespace ndnboost
+
+#endif // #ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED
diff --git a/ndnboost/iterator/detail/enable_if.hpp b/ndnboost/iterator/detail/enable_if.hpp
new file mode 100644
index 0000000..1b26330
--- /dev/null
+++ b/ndnboost/iterator/detail/enable_if.hpp
@@ -0,0 +1,86 @@
+// (C) Copyright David Abrahams 2002.
+// (C) Copyright Jeremy Siek    2002.
+// (C) Copyright Thomas Witt    2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_ENABLE_IF_23022003THW_HPP
+#define BOOST_ENABLE_IF_23022003THW_HPP
+
+#include <ndnboost/detail/workaround.hpp>
+#include <ndnboost/mpl/identity.hpp>
+
+#include <ndnboost/iterator/detail/config_def.hpp>
+
+//
+// Boost iterators uses its own enable_if cause we need
+// special semantics for deficient compilers.
+// 23/02/03 thw
+//
+
+namespace ndnboost
+{
+
+  namespace iterators
+  {
+    //
+    // Base machinery for all kinds of enable if
+    //
+    template<bool>
+    struct enabled
+    {
+      template<typename T>
+      struct base
+      {
+        typedef T type;
+      };
+    };
+    
+    //
+    // For compilers that don't support "Substitution Failure Is Not An Error"
+    // enable_if falls back to always enabled. See comments
+    // on operator implementation for consequences.
+    //
+    template<>
+    struct enabled<false>
+    {
+      template<typename T>
+      struct base
+      {
+#ifdef BOOST_NO_SFINAE
+
+        typedef T type;
+
+        // This way to do it would give a nice error message containing
+        // invalid overload, but has the big disadvantage that
+        // there is no reference to user code in the error message.
+        //
+        // struct invalid_overload;
+        // typedef invalid_overload type;
+        //
+#endif
+      };
+    };
+
+
+    template <class Cond,
+              class Return>
+    struct enable_if
+# if !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_IS_CONVERTIBLE)
+      : enabled<(Cond::value)>::template base<Return>
+# else
+      : mpl::identity<Return>
+# endif 
+    {
+# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+        typedef Return type;
+# endif 
+    };
+
+  } // namespace iterators
+
+} // namespace ndnboost
+
+#include <ndnboost/iterator/detail/config_undef.hpp>
+
+#endif // BOOST_ENABLE_IF_23022003THW_HPP
diff --git a/ndnboost/iterator/detail/facade_iterator_category.hpp b/ndnboost/iterator/detail/facade_iterator_category.hpp
new file mode 100644
index 0000000..fa21f5a
--- /dev/null
+++ b/ndnboost/iterator/detail/facade_iterator_category.hpp
@@ -0,0 +1,200 @@
+// Copyright David Abrahams 2003. Use, modification and distribution is
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef FACADE_ITERATOR_CATEGORY_DWA20031118_HPP
+# define FACADE_ITERATOR_CATEGORY_DWA20031118_HPP
+
+# include <ndnboost/iterator/iterator_categories.hpp>
+
+# include <ndnboost/mpl/or.hpp>  // used in iterator_tag inheritance logic
+# include <ndnboost/mpl/and.hpp>
+# include <ndnboost/mpl/if.hpp>
+# include <ndnboost/mpl/eval_if.hpp>
+# include <ndnboost/mpl/identity.hpp>
+# include <ndnboost/mpl/assert.hpp>
+
+# include <ndnboost/type_traits/is_same.hpp>
+# include <ndnboost/type_traits/is_const.hpp>
+# include <ndnboost/type_traits/is_reference.hpp>
+# include <ndnboost/type_traits/is_convertible.hpp>
+
+# include <ndnboost/type_traits/is_same.hpp>
+
+# include <ndnboost/iterator/detail/config_def.hpp> // try to keep this last
+
+# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
+#  include <ndnboost/detail/indirect_traits.hpp>
+# endif
+
+//
+// iterator_category deduction for iterator_facade
+//
+
+// forward declaration
+namespace ndnboost { struct use_default; }
+
+namespace ndnboost { namespace detail  {
+
+struct input_output_iterator_tag
+  : std::input_iterator_tag
+{
+    // Using inheritance for only input_iterator_tag helps to avoid
+    // ambiguities when a stdlib implementation dispatches on a
+    // function which is overloaded on both input_iterator_tag and
+    // output_iterator_tag, as STLPort does, in its __valid_range
+    // function.  I claim it's better to avoid the ambiguity in these
+    // cases.
+    operator std::output_iterator_tag() const
+    {
+        return std::output_iterator_tag();
+    }
+};
+
+//
+// True iff the user has explicitly disabled writability of this
+// iterator.  Pass the iterator_facade's Value parameter and its
+// nested ::reference type.
+//
+template <class ValueParam, class Reference>
+struct iterator_writability_disabled
+# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY // Adding Thomas' logic?
+  : mpl::or_<
+        is_const<Reference>
+      , ndnboost::detail::indirect_traits::is_reference_to_const<Reference>
+      , is_const<ValueParam>
+    >
+# else 
+  : is_const<ValueParam>
+# endif 
+{};
+
+
+//
+// Convert an iterator_facade's traversal category, Value parameter,
+// and ::reference type to an appropriate old-style category.
+//
+// If writability has been disabled per the above metafunction, the
+// result will not be convertible to output_iterator_tag.
+//
+// Otherwise, if Traversal == single_pass_traversal_tag, the following
+// conditions will result in a tag that is convertible both to
+// input_iterator_tag and output_iterator_tag:
+//
+//    1. Reference is a reference to non-const
+//    2. Reference is not a reference and is convertible to Value
+//
+template <class Traversal, class ValueParam, class Reference>
+struct iterator_facade_default_category
+  : mpl::eval_if<
+        mpl::and_<
+            is_reference<Reference>
+          , is_convertible<Traversal,forward_traversal_tag>
+        >
+      , mpl::eval_if<
+            is_convertible<Traversal,random_access_traversal_tag>
+          , mpl::identity<std::random_access_iterator_tag>
+          , mpl::if_<
+                is_convertible<Traversal,bidirectional_traversal_tag>
+              , std::bidirectional_iterator_tag
+              , std::forward_iterator_tag
+            >
+        >
+      , typename mpl::eval_if<
+            mpl::and_<
+                is_convertible<Traversal, single_pass_traversal_tag>
+                
+                // check for readability
+              , is_convertible<Reference, ValueParam>
+            >
+          , mpl::identity<std::input_iterator_tag>
+          , mpl::identity<Traversal>
+        >
+    >
+{
+};
+
+// True iff T is convertible to an old-style iterator category.
+template <class T>
+struct is_iterator_category
+  : mpl::or_<
+        is_convertible<T,std::input_iterator_tag>
+      , is_convertible<T,std::output_iterator_tag>
+    >
+{
+};
+
+template <class T>
+struct is_iterator_traversal
+  : is_convertible<T,incrementable_traversal_tag>
+{};
+
+//
+// A composite iterator_category tag convertible to Category (a pure
+// old-style category) and Traversal (a pure traversal tag).
+// Traversal must be a strict increase of the traversal power given by
+// Category.
+//
+template <class Category, class Traversal>
+struct iterator_category_with_traversal
+  : Category, Traversal
+{
+# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+    // Make sure this isn't used to build any categories where
+    // convertibility to Traversal is redundant.  Should just use the
+    // Category element in that case.
+    BOOST_MPL_ASSERT_NOT((
+        is_convertible<
+              typename iterator_category_to_traversal<Category>::type
+            , Traversal
+          >));
+
+    BOOST_MPL_ASSERT((is_iterator_category<Category>));
+    BOOST_MPL_ASSERT_NOT((is_iterator_category<Traversal>));
+    BOOST_MPL_ASSERT_NOT((is_iterator_traversal<Category>));
+#  if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+    BOOST_MPL_ASSERT((is_iterator_traversal<Traversal>));
+#  endif 
+# endif 
+};
+
+// Computes an iterator_category tag whose traversal is Traversal and
+// which is appropriate for an iterator
+template <class Traversal, class ValueParam, class Reference>
+struct facade_iterator_category_impl
+{
+# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+    BOOST_MPL_ASSERT_NOT((is_iterator_category<Traversal>));
+# endif 
+    
+    typedef typename iterator_facade_default_category<
+        Traversal,ValueParam,Reference
+    >::type category;
+    
+    typedef typename mpl::if_<
+        is_same<
+            Traversal
+          , typename iterator_category_to_traversal<category>::type
+        >
+      , category
+      , iterator_category_with_traversal<category,Traversal>
+    >::type type;
+};
+
+//
+// Compute an iterator_category for iterator_facade
+//
+template <class CategoryOrTraversal, class ValueParam, class Reference>
+struct facade_iterator_category
+  : mpl::eval_if<
+        is_iterator_category<CategoryOrTraversal>
+      , mpl::identity<CategoryOrTraversal> // old-style categories are fine as-is
+      , facade_iterator_category_impl<CategoryOrTraversal,ValueParam,Reference>
+    >
+{
+};
+
+}} // namespace ndnboost::detail
+
+# include <ndnboost/iterator/detail/config_undef.hpp>
+
+#endif // FACADE_ITERATOR_CATEGORY_DWA20031118_HPP
diff --git a/ndnboost/iterator/interoperable.hpp b/ndnboost/iterator/interoperable.hpp
new file mode 100644
index 0000000..daede1c
--- /dev/null
+++ b/ndnboost/iterator/interoperable.hpp
@@ -0,0 +1,50 @@
+// (C) Copyright David Abrahams 2002.
+// (C) Copyright Jeremy Siek    2002.
+// (C) Copyright Thomas Witt    2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_INTEROPERABLE_23022003THW_HPP
+# define BOOST_INTEROPERABLE_23022003THW_HPP
+
+# include <ndnboost/mpl/bool.hpp>
+# include <ndnboost/mpl/or.hpp>
+
+# include <ndnboost/type_traits/is_convertible.hpp>
+
+# include <ndnboost/iterator/detail/config_def.hpp> // must appear last
+
+namespace ndnboost
+{
+
+  //
+  // Meta function that determines whether two
+  // iterator types are considered interoperable.
+  //
+  // Two iterator types A,B are considered interoperable if either
+  // A is convertible to B or vice versa.
+  // This interoperability definition is in sync with the
+  // standards requirements on constant/mutable container
+  // iterators (23.1 [lib.container.requirements]).
+  //
+  // For compilers that don't support is_convertible 
+  // is_interoperable gives false positives. See comments
+  // on operator implementation for consequences.
+  //
+  template <typename A, typename B>
+  struct is_interoperable
+# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
+    : mpl::true_
+# else
+    : mpl::or_<
+          is_convertible< A, B >
+        , is_convertible< B, A > >
+# endif
+  { 
+  };
+
+} // namespace ndnboost
+
+# include <ndnboost/iterator/detail/config_undef.hpp>
+
+#endif // BOOST_INTEROPERABLE_23022003THW_HPP
diff --git a/ndnboost/iterator/iterator_adaptor.hpp b/ndnboost/iterator/iterator_adaptor.hpp
new file mode 100644
index 0000000..59aafbf
--- /dev/null
+++ b/ndnboost/iterator/iterator_adaptor.hpp
@@ -0,0 +1,365 @@
+// (C) Copyright David Abrahams 2002.
+// (C) Copyright Jeremy Siek    2002.
+// (C) Copyright Thomas Witt    2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_ITERATOR_ADAPTOR_23022003THW_HPP
+#define BOOST_ITERATOR_ADAPTOR_23022003THW_HPP
+
+#include <ndnboost/static_assert.hpp>
+#include <ndnboost/iterator.hpp>
+#include <ndnboost/detail/iterator.hpp>
+
+#include <ndnboost/iterator/iterator_categories.hpp>
+#include <ndnboost/iterator/iterator_facade.hpp>
+#include <ndnboost/iterator/detail/enable_if.hpp>
+
+#include <ndnboost/mpl/and.hpp>
+#include <ndnboost/mpl/not.hpp>
+#include <ndnboost/mpl/or.hpp>
+
+#include <ndnboost/type_traits/is_same.hpp>
+#include <ndnboost/type_traits/is_convertible.hpp>
+
+#ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
+# include <ndnboost/type_traits/remove_reference.hpp>
+#endif
+
+#include <ndnboost/type_traits/add_reference.hpp>
+#include <ndnboost/iterator/detail/config_def.hpp>
+
+#include <ndnboost/iterator/iterator_traits.hpp>
+
+namespace ndnboost
+{
+  // Used as a default template argument internally, merely to
+  // indicate "use the default", this can also be passed by users
+  // explicitly in order to specify that the default should be used.
+  struct use_default;
+  
+# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+  // the incompleteness of use_default causes massive problems for
+  // is_convertible (naturally).  This workaround is fortunately not
+  // needed for vc6/vc7.
+  template<class To>
+  struct is_convertible<use_default,To>
+    : mpl::false_ {};
+# endif 
+  
+  namespace detail
+  {
+
+    // 
+    // Result type used in enable_if_convertible meta function.
+    // This can be an incomplete type, as only pointers to 
+    // enable_if_convertible< ... >::type are used.
+    // We could have used void for this, but conversion to
+    // void* is just to easy.
+    //
+    struct enable_type;
+  }
+
+
+  //
+  // enable_if for use in adapted iterators constructors.
+  //
+  // In order to provide interoperability between adapted constant and
+  // mutable iterators, adapted iterators will usually provide templated
+  // conversion constructors of the following form
+  //
+  // template <class BaseIterator>
+  // class adapted_iterator :
+  //   public iterator_adaptor< adapted_iterator<Iterator>, Iterator >
+  // {
+  // public:
+  //   
+  //   ...
+  //
+  //   template <class OtherIterator>
+  //   adapted_iterator(
+  //       OtherIterator const& it
+  //     , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0);
+  //
+  //   ...
+  // };
+  //
+  // enable_if_convertible is used to remove those overloads from the overload
+  // set that cannot be instantiated. For all practical purposes only overloads
+  // for constant/mutable interaction will remain. This has the advantage that
+  // meta functions like ndnboost::is_convertible do not return false positives,
+  // as they can only look at the signature of the conversion constructor
+  // and not at the actual instantiation.
+  //
+  // enable_if_interoperable can be safely used in user code. It falls back to
+  // always enabled for compilers that don't support enable_if or is_convertible. 
+  // There is no need for compiler specific workarounds in user code. 
+  //
+  // The operators implementation relies on ndnboost::is_convertible not returning
+  // false positives for user/library defined iterator types. See comments
+  // on operator implementation for consequences.
+  //
+#  if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+  
+  template<typename From, typename To>
+  struct enable_if_convertible
+  {
+     typedef typename mpl::if_<
+         mpl::or_<
+             is_same<From,To>
+           , is_convertible<From, To>
+         >
+      , ndnboost::detail::enable_type
+      , int&
+     >::type type;
+  };
+  
+#  elif defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_SFINAE)
+  
+  template <class From, class To>
+  struct enable_if_convertible
+  {
+      typedef ndnboost::detail::enable_type type;
+  };
+  
+#  elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292)) && BOOST_MSVC > 1300
+  
+  // For some reason vc7.1 needs us to "cut off" instantiation
+  // of is_convertible in a few cases.
+  template<typename From, typename To>
+  struct enable_if_convertible
+    : iterators::enable_if<
+        mpl::or_<
+            is_same<From,To>
+          , is_convertible<From, To>
+        >
+      , ndnboost::detail::enable_type
+    >
+  {};
+  
+#  else 
+  
+  template<typename From, typename To>
+  struct enable_if_convertible
+    : iterators::enable_if<
+          is_convertible<From, To>
+        , ndnboost::detail::enable_type
+      >
+  {};
+      
+# endif
+  
+  //
+  // Default template argument handling for iterator_adaptor
+  //
+  namespace detail
+  {
+    // If T is use_default, return the result of invoking
+    // DefaultNullaryFn, otherwise return T.
+    template <class T, class DefaultNullaryFn>
+    struct ia_dflt_help
+      : mpl::eval_if<
+            is_same<T, use_default>
+          , DefaultNullaryFn
+          , mpl::identity<T>
+        >
+    {
+    };
+
+    // A metafunction which computes an iterator_adaptor's base class,
+    // a specialization of iterator_facade.
+    template <
+        class Derived
+      , class Base
+      , class Value
+      , class Traversal
+      , class Reference
+      , class Difference
+    >
+    struct iterator_adaptor_base
+    {
+        typedef iterator_facade<
+            Derived
+            
+# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
+          , typename ndnboost::detail::ia_dflt_help<
+                Value
+              , mpl::eval_if<
+                    is_same<Reference,use_default>
+                  , iterator_value<Base>
+                  , remove_reference<Reference>
+                >
+            >::type
+# else
+          , typename ndnboost::detail::ia_dflt_help<
+                Value, iterator_value<Base>
+            >::type
+# endif
+            
+          , typename ndnboost::detail::ia_dflt_help<
+                Traversal
+              , iterator_traversal<Base>
+            >::type
+
+          , typename ndnboost::detail::ia_dflt_help<
+                Reference
+              , mpl::eval_if<
+                    is_same<Value,use_default>
+                  , iterator_reference<Base>
+                  , add_reference<Value>
+                >
+            >::type
+
+          , typename ndnboost::detail::ia_dflt_help<
+                Difference, iterator_difference<Base>
+            >::type
+        >
+        type;
+    };
+  
+    // workaround for aC++ CR JAGaf33512
+    template <class Tr1, class Tr2>
+    inline void iterator_adaptor_assert_traversal ()
+    {
+      BOOST_STATIC_ASSERT((is_convertible<Tr1, Tr2>::value));
+    }
+  }
+  
+  //
+  // Iterator Adaptor
+  //
+  // The parameter ordering changed slightly with respect to former
+  // versions of iterator_adaptor The idea is that when the user needs
+  // to fiddle with the reference type it is highly likely that the
+  // iterator category has to be adjusted as well.  Any of the
+  // following four template arguments may be ommitted or explicitly
+  // replaced by use_default.
+  //
+  //   Value - if supplied, the value_type of the resulting iterator, unless
+  //      const. If const, a conforming compiler strips constness for the
+  //      value_type. If not supplied, iterator_traits<Base>::value_type is used
+  //
+  //   Category - the traversal category of the resulting iterator. If not
+  //      supplied, iterator_traversal<Base>::type is used.
+  //
+  //   Reference - the reference type of the resulting iterator, and in
+  //      particular, the result type of operator*(). If not supplied but
+  //      Value is supplied, Value& is used. Otherwise
+  //      iterator_traits<Base>::reference is used.
+  //
+  //   Difference - the difference_type of the resulting iterator. If not
+  //      supplied, iterator_traits<Base>::difference_type is used.
+  //
+  template <
+      class Derived
+    , class Base
+    , class Value        = use_default
+    , class Traversal    = use_default
+    , class Reference    = use_default
+    , class Difference   = use_default
+  >
+  class iterator_adaptor
+    : public ndnboost::detail::iterator_adaptor_base<
+        Derived, Base, Value, Traversal, Reference, Difference
+      >::type
+  {
+      friend class iterator_core_access;
+
+   protected:
+      typedef typename ndnboost::detail::iterator_adaptor_base<
+          Derived, Base, Value, Traversal, Reference, Difference
+      >::type super_t;
+   public:
+      iterator_adaptor() {}
+
+      explicit iterator_adaptor(Base const &iter)
+          : m_iterator(iter)
+      {
+      }
+
+      typedef Base base_type;
+
+      Base const& base() const
+        { return m_iterator; }
+
+   protected:
+      // for convenience in derived classes
+      typedef iterator_adaptor<Derived,Base,Value,Traversal,Reference,Difference> iterator_adaptor_;
+      
+      //
+      // lvalue access to the Base object for Derived
+      //
+      Base const& base_reference() const
+        { return m_iterator; }
+
+      Base& base_reference()
+        { return m_iterator; }
+
+   private:
+      //
+      // Core iterator interface for iterator_facade.  This is private
+      // to prevent temptation for Derived classes to use it, which
+      // will often result in an error.  Derived classes should use
+      // base_reference(), above, to get direct access to m_iterator.
+      // 
+      typename super_t::reference dereference() const
+        { return *m_iterator; }
+
+      template <
+      class OtherDerived, class OtherIterator, class V, class C, class R, class D
+      >   
+      bool equal(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& x) const
+      {
+        // Maybe readd with same_distance
+        //           BOOST_STATIC_ASSERT(
+        //               (detail::same_category_and_difference<Derived,OtherDerived>::value)
+        //               );
+          return m_iterator == x.base();
+      }
+
+      typedef typename iterator_category_to_traversal<
+          typename super_t::iterator_category
+      >::type my_traversal;
+
+# define BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(cat) \
+      ndnboost::detail::iterator_adaptor_assert_traversal<my_traversal, cat>();
+
+      void advance(typename super_t::difference_type n)
+      {
+          BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag)
+          m_iterator += n;
+      }
+  
+      void increment() { ++m_iterator; }
+
+      void decrement() 
+      {
+          BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(bidirectional_traversal_tag)
+           --m_iterator;
+      }
+
+      template <
+          class OtherDerived, class OtherIterator, class V, class C, class R, class D
+      >   
+      typename super_t::difference_type distance_to(
+          iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& y) const
+      {
+          BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag)
+          // Maybe readd with same_distance
+          //           BOOST_STATIC_ASSERT(
+          //               (detail::same_category_and_difference<Derived,OtherDerived>::value)
+          //               );
+          return y.base() - m_iterator;
+      }
+
+# undef BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL
+      
+   private: // data members
+      Base m_iterator;
+  };
+
+} // namespace ndnboost
+
+#include <ndnboost/iterator/detail/config_undef.hpp>
+
+#endif // BOOST_ITERATOR_ADAPTOR_23022003THW_HPP
diff --git a/ndnboost/iterator/iterator_concepts.hpp b/ndnboost/iterator/iterator_concepts.hpp
new file mode 100644
index 0000000..5826135
--- /dev/null
+++ b/ndnboost/iterator/iterator_concepts.hpp
@@ -0,0 +1,284 @@
+// (C) Copyright Jeremy Siek 2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_ITERATOR_CONCEPTS_HPP
+#define BOOST_ITERATOR_CONCEPTS_HPP
+
+#include <ndnboost/concept_check.hpp>
+#include <ndnboost/iterator/iterator_categories.hpp>
+
+// Use ndnboost::detail::iterator_traits to work around some MSVC/Dinkumware problems.
+#include <ndnboost/detail/iterator.hpp>
+
+#include <ndnboost/type_traits/is_same.hpp>
+#include <ndnboost/type_traits/is_integral.hpp>
+
+#include <ndnboost/mpl/bool.hpp>
+#include <ndnboost/mpl/if.hpp>
+#include <ndnboost/mpl/and.hpp>
+#include <ndnboost/mpl/or.hpp>
+
+#include <ndnboost/static_assert.hpp>
+
+// Use boost/limits to work around missing limits headers on some compilers
+#include <ndnboost/limits.hpp>
+#include <ndnboost/config.hpp>
+
+#include <algorithm>
+
+#include <ndnboost/concept/detail/concept_def.hpp>
+
+namespace ndnboost_concepts
+{
+  // Used a different namespace here (instead of "boost") so that the
+  // concept descriptions do not take for granted the names in
+  // namespace ndnboost.
+
+  //===========================================================================
+  // Iterator Access Concepts
+
+  BOOST_concept(ReadableIterator,(Iterator))
+    : ndnboost::Assignable<Iterator>
+    , ndnboost::CopyConstructible<Iterator>
+
+  {
+      typedef BOOST_DEDUCED_TYPENAME ndnboost::detail::iterator_traits<Iterator>::value_type value_type;
+      typedef BOOST_DEDUCED_TYPENAME ndnboost::detail::iterator_traits<Iterator>::reference reference;
+
+      BOOST_CONCEPT_USAGE(ReadableIterator)
+      {
+
+          value_type v = *i;
+          ndnboost::ignore_unused_variable_warning(v);
+      }
+  private:
+      Iterator i;
+  };
+  
+  template <
+      typename Iterator
+    , typename ValueType = BOOST_DEDUCED_TYPENAME ndnboost::detail::iterator_traits<Iterator>::value_type
+  >
+  struct WritableIterator
+    : ndnboost::CopyConstructible<Iterator>
+  {
+      BOOST_CONCEPT_USAGE(WritableIterator)
+      {
+          *i = v;
+      }
+  private:
+      ValueType v;
+      Iterator i;
+  };
+
+  template <
+      typename Iterator
+    , typename ValueType = BOOST_DEDUCED_TYPENAME ndnboost::detail::iterator_traits<Iterator>::value_type
+  >
+  struct WritableIteratorConcept : WritableIterator<Iterator,ValueType> {};
+  
+  BOOST_concept(SwappableIterator,(Iterator))
+  {
+      BOOST_CONCEPT_USAGE(SwappableIterator)
+      {
+          std::iter_swap(i1, i2);
+      }
+  private:
+      Iterator i1;
+      Iterator i2;
+  };
+
+  BOOST_concept(LvalueIterator,(Iterator))
+  {
+      typedef typename ndnboost::detail::iterator_traits<Iterator>::value_type value_type;
+      
+      BOOST_CONCEPT_USAGE(LvalueIterator)
+      {
+        value_type& r = const_cast<value_type&>(*i);
+        ndnboost::ignore_unused_variable_warning(r);
+      }
+  private:
+      Iterator i;
+  };
+
+  
+  //===========================================================================
+  // Iterator Traversal Concepts
+
+  BOOST_concept(IncrementableIterator,(Iterator))
+    : ndnboost::Assignable<Iterator>
+    , ndnboost::CopyConstructible<Iterator>
+  {
+      typedef typename ndnboost::iterator_traversal<Iterator>::type traversal_category;
+
+      BOOST_CONCEPT_ASSERT((
+        ndnboost::Convertible<
+            traversal_category
+          , ndnboost::incrementable_traversal_tag
+        >));
+
+      BOOST_CONCEPT_USAGE(IncrementableIterator)
+      {
+          ++i;
+          (void)i++;
+      }
+  private:
+      Iterator i;
+  };
+
+  BOOST_concept(SinglePassIterator,(Iterator))
+    : IncrementableIterator<Iterator>
+    , ndnboost::EqualityComparable<Iterator>
+
+  {
+      BOOST_CONCEPT_ASSERT((
+          ndnboost::Convertible<
+             BOOST_DEDUCED_TYPENAME SinglePassIterator::traversal_category
+           , ndnboost::single_pass_traversal_tag
+          > ));
+  };
+
+  BOOST_concept(ForwardTraversal,(Iterator))
+    : SinglePassIterator<Iterator>
+    , ndnboost::DefaultConstructible<Iterator>
+  {
+      typedef typename ndnboost::detail::iterator_traits<Iterator>::difference_type difference_type;
+      
+      BOOST_MPL_ASSERT((ndnboost::is_integral<difference_type>));
+      BOOST_MPL_ASSERT_RELATION(std::numeric_limits<difference_type>::is_signed, ==, true);
+
+      BOOST_CONCEPT_ASSERT((
+          ndnboost::Convertible<
+             BOOST_DEDUCED_TYPENAME ForwardTraversal::traversal_category
+           , ndnboost::forward_traversal_tag
+          > ));
+  };
+  
+  BOOST_concept(BidirectionalTraversal,(Iterator))
+    : ForwardTraversal<Iterator>
+  {
+      BOOST_CONCEPT_ASSERT((
+          ndnboost::Convertible<
+             BOOST_DEDUCED_TYPENAME BidirectionalTraversal::traversal_category
+           , ndnboost::bidirectional_traversal_tag
+          > ));
+
+      BOOST_CONCEPT_USAGE(BidirectionalTraversal)
+      {
+          --i;
+          (void)i--;
+      }
+   private:
+      Iterator i;
+  };
+
+  BOOST_concept(RandomAccessTraversal,(Iterator))
+    : BidirectionalTraversal<Iterator>
+  {
+      BOOST_CONCEPT_ASSERT((
+          ndnboost::Convertible<
+             BOOST_DEDUCED_TYPENAME RandomAccessTraversal::traversal_category
+           , ndnboost::random_access_traversal_tag
+          > ));
+
+      BOOST_CONCEPT_USAGE(RandomAccessTraversal)
+      {
+          i += n;
+          i = i + n;
+          i = n + i;
+          i -= n;
+          i = i - n;
+          n = i - j;
+      }
+      
+   private:
+      typename BidirectionalTraversal<Iterator>::difference_type n;
+      Iterator i, j;
+  };
+
+  //===========================================================================
+  // Iterator Interoperability 
+
+  namespace detail
+  {
+    template <typename Iterator1, typename Iterator2>
+    void interop_single_pass_constraints(Iterator1 const& i1, Iterator2 const& i2)
+    {
+        bool b;
+        b = i1 == i2;
+        b = i1 != i2;
+
+        b = i2 == i1;
+        b = i2 != i1;
+        ndnboost::ignore_unused_variable_warning(b);
+    }
+
+    template <typename Iterator1, typename Iterator2>
+    void interop_rand_access_constraints(
+        Iterator1 const& i1, Iterator2 const& i2,
+        ndnboost::random_access_traversal_tag, ndnboost::random_access_traversal_tag)
+    {
+        bool b;
+        typename ndnboost::detail::iterator_traits<Iterator2>::difference_type n;
+        b = i1 <  i2;
+        b = i1 <= i2;
+        b = i1 >  i2;
+        b = i1 >= i2;
+        n = i1 -  i2;
+
+        b = i2 <  i1;
+        b = i2 <= i1;
+        b = i2 >  i1;
+        b = i2 >= i1;
+        n = i2 -  i1;
+        ndnboost::ignore_unused_variable_warning(b);
+        ndnboost::ignore_unused_variable_warning(n);
+    }
+
+    template <typename Iterator1, typename Iterator2>
+    void interop_rand_access_constraints(
+        Iterator1 const&, Iterator2 const&,
+        ndnboost::single_pass_traversal_tag, ndnboost::single_pass_traversal_tag)
+    { }
+
+  } // namespace detail
+
+  BOOST_concept(InteroperableIterator,(Iterator)(ConstIterator))
+  {
+   private:
+      typedef typename ndnboost::detail::pure_traversal_tag<
+          typename ndnboost::iterator_traversal<
+              Iterator
+          >::type
+      >::type traversal_category;
+
+      typedef typename ndnboost::detail::pure_traversal_tag<
+          typename ndnboost::iterator_traversal<
+              ConstIterator
+          >::type
+      >::type const_traversal_category;
+      
+  public:
+      BOOST_CONCEPT_ASSERT((SinglePassIterator<Iterator>));
+      BOOST_CONCEPT_ASSERT((SinglePassIterator<ConstIterator>));
+
+      BOOST_CONCEPT_USAGE(InteroperableIterator)
+      {
+          detail::interop_single_pass_constraints(i, ci);
+          detail::interop_rand_access_constraints(i, ci, traversal_category(), const_traversal_category());
+
+          ci = i;
+      }
+      
+   private:
+      Iterator      i;
+      ConstIterator ci;
+  };
+
+} // namespace ndnboost_concepts
+
+#include <ndnboost/concept/detail/concept_undef.hpp>
+
+#endif // BOOST_ITERATOR_CONCEPTS_HPP
diff --git a/ndnboost/iterator/iterator_facade.hpp b/ndnboost/iterator/iterator_facade.hpp
new file mode 100644
index 0000000..c61f3ad
--- /dev/null
+++ b/ndnboost/iterator/iterator_facade.hpp
@@ -0,0 +1,874 @@
+// (C) Copyright David Abrahams 2002.
+// (C) Copyright Jeremy Siek    2002.
+// (C) Copyright Thomas Witt    2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_ITERATOR_FACADE_23022003THW_HPP
+#define BOOST_ITERATOR_FACADE_23022003THW_HPP
+
+#include <ndnboost/iterator.hpp>
+#include <ndnboost/iterator/interoperable.hpp>
+#include <ndnboost/iterator/iterator_traits.hpp>
+
+#include <ndnboost/iterator/detail/facade_iterator_category.hpp>
+#include <ndnboost/iterator/detail/enable_if.hpp>
+
+#include <ndnboost/static_assert.hpp>
+#include <ndnboost/utility/addressof.hpp>
+
+#include <ndnboost/type_traits/is_same.hpp>
+#include <ndnboost/type_traits/add_const.hpp>
+#include <ndnboost/type_traits/add_pointer.hpp>
+#include <ndnboost/type_traits/remove_const.hpp>
+#include <ndnboost/type_traits/remove_reference.hpp>
+#include <ndnboost/type_traits/is_convertible.hpp>
+#include <ndnboost/type_traits/is_pod.hpp>
+
+#include <ndnboost/mpl/eval_if.hpp>
+#include <ndnboost/mpl/if.hpp>
+#include <ndnboost/mpl/or.hpp>
+#include <ndnboost/mpl/and.hpp>
+#include <ndnboost/mpl/not.hpp>
+#include <ndnboost/mpl/always.hpp>
+#include <ndnboost/mpl/apply.hpp>
+#include <ndnboost/mpl/identity.hpp>
+
+#include <ndnboost/iterator/detail/config_def.hpp> // this goes last
+
+namespace ndnboost
+{
+  // This forward declaration is required for the friend declaration
+  // in iterator_core_access
+  template <class I, class V, class TC, class R, class D> class iterator_facade;
+
+  namespace detail
+  {
+    // A binary metafunction class that always returns bool.  VC6
+    // ICEs on mpl::always<bool>, probably because of the default
+    // parameters.
+    struct always_bool2
+    {
+        template <class T, class U>
+        struct apply
+        {
+            typedef bool type;
+        };
+    };
+
+    //
+    // enable if for use in operator implementation.
+    //
+    template <
+        class Facade1
+      , class Facade2
+      , class Return
+    >
+    struct enable_if_interoperable
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+    {
+        typedef typename mpl::if_<
+            mpl::or_<
+                is_convertible<Facade1, Facade2>
+              , is_convertible<Facade2, Facade1>
+            >
+          , Return
+          , int[3]
+        >::type type;
+    };        
+#else
+      : ::ndnboost::iterators::enable_if<
+           mpl::or_<
+               is_convertible<Facade1, Facade2>
+             , is_convertible<Facade2, Facade1>
+           >
+         , Return
+        >
+    {};
+#endif 
+
+    //
+    // Generates associated types for an iterator_facade with the
+    // given parameters.
+    //
+    template <
+        class ValueParam
+      , class CategoryOrTraversal
+      , class Reference 
+      , class Difference
+    >
+    struct iterator_facade_types
+    {
+        typedef typename facade_iterator_category<
+            CategoryOrTraversal, ValueParam, Reference
+        >::type iterator_category;
+        
+        typedef typename remove_const<ValueParam>::type value_type;
+        
+        // Not the real associated pointer type
+        typedef typename mpl::eval_if<
+            ndnboost::detail::iterator_writability_disabled<ValueParam,Reference>
+          , add_pointer<const value_type>
+          , add_pointer<value_type>
+        >::type pointer;
+      
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)                          \
+    && (BOOST_WORKAROUND(_STLPORT_VERSION, BOOST_TESTED_AT(0x452))              \
+        || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, BOOST_TESTED_AT(310)))     \
+    || BOOST_WORKAROUND(BOOST_RWSTD_VER, BOOST_TESTED_AT(0x20101))              \
+    || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, <= 310)
+
+        // To interoperate with some broken library/compiler
+        // combinations, user-defined iterators must be derived from
+        // std::iterator.  It is possible to implement a standard
+        // library for broken compilers without this limitation.
+#  define BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE 1
+
+        typedef
+           iterator<iterator_category, value_type, Difference, pointer, Reference>
+        base;
+# endif
+    };
+
+    // iterators whose dereference operators reference the same value
+    // for all iterators into the same sequence (like many input
+    // iterators) need help with their postfix ++: the referenced
+    // value must be read and stored away before the increment occurs
+    // so that *a++ yields the originally referenced element and not
+    // the next one.
+    template <class Iterator>
+    class postfix_increment_proxy
+    {
+        typedef typename iterator_value<Iterator>::type value_type;
+     public:
+        explicit postfix_increment_proxy(Iterator const& x)
+          : stored_value(*x)
+        {}
+
+        // Returning a mutable reference allows nonsense like
+        // (*r++).mutate(), but it imposes fewer assumptions about the
+        // behavior of the value_type.  In particular, recall that
+        // (*r).mutate() is legal if operator* returns by value.
+        value_type&
+        operator*() const
+        {
+            return this->stored_value;
+        }
+     private:
+        mutable value_type stored_value;
+    };
+    
+    //
+    // In general, we can't determine that such an iterator isn't
+    // writable -- we also need to store a copy of the old iterator so
+    // that it can be written into.
+    template <class Iterator>
+    class writable_postfix_increment_proxy
+    {
+        typedef typename iterator_value<Iterator>::type value_type;
+     public:
+        explicit writable_postfix_increment_proxy(Iterator const& x)
+          : stored_value(*x)
+          , stored_iterator(x)
+        {}
+
+        // Dereferencing must return a proxy so that both *r++ = o and
+        // value_type(*r++) can work.  In this case, *r is the same as
+        // *r++, and the conversion operator below is used to ensure
+        // readability.
+        writable_postfix_increment_proxy const&
+        operator*() const
+        {
+            return *this;
+        }
+
+        // Provides readability of *r++
+        operator value_type&() const
+        {
+            return stored_value;
+        }
+
+        // Provides writability of *r++
+        template <class T>
+        T const& operator=(T const& x) const
+        {
+            *this->stored_iterator = x;
+            return x;
+        }
+
+        // This overload just in case only non-const objects are writable
+        template <class T>
+        T& operator=(T& x) const
+        {
+            *this->stored_iterator = x;
+            return x;
+        }
+
+        // Provides X(r++)
+        operator Iterator const&() const
+        {
+            return stored_iterator;
+        }
+        
+     private:
+        mutable value_type stored_value;
+        Iterator stored_iterator;
+    };
+
+# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+    template <class Reference, class Value>
+    struct is_non_proxy_reference_impl
+    {
+        static Reference r;
+        
+        template <class R>
+        static typename mpl::if_<
+            is_convertible<
+                R const volatile*
+              , Value const volatile*
+            >
+          , char[1]
+          , char[2]
+        >::type& helper(R const&);
+        
+        BOOST_STATIC_CONSTANT(bool, value = sizeof(helper(r)) == 1);
+    };
+        
+    template <class Reference, class Value>
+    struct is_non_proxy_reference
+      : mpl::bool_<
+            is_non_proxy_reference_impl<Reference, Value>::value
+        >
+    {};
+# else 
+    template <class Reference, class Value>
+    struct is_non_proxy_reference
+      : is_convertible<
+            typename remove_reference<Reference>::type
+            const volatile*
+          , Value const volatile*
+        >
+    {};
+# endif 
+        
+    // A metafunction to choose the result type of postfix ++
+    //
+    // Because the C++98 input iterator requirements say that *r++ has
+    // type T (value_type), implementations of some standard
+    // algorithms like lexicographical_compare may use constructions
+    // like:
+    //
+    //          *r++ < *s++
+    //
+    // If *r++ returns a proxy (as required if r is writable but not
+    // multipass), this sort of expression will fail unless the proxy
+    // supports the operator<.  Since there are any number of such
+    // operations, we're not going to try to support them.  Therefore,
+    // even if r++ returns a proxy, *r++ will only return a proxy if
+    // *r also returns a proxy.
+    template <class Iterator, class Value, class Reference, class CategoryOrTraversal>
+    struct postfix_increment_result
+      : mpl::eval_if<
+            mpl::and_<
+                // A proxy is only needed for readable iterators
+                is_convertible<Reference,Value const&>
+                
+                // No multipass iterator can have values that disappear
+                // before positions can be re-visited
+              , mpl::not_<
+                    is_convertible<
+                        typename iterator_category_to_traversal<CategoryOrTraversal>::type
+                      , forward_traversal_tag
+                    >
+                >
+            >
+          , mpl::if_<
+                is_non_proxy_reference<Reference,Value>
+              , postfix_increment_proxy<Iterator>
+              , writable_postfix_increment_proxy<Iterator>
+            >
+          , mpl::identity<Iterator>
+        >
+    {};
+
+    // operator->() needs special support for input iterators to strictly meet the
+    // standard's requirements. If *i is not a reference type, we must still
+    // produce an lvalue to which a pointer can be formed.  We do that by
+    // returning a proxy object containing an instance of the reference object.
+    template <class Reference, class Pointer>
+    struct operator_arrow_dispatch // proxy references
+    {
+        struct proxy
+        {
+            explicit proxy(Reference const & x) : m_ref(x) {}
+            Reference* operator->() { return ndnboost::addressof(m_ref); }
+            // This function is needed for MWCW and BCC, which won't call
+            // operator-> again automatically per 13.3.1.2 para 8
+            operator Reference*() { return ndnboost::addressof(m_ref); }
+            Reference m_ref;
+        };
+        typedef proxy result_type;
+        static result_type apply(Reference const & x)
+        {
+            return result_type(x);
+        }
+    };
+
+    template <class T, class Pointer>
+    struct operator_arrow_dispatch<T&, Pointer> // "real" references
+    {
+        typedef Pointer result_type;
+        static result_type apply(T& x)
+        {
+            return ndnboost::addressof(x);
+        }
+    };
+
+# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+    // Deal with ETI
+    template<>
+    struct operator_arrow_dispatch<int, int>
+    {
+        typedef int result_type;
+    };
+# endif
+
+    // A proxy return type for operator[], needed to deal with
+    // iterators that may invalidate referents upon destruction.
+    // Consider the temporary iterator in *(a + n)
+    template <class Iterator>
+    class operator_brackets_proxy
+    {
+        // Iterator is actually an iterator_facade, so we do not have to
+        // go through iterator_traits to access the traits.
+        typedef typename Iterator::reference  reference;
+        typedef typename Iterator::value_type value_type;
+
+     public:
+        operator_brackets_proxy(Iterator const& iter)
+          : m_iter(iter)
+        {}
+
+        operator reference() const
+        {
+            return *m_iter;
+        }
+
+        operator_brackets_proxy& operator=(value_type const& val)
+        {
+            *m_iter = val;
+            return *this;
+        }
+
+     private:
+        Iterator m_iter;
+    };
+
+    // A metafunction that determines whether operator[] must return a
+    // proxy, or whether it can simply return a copy of the value_type.
+    template <class ValueType, class Reference>
+    struct use_operator_brackets_proxy
+      : mpl::not_<
+            mpl::and_<
+                // Really we want an is_copy_constructible trait here,
+                // but is_POD will have to suffice in the meantime.
+                ndnboost::is_POD<ValueType>
+              , iterator_writability_disabled<ValueType,Reference>
+            >
+        >
+    {};
+        
+    template <class Iterator, class Value, class Reference>
+    struct operator_brackets_result
+    {
+        typedef typename mpl::if_<
+            use_operator_brackets_proxy<Value,Reference>
+          , operator_brackets_proxy<Iterator>
+          , Value
+        >::type type;
+    };
+
+    template <class Iterator>
+    operator_brackets_proxy<Iterator> make_operator_brackets_result(Iterator const& iter, mpl::true_)
+    {
+        return operator_brackets_proxy<Iterator>(iter);
+    }
+
+    template <class Iterator>
+    typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_)
+    {
+      return *iter;
+    }
+
+    struct choose_difference_type
+    {
+        template <class I1, class I2>
+        struct apply
+          :
+# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP
+          iterator_difference<I1>
+# elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+          mpl::if_<
+              is_convertible<I2,I1>
+            , typename I1::difference_type
+            , typename I2::difference_type
+          >
+# else 
+          mpl::eval_if<
+              is_convertible<I2,I1>
+            , iterator_difference<I1>
+            , iterator_difference<I2>
+          >
+# endif 
+        {};
+
+    };
+  } // namespace detail
+
+
+  // Macros which describe the declarations of binary operators
+# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
+#  define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type)       \
+    template <                                                              \
+        class Derived1, class V1, class TC1, class Reference1, class Difference1 \
+      , class Derived2, class V2, class TC2, class Reference2, class Difference2 \
+    >                                                                       \
+    prefix typename mpl::apply2<result_type,Derived1,Derived2>::type \
+    operator op(                                                            \
+        iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs   \
+      , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs)
+# else 
+#  define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type)   \
+    template <                                                          \
+        class Derived1, class V1, class TC1, class Reference1, class Difference1 \
+      , class Derived2, class V2, class TC2, class Reference2, class Difference2 \
+    >                                                                   \
+    prefix typename ndnboost::detail::enable_if_interoperable<             \
+        Derived1, Derived2                                              \
+      , typename mpl::apply2<result_type,Derived1,Derived2>::type       \
+    >::type                                                             \
+    operator op(                                                        \
+        iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs   \
+      , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs)
+# endif 
+
+#  define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args)              \
+    template <class Derived, class V, class TC, class R, class D>   \
+    prefix Derived operator+ args
+
+  //
+  // Helper class for granting access to the iterator core interface.
+  //
+  // The simple core interface is used by iterator_facade. The core
+  // interface of a user/library defined iterator type should not be made public
+  // so that it does not clutter the public interface. Instead iterator_core_access
+  // should be made friend so that iterator_facade can access the core
+  // interface through iterator_core_access.
+  //
+  class iterator_core_access
+  {
+# if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)                  
+      // Tasteless as this may seem, making all members public allows member templates
+      // to work in the absence of member template friends.
+   public:
+# else
+      
+      template <class I, class V, class TC, class R, class D> friend class iterator_facade;
+
+#  define BOOST_ITERATOR_FACADE_RELATION(op)                                \
+      BOOST_ITERATOR_FACADE_INTEROP_HEAD(friend,op, ndnboost::detail::always_bool2);
+
+      BOOST_ITERATOR_FACADE_RELATION(==)
+      BOOST_ITERATOR_FACADE_RELATION(!=)
+
+      BOOST_ITERATOR_FACADE_RELATION(<)
+      BOOST_ITERATOR_FACADE_RELATION(>)
+      BOOST_ITERATOR_FACADE_RELATION(<=)
+      BOOST_ITERATOR_FACADE_RELATION(>=)
+#  undef BOOST_ITERATOR_FACADE_RELATION
+
+      BOOST_ITERATOR_FACADE_INTEROP_HEAD(
+          friend, -, ndnboost::detail::choose_difference_type)
+      ;
+
+      BOOST_ITERATOR_FACADE_PLUS_HEAD(
+          friend inline
+          , (iterator_facade<Derived, V, TC, R, D> const&
+           , typename Derived::difference_type)
+      )
+      ;
+
+      BOOST_ITERATOR_FACADE_PLUS_HEAD(
+          friend inline
+        , (typename Derived::difference_type
+           , iterator_facade<Derived, V, TC, R, D> const&)
+      )
+      ;
+
+# endif
+
+      template <class Facade>
+      static typename Facade::reference dereference(Facade const& f)
+      {
+          return f.dereference();
+      }
+
+      template <class Facade>
+      static void increment(Facade& f)
+      {
+          f.increment();
+      }
+
+      template <class Facade>
+      static void decrement(Facade& f)
+      {
+          f.decrement();
+      }
+
+      template <class Facade1, class Facade2>
+      static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_)
+      {
+          return f1.equal(f2);
+      }
+
+      template <class Facade1, class Facade2>
+      static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_)
+      {
+          return f2.equal(f1);
+      }
+
+      template <class Facade>
+      static void advance(Facade& f, typename Facade::difference_type n)
+      {
+          f.advance(n);
+      }
+
+      template <class Facade1, class Facade2>
+      static typename Facade1::difference_type distance_from(
+          Facade1 const& f1, Facade2 const& f2, mpl::true_)
+      {
+          return -f1.distance_to(f2);
+      }
+
+      template <class Facade1, class Facade2>
+      static typename Facade2::difference_type distance_from(
+          Facade1 const& f1, Facade2 const& f2, mpl::false_)
+      {
+          return f2.distance_to(f1);
+      }
+
+      //
+      // Curiously Recurring Template interface.
+      //
+      template <class I, class V, class TC, class R, class D>
+      static I& derived(iterator_facade<I,V,TC,R,D>& facade)
+      {
+          return *static_cast<I*>(&facade);
+      }
+
+      template <class I, class V, class TC, class R, class D>
+      static I const& derived(iterator_facade<I,V,TC,R,D> const& facade)
+      {
+          return *static_cast<I const*>(&facade);
+      }
+
+   private:
+      // objects of this class are useless
+      iterator_core_access(); //undefined
+  };
+
+  //
+  // iterator_facade - use as a public base class for defining new
+  // standard-conforming iterators.
+  //
+  template <
+      class Derived             // The derived iterator type being constructed
+    , class Value
+    , class CategoryOrTraversal
+    , class Reference   = Value&
+    , class Difference  = std::ptrdiff_t
+  >
+  class iterator_facade
+# ifdef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE
+    : public ndnboost::detail::iterator_facade_types<
+         Value, CategoryOrTraversal, Reference, Difference
+      >::base
+#  undef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE
+# endif
+  {
+   private:
+      //
+      // Curiously Recurring Template interface.
+      //
+      Derived& derived()
+      {
+          return *static_cast<Derived*>(this);
+      }
+
+      Derived const& derived() const
+      {
+          return *static_cast<Derived const*>(this);
+      }
+
+      typedef ndnboost::detail::iterator_facade_types<
+         Value, CategoryOrTraversal, Reference, Difference
+      > associated_types;
+
+      typedef ndnboost::detail::operator_arrow_dispatch<
+          Reference
+        , typename associated_types::pointer
+      > operator_arrow_dispatch_;
+
+   protected:
+      // For use by derived classes
+      typedef iterator_facade<Derived,Value,CategoryOrTraversal,Reference,Difference> iterator_facade_;
+      
+   public:
+
+      typedef typename associated_types::value_type value_type;
+      typedef Reference reference;
+      typedef Difference difference_type;
+
+      typedef typename operator_arrow_dispatch_::result_type pointer;
+
+      typedef typename associated_types::iterator_category iterator_category;
+
+      reference operator*() const
+      {
+          return iterator_core_access::dereference(this->derived());
+      }
+
+      pointer operator->() const
+      {
+          return operator_arrow_dispatch_::apply(*this->derived());
+      }
+        
+      typename ndnboost::detail::operator_brackets_result<Derived,Value,reference>::type
+      operator[](difference_type n) const
+      {
+          typedef ndnboost::detail::use_operator_brackets_proxy<Value,Reference> use_proxy;
+          
+          return ndnboost::detail::make_operator_brackets_result<Derived>(
+              this->derived() + n
+            , use_proxy()
+          );
+      }
+
+      Derived& operator++()
+      {
+          iterator_core_access::increment(this->derived());
+          return this->derived();
+      }
+
+# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+      typename ndnboost::detail::postfix_increment_result<Derived,Value,Reference,CategoryOrTraversal>::type
+      operator++(int)
+      {
+          typename ndnboost::detail::postfix_increment_result<Derived,Value,Reference,CategoryOrTraversal>::type
+          tmp(this->derived());
+          ++*this;
+          return tmp;
+      }
+# endif
+      
+      Derived& operator--()
+      {
+          iterator_core_access::decrement(this->derived());
+          return this->derived();
+      }
+
+      Derived operator--(int)
+      {
+          Derived tmp(this->derived());
+          --*this;
+          return tmp;
+      }
+
+      Derived& operator+=(difference_type n)
+      {
+          iterator_core_access::advance(this->derived(), n);
+          return this->derived();
+      }
+
+      Derived& operator-=(difference_type n)
+      {
+          iterator_core_access::advance(this->derived(), -n);
+          return this->derived();
+      }
+
+      Derived operator-(difference_type x) const
+      {
+          Derived result(this->derived());
+          return result -= x;
+      }
+
+# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+      // There appears to be a bug which trashes the data of classes
+      // derived from iterator_facade when they are assigned unless we
+      // define this assignment operator.  This bug is only revealed
+      // (so far) in STLPort debug mode, but it's clearly a codegen
+      // problem so we apply the workaround for all MSVC6.
+      iterator_facade& operator=(iterator_facade const&)
+      {
+          return *this;
+      }
+# endif
+  };
+
+# if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+  template <class I, class V, class TC, class R, class D>
+  inline typename ndnboost::detail::postfix_increment_result<I,V,R,TC>::type
+  operator++(
+      iterator_facade<I,V,TC,R,D>& i
+    , int
+  )
+  {
+      typename ndnboost::detail::postfix_increment_result<I,V,R,TC>::type
+          tmp(*static_cast<I*>(&i));
+      
+      ++i;
+      
+      return tmp;
+  }
+# endif 
+
+  
+  //
+  // Comparison operator implementation. The library supplied operators
+  // enables the user to provide fully interoperable constant/mutable
+  // iterator types. I.e. the library provides all operators
+  // for all mutable/constant iterator combinations.
+  //
+  // Note though that this kind of interoperability for constant/mutable
+  // iterators is not required by the standard for container iterators.
+  // All the standard asks for is a conversion mutable -> constant.
+  // Most standard library implementations nowadays provide fully interoperable
+  // iterator implementations, but there are still heavily used implementations
+  // that do not provide them. (Actually it's even worse, they do not provide
+  // them for only a few iterators.)
+  //
+  // ?? Maybe a BOOST_ITERATOR_NO_FULL_INTEROPERABILITY macro should
+  //    enable the user to turn off mixed type operators
+  //
+  // The library takes care to provide only the right operator overloads.
+  // I.e.
+  //
+  // bool operator==(Iterator,      Iterator);
+  // bool operator==(ConstIterator, Iterator);
+  // bool operator==(Iterator,      ConstIterator);
+  // bool operator==(ConstIterator, ConstIterator);
+  //
+  //   ...
+  //
+  // In order to do so it uses c++ idioms that are not yet widely supported
+  // by current compiler releases. The library is designed to degrade gracefully
+  // in the face of compiler deficiencies. In general compiler
+  // deficiencies result in less strict error checking and more obscure
+  // error messages, functionality is not affected.
+  //
+  // For full operation compiler support for "Substitution Failure Is Not An Error"
+  // (aka. enable_if) and ndnboost::is_convertible is required.
+  //
+  // The following problems occur if support is lacking.
+  //
+  // Pseudo code
+  //
+  // ---------------
+  // AdaptorA<Iterator1> a1;
+  // AdaptorA<Iterator2> a2;
+  //
+  // // This will result in a no such overload error in full operation
+  // // If enable_if or is_convertible is not supported
+  // // The instantiation will fail with an error hopefully indicating that
+  // // there is no operator== for Iterator1, Iterator2
+  // // The same will happen if no enable_if is used to remove
+  // // false overloads from the templated conversion constructor
+  // // of AdaptorA.
+  //
+  // a1 == a2;
+  // ----------------
+  //
+  // AdaptorA<Iterator> a;
+  // AdaptorB<Iterator> b;
+  //
+  // // This will result in a no such overload error in full operation
+  // // If enable_if is not supported the static assert used
+  // // in the operator implementation will fail.
+  // // This will accidently work if is_convertible is not supported.
+  //
+  // a == b;
+  // ----------------
+  //
+
+# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP
+#  define BOOST_ITERATOR_CONVERTIBLE(a,b) mpl::true_()
+# else
+#  define BOOST_ITERATOR_CONVERTIBLE(a,b) is_convertible<a,b>()
+# endif
+
+# define BOOST_ITERATOR_FACADE_INTEROP(op, result_type, return_prefix, base_op) \
+  BOOST_ITERATOR_FACADE_INTEROP_HEAD(inline, op, result_type)                   \
+  {                                                                             \
+      /* For those compilers that do not support enable_if */                   \
+      BOOST_STATIC_ASSERT((                                                     \
+          is_interoperable< Derived1, Derived2 >::value                         \
+      ));                                                                       \
+      return_prefix iterator_core_access::base_op(                              \
+          *static_cast<Derived1 const*>(&lhs)                                   \
+        , *static_cast<Derived2 const*>(&rhs)                                   \
+        , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1)                         \
+      );                                                                        \
+  }
+
+# define BOOST_ITERATOR_FACADE_RELATION(op, return_prefix, base_op) \
+  BOOST_ITERATOR_FACADE_INTEROP(                                    \
+      op                                                            \
+    , ndnboost::detail::always_bool2                                   \
+    , return_prefix                                                 \
+    , base_op                                                       \
+  )
+
+  BOOST_ITERATOR_FACADE_RELATION(==, return, equal)
+  BOOST_ITERATOR_FACADE_RELATION(!=, return !, equal)
+
+  BOOST_ITERATOR_FACADE_RELATION(<, return 0 >, distance_from)
+  BOOST_ITERATOR_FACADE_RELATION(>, return 0 <, distance_from)
+  BOOST_ITERATOR_FACADE_RELATION(<=, return 0 >=, distance_from)
+  BOOST_ITERATOR_FACADE_RELATION(>=, return 0 <=, distance_from)
+# undef BOOST_ITERATOR_FACADE_RELATION
+
+  // operator- requires an additional part in the static assertion
+  BOOST_ITERATOR_FACADE_INTEROP(
+      -
+    , ndnboost::detail::choose_difference_type
+    , return
+    , distance_from
+  )
+# undef BOOST_ITERATOR_FACADE_INTEROP
+# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD
+
+# define BOOST_ITERATOR_FACADE_PLUS(args)           \
+  BOOST_ITERATOR_FACADE_PLUS_HEAD(inline, args)     \
+  {                                                 \
+      Derived tmp(static_cast<Derived const&>(i));  \
+      return tmp += n;                              \
+  }
+
+BOOST_ITERATOR_FACADE_PLUS((
+  iterator_facade<Derived, V, TC, R, D> const& i
+  , typename Derived::difference_type n
+))
+
+BOOST_ITERATOR_FACADE_PLUS((
+    typename Derived::difference_type n
+    , iterator_facade<Derived, V, TC, R, D> const& i
+))
+# undef BOOST_ITERATOR_FACADE_PLUS
+# undef BOOST_ITERATOR_FACADE_PLUS_HEAD
+
+} // namespace ndnboost
+
+#include <ndnboost/iterator/detail/config_undef.hpp>
+
+#endif // BOOST_ITERATOR_FACADE_23022003THW_HPP
diff --git a/ndnboost/iterator/reverse_iterator.hpp b/ndnboost/iterator/reverse_iterator.hpp
new file mode 100644
index 0000000..924112f
--- /dev/null
+++ b/ndnboost/iterator/reverse_iterator.hpp
@@ -0,0 +1,69 @@
+// (C) Copyright David Abrahams 2002.
+// (C) Copyright Jeremy Siek    2002.
+// (C) Copyright Thomas Witt    2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP
+#define BOOST_REVERSE_ITERATOR_23022003THW_HPP
+
+#include <ndnboost/next_prior.hpp>
+#include <ndnboost/iterator.hpp>
+#include <ndnboost/iterator/iterator_adaptor.hpp>
+
+namespace ndnboost
+{
+
+  //
+  //
+  //
+  template <class Iterator>
+  class reverse_iterator
+      : public iterator_adaptor< reverse_iterator<Iterator>, Iterator >
+  {
+      typedef iterator_adaptor< reverse_iterator<Iterator>, Iterator > super_t;
+
+      friend class iterator_core_access;
+
+   public:
+      reverse_iterator() {}
+
+      explicit reverse_iterator(Iterator x) 
+          : super_t(x) {}
+
+      template<class OtherIterator>
+      reverse_iterator(
+          reverse_iterator<OtherIterator> const& r
+          , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0
+          )
+          : super_t(r.base())
+      {}
+
+   private:
+      typename super_t::reference dereference() const { return *ndnboost::prior(this->base()); }
+    
+      void increment() { --this->base_reference(); }
+      void decrement() { ++this->base_reference(); }
+
+      void advance(typename super_t::difference_type n)
+      {
+          this->base_reference() += -n;
+      }
+
+      template <class OtherIterator>
+      typename super_t::difference_type
+      distance_to(reverse_iterator<OtherIterator> const& y) const
+      {
+          return this->base_reference() - y.base();
+      }
+  };
+
+  template <class BidirectionalIterator>
+  reverse_iterator<BidirectionalIterator> make_reverse_iterator(BidirectionalIterator x)
+  {
+      return reverse_iterator<BidirectionalIterator>(x);
+  }
+
+} // namespace ndnboost
+
+#endif // BOOST_REVERSE_ITERATOR_23022003THW_HPP
diff --git a/ndnboost/lambda/bind.hpp b/ndnboost/lambda/bind.hpp
new file mode 100644
index 0000000..3ec3bab
--- /dev/null
+++ b/ndnboost/lambda/bind.hpp
@@ -0,0 +1,19 @@
+// -- bind.hpp -- Boost Lambda Library --------------------------------------
+
+// Copyright (C) 1999-2001 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//                         Gary Powell (gwpowell@hotmail.com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org 
+
+#ifndef BOOST_LAMBDA_BIND_HPP
+#define BOOST_LAMBDA_BIND_HPP
+
+#include "ndnboost/lambda/core.hpp"
+
+#include "ndnboost/lambda/detail/bind_functions.hpp"
+    
+#endif
diff --git a/ndnboost/lambda/core.hpp b/ndnboost/lambda/core.hpp
new file mode 100644
index 0000000..1ff8342
--- /dev/null
+++ b/ndnboost/lambda/core.hpp
@@ -0,0 +1,79 @@
+// -- core.hpp -- Boost Lambda Library -------------------------------------
+//
+// Copyright (C) 2000 Gary Powell (powellg@amazon.com)
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+// 
+// Includes the core of LL, without any real features for client:
+// 
+// tuples, lambda functors, return type deduction templates,
+// argument substitution mechanism (select functions)
+// 
+// Some functionality comes as well:
+// Assignment and subscript operators, as well as function
+// call operator for placeholder variables.
+// -------------------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_CORE_HPP
+#define BOOST_LAMBDA_CORE_HPP
+
+#include "ndnboost/type_traits/transform_traits.hpp"
+#include "ndnboost/type_traits/cv_traits.hpp"
+
+#include "ndnboost/tuple/tuple.hpp"
+
+// inject some of the tuple names into lambda 
+namespace ndnboost {
+namespace lambda {
+
+using ::ndnboost::tuples::tuple;
+using ::ndnboost::tuples::null_type;
+
+} // lambda
+} // boost
+
+#include "ndnboost/lambda/detail/lambda_config.hpp"
+#include "ndnboost/lambda/detail/lambda_fwd.hpp"
+
+#include "ndnboost/lambda/detail/arity_code.hpp"
+#include "ndnboost/lambda/detail/actions.hpp"
+
+#include "ndnboost/lambda/detail/lambda_traits.hpp"
+
+#include "ndnboost/lambda/detail/function_adaptors.hpp"
+#include "ndnboost/lambda/detail/return_type_traits.hpp"
+
+#include "ndnboost/lambda/detail/select_functions.hpp"
+
+#include "ndnboost/lambda/detail/lambda_functor_base.hpp"
+
+#include "ndnboost/lambda/detail/lambda_functors.hpp"
+
+#include "ndnboost/lambda/detail/ret.hpp"
+
+namespace ndnboost {
+namespace lambda {
+
+namespace {
+
+  // These are constants types and need to be initialised
+  ndnboost::lambda::placeholder1_type free1 = ndnboost::lambda::placeholder1_type();
+  ndnboost::lambda::placeholder2_type free2 = ndnboost::lambda::placeholder2_type();
+  ndnboost::lambda::placeholder3_type free3 = ndnboost::lambda::placeholder3_type();
+
+  ndnboost::lambda::placeholder1_type& _1 = free1;
+  ndnboost::lambda::placeholder2_type& _2 = free2;
+  ndnboost::lambda::placeholder3_type& _3 = free3;
+  // _1, _2, ... naming scheme by Peter Dimov
+} // unnamed
+   
+} // lambda
+} // boost
+   
+   
+#endif //BOOST_LAMBDA_CORE_HPP
diff --git a/ndnboost/lambda/detail/actions.hpp b/ndnboost/lambda/detail/actions.hpp
new file mode 100644
index 0000000..8892bb1
--- /dev/null
+++ b/ndnboost/lambda/detail/actions.hpp
@@ -0,0 +1,174 @@
+// -- Boost Lambda Library - actions.hpp ----------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see www.boost.org
+
+// ----------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_ACTIONS_HPP
+#define BOOST_LAMBDA_ACTIONS_HPP
+
+namespace ndnboost { 
+namespace lambda {
+
+
+
+template<int Arity, class Act> class action;
+
+// these need to be defined here, since the corresponding lambda 
+// functions are members of lambda_functor classes
+
+class assignment_action {};
+class subscript_action {};
+
+template <class Action> class other_action;
+
+// action for specifying the explicit return type
+template <class RET> class explicit_return_type_action {};
+
+// action for preventing the expansion of a lambda expression
+struct protect_action {};
+
+  // must be defined here, comma is a special case
+struct comma_action {};
+
+
+  // actions, for which the existence of protect is checked in return type 
+  // deduction.
+
+template <class Action> struct is_protectable {
+  BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// NOTE: comma action is protectable. Other protectable actions
+// are listed in operator_actions.hpp
+
+template<> struct is_protectable<other_action<comma_action> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+
+namespace detail {
+
+  // this type is used in return type deductions to signal that deduction 
+  // did not find a result. It does not necessarily mean an error, it commonly
+  // means that something else should be tried.
+  class unspecified {};
+}
+
+  // function action is a special case: bind functions can be called with 
+  // the return type specialized explicitly e.g. bind<int>(foo);
+  // If this call syntax is used, the return type is stored in the latter
+  // argument of function_action template. Otherwise the argument gets the type
+  // 'unspecified'.
+  // This argument is only relevant in the return type deduction code
+template <int I, class Result_type = detail::unspecified> 
+class function_action {};
+   
+template<class T> class function_action<1, T> {
+public:
+  template<class RET, class A1>
+  static RET apply(A1& a1) {
+    return function_adaptor<typename ndnboost::remove_cv<A1>::type>::
+      template apply<RET>(a1);
+  }
+};
+
+template<class T> class function_action<2, T> {
+public:
+  template<class RET, class A1, class A2>
+  static RET apply(A1& a1, A2& a2) {
+    return function_adaptor<typename ndnboost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2);
+  }
+};
+
+template<class T> class function_action<3, T> {
+public:
+  template<class RET, class A1, class A2, class A3>
+  static RET apply(A1& a1, A2& a2, A3& a3) {
+    return function_adaptor<typename ndnboost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3);
+  }
+};
+
+template<class T> class function_action<4, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4) {
+    return function_adaptor<typename ndnboost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4);
+  }
+};
+
+template<class T> class function_action<5, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4, class A5>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return function_adaptor<typename ndnboost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4, a5);
+  }
+};
+
+template<class T> class function_action<6, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4, class A5, 
+           class A6>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return function_adaptor<typename ndnboost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4, a5, a6);
+  }
+};
+
+template<class T> class function_action<7, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4, class A5,  
+           class A6, class A7>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return function_adaptor<typename ndnboost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4, a5, a6, a7);
+  }
+};
+
+template<class T> class function_action<8, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4, class A5, 
+           class A6, class A7, class A8>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, 
+                   A8& a8) {
+    return function_adaptor<typename ndnboost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+};
+
+template<class T> class function_action<9, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4, class A5, 
+           class A6, class A7, class A8, class A9>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, 
+                   A8& a8, A9& a9) {
+    return function_adaptor<typename ndnboost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+  }
+};
+
+template<class T> class function_action<10, T> {
+public:
+  template<class RET, class A1, class A2, class A3, class A4, class A5, 
+           class A6, class A7, class A8, class A9, class A10>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, 
+                   A8& a8, A9& a9, A10& a10) {
+    return function_adaptor<typename ndnboost::remove_cv<A1>::type>::
+      template apply<RET>(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
+  }
+};
+
+} // namespace lambda
+} // namespace ndnboost
+
+#endif
diff --git a/ndnboost/lambda/detail/arity_code.hpp b/ndnboost/lambda/detail/arity_code.hpp
new file mode 100644
index 0000000..2b762c3
--- /dev/null
+++ b/ndnboost/lambda/detail/arity_code.hpp
@@ -0,0 +1,110 @@
+// -- Boost Lambda Library -------------------------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// --------------------------------------------------
+
+#ifndef BOOST_LAMBDA_ARITY_CODE_HPP
+#define BOOST_LAMBDA_ARITY_CODE_HPP
+
+#include "ndnboost/type_traits/cv_traits.hpp"
+#include "ndnboost/type_traits/transform_traits.hpp"
+
+namespace ndnboost { 
+namespace lambda {
+
+// These constants state, whether a lambda_functor instantiation results from 
+// an expression which contains no placeholders (NONE), 
+// only free1 placeholders (FIRST), 
+// free2 placeholders and maybe free1 placeholders (SECOND),
+// free3 and maybe free1 and free2 placeholders (THIRD),
+// freeE placeholders and maybe free1 and free2  (EXCEPTION).
+// RETHROW means, that a rethrow expression is used somewhere in the lambda_functor.
+
+enum { NONE             = 0x00, // Notice we are using bits as flags here.
+       FIRST            = 0x01, 
+       SECOND           = 0x02, 
+       THIRD            = 0x04, 
+       EXCEPTION        = 0x08, 
+       RETHROW          = 0x10};
+
+
+template<class T>
+struct get_tuple_arity;
+
+namespace detail {
+
+template <class T> struct get_arity_;
+
+} // end detail;
+
+template <class T> struct get_arity {
+
+  BOOST_STATIC_CONSTANT(int, value = detail::get_arity_<typename ndnboost::remove_cv<typename ndnboost::remove_reference<T>::type>::type>::value);
+
+};
+
+namespace detail {
+
+template<class T>
+struct get_arity_ {
+  BOOST_STATIC_CONSTANT(int, value = 0);
+};
+
+template<class T>
+struct get_arity_<lambda_functor<T> > {
+  BOOST_STATIC_CONSTANT(int, value = get_arity<T>::value);
+};
+
+template<class Action, class Args>
+struct get_arity_<lambda_functor_base<Action, Args> > {
+  BOOST_STATIC_CONSTANT(int, value = get_tuple_arity<Args>::value);
+};
+
+template<int I>
+struct get_arity_<placeholder<I> > {
+  BOOST_STATIC_CONSTANT(int, value = I);
+};
+
+} // detail 
+
+template<class T>
+struct get_tuple_arity {
+  BOOST_STATIC_CONSTANT(int, value = get_arity<typename T::head_type>::value | get_tuple_arity<typename T::tail_type>::value);
+};
+
+
+template<>
+struct get_tuple_arity<null_type> {
+  BOOST_STATIC_CONSTANT(int, value = 0);
+};
+
+
+  // Does T have placeholder<I> as it's subexpression?
+
+template<class T, int I>
+struct has_placeholder {
+  BOOST_STATIC_CONSTANT(bool, value = (get_arity<T>::value & I) != 0);
+}; 
+
+template<int I, int J>
+struct includes_placeholder {
+  BOOST_STATIC_CONSTANT(bool, value = (J & I) != 0);
+};
+
+template<int I, int J>
+struct lacks_placeholder {
+  BOOST_STATIC_CONSTANT(bool, value = ((J & I) == 0));
+};
+
+
+} // namespace lambda
+} // namespace ndnboost
+
+#endif
diff --git a/ndnboost/lambda/detail/bind_functions.hpp b/ndnboost/lambda/detail/bind_functions.hpp
new file mode 100644
index 0000000..4288067
--- /dev/null
+++ b/ndnboost/lambda/detail/bind_functions.hpp
@@ -0,0 +1,1879 @@
+// -- bind_functions.hpp -- Boost Lambda Library
+//
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org
+
+// ----------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_BIND_FUNCTIONS_HPP
+#define BOOST_LAMBDA_BIND_FUNCTIONS_HPP
+
+
+namespace ndnboost { 
+namespace lambda {
+
+#ifdef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
+
+  // gcc 2.96 instantiates bind functions it does not even call.
+  // These instantiations lead to incorrect types in the return type, 
+  // and a compilation error results. 
+  // This tweaking is to prevent the formation of the erroneous type.
+namespace detail {
+
+template<class T> struct constify_non_funcs {
+  typedef typename 
+  detail::IF_type<ndnboost::is_function<T>::value,
+    ndnboost::add_reference<T>,
+    ndnboost::add_const<T>
+  >::type type;
+};
+
+}
+#endif
+// 1-argument bind functions --------------------------
+#ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
+template <class Result>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<1, function_action<1, Result> >,
+    typename detail::bind_tuple_mapper<Result(&)()>::type
+  >
+>
+
+bind(Result(& a1)()) {
+  return
+    lambda_functor_base<
+      action<1, function_action<1, Result> >,
+      typename detail::bind_tuple_mapper<Result(&)()>::type
+    >
+    ( typename detail::bind_tuple_mapper<Result(&)()>::type
+      (a1)
+    );
+}
+#endif
+
+ #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING 
+template <class Arg1>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<1, function_action<1> >,
+    typename detail::bind_tuple_mapper<const Arg1>::type
+  >
+>
+
+bind(const Arg1& a1) {
+  return
+    lambda_functor_base<
+      action<1, function_action<1> >,
+      typename detail::bind_tuple_mapper<const Arg1>::type
+    >
+    ( typename detail::bind_tuple_mapper<const Arg1>::type
+      (a1)
+    );
+}
+
+template <class Result, class Arg1>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<1, function_action<1, Result> >,
+    typename detail::bind_tuple_mapper<const Arg1>::type
+  >
+>
+
+bind(const Arg1& a1) {
+  return
+    lambda_functor_base<
+      action<1, function_action<1, Result> >,
+      typename detail::bind_tuple_mapper<const Arg1>::type
+    >
+    ( typename detail::bind_tuple_mapper<const Arg1>::type
+      (a1)
+    );
+}
+
+
+ #else 
+template <class Arg1>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<1, function_action<1> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type
+    >::type
+  >
+>
+
+bind(const Arg1& a1) {
+  return
+    lambda_functor_base<
+      action<1, function_action<1> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type
+      >::type
+      (a1)
+    );
+}
+
+template <class Result, class Arg1>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<1, function_action<1, Result> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type
+    >::type
+  >
+>
+
+bind(const Arg1& a1) {
+  return
+    lambda_functor_base<
+      action<1, function_action<1, Result> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type
+      >::type
+      (a1)
+    );
+}
+
+template <class Result>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<1, function_action<1, Result> >,
+    typename detail::bind_tuple_mapper<Result(*)()>::type
+  >
+>
+
+bind(Result(* const & a1)()) {
+  return
+    lambda_functor_base<
+      action<1, function_action<1, Result> >,
+      typename detail::bind_tuple_mapper<Result(*)()>::type
+    >
+    ( typename detail::bind_tuple_mapper<Result(*)()>::type
+      (a1)
+    );
+}
+
+
+#endif 
+
+// 2-argument bind functions --------------------------
+#ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
+template <class Result, class Par1, class Arg2>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<2, function_action<2, Result> >,
+    typename detail::bind_tuple_mapper<Result(&)(Par1), const Arg2>::type
+  >
+>
+
+bind(Result(&a1)(Par1), const Arg2& a2) {
+  return
+    lambda_functor_base<
+      action<2, function_action<2, Result> >,
+      typename detail::bind_tuple_mapper<Result(&)(Par1), const Arg2>::type
+    >
+    ( typename detail::bind_tuple_mapper<Result(&)(Par1), const Arg2>::type
+      (a1, a2)
+    );
+}
+#endif
+
+#ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING 
+template <class Arg1, class Arg2>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<2, function_action<2> >,
+    typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2) {
+  return
+    lambda_functor_base<
+      action<2, function_action<2> >,
+      typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
+    >
+    ( typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
+      (a1, a2)
+    );
+}
+
+template <class Result, class Arg1, class Arg2>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<2, function_action<2, Result> >,
+    typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2) {
+  return
+    lambda_functor_base<
+      action<2, function_action<2, Result> >,
+      typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
+    >
+    ( typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
+      (a1, a2)
+    );
+}
+
+
+ #else 
+template <class Arg1, class Arg2>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<2, function_action<2> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2) {
+  return
+    lambda_functor_base<
+      action<2, function_action<2> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2
+      >::type
+      (a1, a2)
+    );
+}
+
+template <class Result, class Arg1, class Arg2>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<2, function_action<2, Result> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2) {
+  return
+    lambda_functor_base<
+      action<2, function_action<2, Result> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2
+      >::type
+      (a1, a2)
+    );
+}
+
+template <class Result, class Par1, class Arg2>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<2, function_action<2, Result> >,
+    typename detail::bind_tuple_mapper<Result(*)(Par1), const Arg2>::type
+  >
+>
+
+bind(Result(* const & a1)(Par1), const Arg2& a2) {
+  return
+    lambda_functor_base<
+      action<2, function_action<2, Result> >,
+      typename detail::bind_tuple_mapper<Result(*)(Par1), const Arg2>::type
+    >
+    ( typename detail::bind_tuple_mapper<Result(*)(Par1), const Arg2>::type
+      (a1, a2)
+    );
+}
+
+
+ #endif 
+
+// 3-argument bind functions --------------------------
+#ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
+template <class Result, class Par1, class Par2, class Arg2, class Arg3>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<3, function_action<3, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(&)(Par1, Par2), const Arg2, const Arg3
+    >::type
+  >
+>
+
+bind(Result(&a1)(Par1, Par2), const Arg2& a2, const Arg3& a3) {
+  return
+    lambda_functor_base<
+      action<3, function_action<3, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2), const Arg2, const Arg3
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2), const Arg2, const Arg3
+      >::type
+      (a1, a2, a3)
+    );
+}
+#endif
+
+ #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING 
+template <class Arg1, class Arg2, class Arg3>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<3, function_action<3> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3) {
+  return
+    lambda_functor_base<
+      action<3, function_action<3> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3
+      >::type
+      (a1, a2, a3)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<3, function_action<3, Result> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3) {
+  return
+    lambda_functor_base<
+      action<3, function_action<3, Result> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3
+      >::type
+      (a1, a2, a3)
+    );
+}
+
+
+ #else 
+template <class Arg1, class Arg2, class Arg3>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<3, function_action<3> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3) {
+  return
+    lambda_functor_base<
+      action<3, function_action<3> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3
+      >::type
+      (a1, a2, a3)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<3, function_action<3, Result> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3) {
+  return
+    lambda_functor_base<
+      action<3, function_action<3, Result> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3
+      >::type
+      (a1, a2, a3)
+    );
+}
+
+template <class Result, class Par1, class Par2, class Arg2, class Arg3>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<3, function_action<3, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(*)(Par1, Par2), const Arg2, const Arg3
+    >::type
+  >
+>
+
+bind(Result(* const & a1)(Par1, Par2), const Arg2& a2, const Arg3& a3) {
+  return
+    lambda_functor_base<
+      action<3, function_action<3, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2), const Arg2, const Arg3
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2), const Arg2, const Arg3
+      >::type
+      (a1, a2, a3)
+    );
+}
+
+
+ #endif 
+
+// 4-argument bind functions --------------------------
+#ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
+template <class Result, class Par1, class Par2, class Par3, class Arg2,
+          class Arg3, class Arg4>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<4, function_action<4, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(&)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
+    >::type
+  >
+>
+
+bind(Result(&a1)(Par1, Par2, Par3), const Arg2& a2, const Arg3& a3,
+     const Arg4& a4) {
+  return
+    lambda_functor_base<
+      action<4, function_action<4, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
+      >::type
+      (a1, a2, a3, a4)
+    );
+}
+#endif
+
+ #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING 
+template <class Arg1, class Arg2, class Arg3, class Arg4>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<4, function_action<4> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) {
+  return
+    lambda_functor_base<
+      action<4, function_action<4> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4
+      >::type
+      (a1, a2, a3, a4)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<4, function_action<4, Result> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) {
+  return
+    lambda_functor_base<
+      action<4, function_action<4, Result> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4
+      >::type
+      (a1, a2, a3, a4)
+    );
+}
+
+
+ #else 
+template <class Arg1, class Arg2, class Arg3, class Arg4>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<4, function_action<4> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) {
+  return
+    lambda_functor_base<
+      action<4, function_action<4> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4
+      >::type
+      (a1, a2, a3, a4)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<4, function_action<4, Result> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) {
+  return
+    lambda_functor_base<
+      action<4, function_action<4, Result> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4
+      >::type
+      (a1, a2, a3, a4)
+    );
+}
+
+template <class Result, class Par1, class Par2, class Par3, class Arg2,
+          class Arg3, class Arg4>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<4, function_action<4, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(*)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
+    >::type
+  >
+>
+
+bind(Result(* const & a1)(Par1, Par2, Par3), const Arg2& a2,
+     const Arg3& a3, const Arg4& a4) {
+  return
+    lambda_functor_base<
+      action<4, function_action<4, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
+      >::type
+      (a1, a2, a3, a4)
+    );
+}
+
+
+ #endif 
+
+// 5-argument bind functions --------------------------
+#ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
+template <class Result, class Par1, class Par2, class Par3, class Par4,
+          class Arg2, class Arg3, class Arg4, class Arg5>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<5, function_action<5, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(&)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
+      const Arg5
+    >::type
+  >
+>
+
+bind(Result(&a1)(Par1, Par2, Par3, Par4), const Arg2& a2, const Arg3& a3,
+     const Arg4& a4, const Arg5& a5) {
+  return
+    lambda_functor_base<
+      action<5, function_action<5, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
+        const Arg5
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
+        const Arg5
+      >::type
+      (a1, a2, a3, a4, a5)
+    );
+}
+#endif
+
+ #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING 
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<5, function_action<5> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5) {
+  return
+    lambda_functor_base<
+      action<5, function_action<5> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
+      >::type
+      (a1, a2, a3, a4, a5)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
+          class Arg5>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<5, function_action<5, Result> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5) {
+  return
+    lambda_functor_base<
+      action<5, function_action<5, Result> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
+      >::type
+      (a1, a2, a3, a4, a5)
+    );
+}
+
+
+ #else 
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<5, function_action<5> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4, const Arg5
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5) {
+  return
+    lambda_functor_base<
+      action<5, function_action<5> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5
+      >::type
+      (a1, a2, a3, a4, a5)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
+          class Arg5>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<5, function_action<5, Result> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4, const Arg5
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5) {
+  return
+    lambda_functor_base<
+      action<5, function_action<5, Result> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5
+      >::type
+      (a1, a2, a3, a4, a5)
+    );
+}
+
+template <class Result, class Par1, class Par2, class Par3, class Par4,
+          class Arg2, class Arg3, class Arg4, class Arg5>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<5, function_action<5, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(*)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
+      const Arg5
+    >::type
+  >
+>
+
+bind(Result(* const & a1)(Par1, Par2, Par3, Par4), const Arg2& a2,
+     const Arg3& a3, const Arg4& a4, const Arg5& a5) {
+  return
+    lambda_functor_base<
+      action<5, function_action<5, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
+        const Arg5
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
+        const Arg5
+      >::type
+      (a1, a2, a3, a4, a5)
+    );
+}
+
+
+ #endif 
+
+// 6-argument bind functions --------------------------
+#ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
+template <class Result, class Par1, class Par2, class Par3, class Par4,
+          class Par5, class Arg2, class Arg3, class Arg4, class Arg5,
+          class Arg6>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<6, function_action<6, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(&)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6
+    >::type
+  >
+>
+
+bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5), const Arg2& a2,
+     const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6) {
+  return
+    lambda_functor_base<
+      action<6, function_action<6, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
+        const Arg4, const Arg5, const Arg6
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
+        const Arg4, const Arg5, const Arg6
+      >::type
+      (a1, a2, a3, a4, a5, a6)
+    );
+}
+#endif
+
+ #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING 
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
+          class Arg6>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<6, function_action<6> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6) {
+  return
+    lambda_functor_base<
+      action<6, function_action<6> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
+      >::type
+      (a1, a2, a3, a4, a5, a6)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
+          class Arg5, class Arg6>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<6, function_action<6, Result> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6) {
+  return
+    lambda_functor_base<
+      action<6, function_action<6, Result> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
+      >::type
+      (a1, a2, a3, a4, a5, a6)
+    );
+}
+
+
+ #else 
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
+          class Arg6>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<6, function_action<6> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6) {
+  return
+    lambda_functor_base<
+      action<6, function_action<6> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6
+      >::type
+      (a1, a2, a3, a4, a5, a6)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
+          class Arg5, class Arg6>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<6, function_action<6, Result> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6) {
+  return
+    lambda_functor_base<
+      action<6, function_action<6, Result> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6
+      >::type
+      (a1, a2, a3, a4, a5, a6)
+    );
+}
+
+template <class Result, class Par1, class Par2, class Par3, class Par4,
+          class Par5, class Arg2, class Arg3, class Arg4, class Arg5,
+          class Arg6>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<6, function_action<6, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(*)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6
+    >::type
+  >
+>
+
+bind(Result(* const & a1)(Par1, Par2, Par3, Par4, Par5), const Arg2& a2,
+     const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6) {
+  return
+    lambda_functor_base<
+      action<6, function_action<6, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
+        const Arg4, const Arg5, const Arg6
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
+        const Arg4, const Arg5, const Arg6
+      >::type
+      (a1, a2, a3, a4, a5, a6)
+    );
+}
+
+
+ #endif 
+
+// 7-argument bind functions --------------------------
+#ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
+template <class Result, class Par1, class Par2, class Par3, class Par4,
+          class Par5, class Par6, class Arg2, class Arg3, class Arg4,
+          class Arg5, class Arg6, class Arg7>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<7, function_action<7, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(&)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6, const Arg7
+    >::type
+  >
+>
+
+bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2& a2,
+     const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6,
+     const Arg7& a7) {
+  return
+    lambda_functor_base<
+      action<7, function_action<7, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
+        const Arg4, const Arg5, const Arg6, const Arg7
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
+        const Arg4, const Arg5, const Arg6, const Arg7
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7)
+    );
+}
+#endif
+
+ #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING 
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
+          class Arg6, class Arg7>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<7, function_action<7> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
+      const Arg7
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7) {
+  return
+    lambda_functor_base<
+      action<7, function_action<7> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
+          class Arg5, class Arg6, class Arg7>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<7, function_action<7, Result> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
+      const Arg7
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7) {
+  return
+    lambda_functor_base<
+      action<7, function_action<7, Result> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7)
+    );
+}
+
+
+ #else 
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
+          class Arg6, class Arg7>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<7, function_action<7> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6, const Arg7
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7) {
+  return
+    lambda_functor_base<
+      action<7, function_action<7> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
+          class Arg5, class Arg6, class Arg7>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<7, function_action<7, Result> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6, const Arg7
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7) {
+  return
+    lambda_functor_base<
+      action<7, function_action<7, Result> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7)
+    );
+}
+
+template <class Result, class Par1, class Par2, class Par3, class Par4,
+          class Par5, class Par6, class Arg2, class Arg3, class Arg4,
+          class Arg5, class Arg6, class Arg7>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<7, function_action<7, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(*)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6, const Arg7
+    >::type
+  >
+>
+
+bind(Result(* const & a1)(Par1, Par2, Par3, Par4, Par5, Par6),
+     const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
+     const Arg6& a6, const Arg7& a7) {
+  return
+    lambda_functor_base<
+      action<7, function_action<7, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
+        const Arg4, const Arg5, const Arg6, const Arg7
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
+        const Arg4, const Arg5, const Arg6, const Arg7
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7)
+    );
+}
+
+
+ #endif 
+
+// 8-argument bind functions --------------------------
+#ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
+template <class Result, class Par1, class Par2, class Par3, class Par4,
+          class Par5, class Par6, class Par7, class Arg2, class Arg3,
+          class Arg4, class Arg5, class Arg6, class Arg7, class Arg8>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<8, function_action<8, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
+      const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
+    >::type
+  >
+>
+
+bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2& a2,
+     const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6,
+     const Arg7& a7, const Arg8& a8) {
+  return
+    lambda_functor_base<
+      action<8, function_action<8, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8)
+    );
+}
+#endif
+
+ #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING 
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
+          class Arg6, class Arg7, class Arg8>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<8, function_action<8> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
+      const Arg7, const Arg8
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8) {
+  return
+    lambda_functor_base<
+      action<8, function_action<8> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7, const Arg8
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7, const Arg8
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
+          class Arg5, class Arg6, class Arg7, class Arg8>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<8, function_action<8, Result> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
+      const Arg7, const Arg8
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8) {
+  return
+    lambda_functor_base<
+      action<8, function_action<8, Result> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7, const Arg8
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7, const Arg8
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8)
+    );
+}
+
+
+ #else 
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
+          class Arg6, class Arg7, class Arg8>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<8, function_action<8> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8) {
+  return
+    lambda_functor_base<
+      action<8, function_action<8> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
+          class Arg5, class Arg6, class Arg7, class Arg8>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<8, function_action<8, Result> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8) {
+  return
+    lambda_functor_base<
+      action<8, function_action<8, Result> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8)
+    );
+}
+
+template <class Result, class Par1, class Par2, class Par3, class Par4,
+          class Par5, class Par6, class Par7, class Arg2, class Arg3,
+          class Arg4, class Arg5, class Arg6, class Arg7, class Arg8>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<8, function_action<8, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
+      const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
+    >::type
+  >
+>
+
+bind(Result(* const & a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7),
+     const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
+     const Arg6& a6, const Arg7& a7, const Arg8& a8) {
+  return
+    lambda_functor_base<
+      action<8, function_action<8, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8)
+    );
+}
+
+
+ #endif 
+
+// 9-argument bind functions --------------------------
+#ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
+template <class Result, class Par1, class Par2, class Par3, class Par4,
+          class Par5, class Par6, class Par7, class Par8, class Arg2,
+          class Arg3, class Arg4, class Arg5, class Arg6, class Arg7,
+          class Arg8, class Arg9>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<9, function_action<9, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
+      const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8,
+      const Arg9
+    >::type
+  >
+>
+
+bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8),
+     const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
+     const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9) {
+  return
+    lambda_functor_base<
+      action<9, function_action<9, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+        const Arg8, const Arg9
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+        const Arg8, const Arg9
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8, a9)
+    );
+}
+#endif
+
+ #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING 
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
+          class Arg6, class Arg7, class Arg8, class Arg9>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<9, function_action<9> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
+      const Arg7, const Arg8, const Arg9
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
+     const Arg9& a9) {
+  return
+    lambda_functor_base<
+      action<9, function_action<9> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7, const Arg8, const Arg9
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7, const Arg8, const Arg9
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8, a9)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
+          class Arg5, class Arg6, class Arg7, class Arg8, class Arg9>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<9, function_action<9, Result> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
+      const Arg7, const Arg8, const Arg9
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
+     const Arg9& a9) {
+  return
+    lambda_functor_base<
+      action<9, function_action<9, Result> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7, const Arg8, const Arg9
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7, const Arg8, const Arg9
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8, a9)
+    );
+}
+
+
+ #else 
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
+          class Arg6, class Arg7, class Arg8, class Arg9>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<9, function_action<9> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
+     const Arg9& a9) {
+  return
+    lambda_functor_base<
+      action<9, function_action<9> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+        const Arg8, const Arg9
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+        const Arg8, const Arg9
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8, a9)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
+          class Arg5, class Arg6, class Arg7, class Arg8, class Arg9>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<9, function_action<9, Result> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
+     const Arg9& a9) {
+  return
+    lambda_functor_base<
+      action<9, function_action<9, Result> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+        const Arg8, const Arg9
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+        const Arg8, const Arg9
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8, a9)
+    );
+}
+
+template <class Result, class Par1, class Par2, class Par3, class Par4,
+          class Par5, class Par6, class Par7, class Par8, class Arg2,
+          class Arg3, class Arg4, class Arg5, class Arg6, class Arg7,
+          class Arg8, class Arg9>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<9, function_action<9, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
+      const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8,
+      const Arg9
+    >::type
+  >
+>
+
+bind(Result(* const & a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8),
+     const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
+     const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9) {
+  return
+    lambda_functor_base<
+      action<9, function_action<9, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+        const Arg8, const Arg9
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+        const Arg8, const Arg9
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8, a9)
+    );
+}
+
+
+ #endif 
+
+// 10-argument bind functions --------------------------
+#ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
+template <class Result, class Par1, class Par2, class Par3, class Par4,
+          class Par5, class Par6, class Par7, class Par8, class Par9,
+          class Arg2, class Arg3, class Arg4, class Arg5, class Arg6,
+          class Arg7, class Arg8, class Arg9, class Arg10>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<10, function_action<10, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
+      const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+      const Arg8, const Arg9, const Arg10
+    >::type
+  >
+>
+
+bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
+     const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
+     const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9,
+     const Arg10& a10) {
+  return
+    lambda_functor_base<
+      action<10, function_action<10, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
+        const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
+        const Arg7, const Arg8, const Arg9, const Arg10
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
+        const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
+        const Arg7, const Arg8, const Arg9, const Arg10
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
+    );
+}
+#endif
+
+ #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING 
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
+          class Arg6, class Arg7, class Arg8, class Arg9, class Arg10>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<10, function_action<10> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
+      const Arg7, const Arg8, const Arg9, const Arg10
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
+     const Arg9& a9, const Arg10& a10) {
+  return
+    lambda_functor_base<
+      action<10, function_action<10> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7, const Arg8, const Arg9, const Arg10
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7, const Arg8, const Arg9, const Arg10
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
+          class Arg5, class Arg6, class Arg7, class Arg8, class Arg9,
+          class Arg10>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<10, function_action<10, Result> >,
+    typename detail::bind_tuple_mapper<
+      const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
+      const Arg7, const Arg8, const Arg9, const Arg10
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
+     const Arg9& a9, const Arg10& a10) {
+  return
+    lambda_functor_base<
+      action<10, function_action<10, Result> >,
+      typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7, const Arg8, const Arg9, const Arg10
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
+        const Arg6, const Arg7, const Arg8, const Arg9, const Arg10
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
+    );
+}
+
+
+ #else 
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
+          class Arg6, class Arg7, class Arg8, class Arg9, class Arg10>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<10, function_action<10> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9,
+      const Arg10
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
+     const Arg9& a9, const Arg10& a10) {
+  return
+    lambda_functor_base<
+      action<10, function_action<10> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+        const Arg8, const Arg9, const Arg10
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+        const Arg8, const Arg9, const Arg10
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
+    );
+}
+
+template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
+          class Arg5, class Arg6, class Arg7, class Arg8, class Arg9,
+          class Arg10>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<10, function_action<10, Result> >,
+    typename detail::bind_tuple_mapper<
+      typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
+      const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9,
+      const Arg10
+    >::type
+  >
+>
+
+bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
+     const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
+     const Arg9& a9, const Arg10& a10) {
+  return
+    lambda_functor_base<
+      action<10, function_action<10, Result> >,
+      typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+        const Arg8, const Arg9, const Arg10
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        typename detail::constify_non_funcs<Arg1>::type, const Arg2,
+        const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+        const Arg8, const Arg9, const Arg10
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
+    );
+}
+
+template <class Result, class Par1, class Par2, class Par3, class Par4,
+          class Par5, class Par6, class Par7, class Par8, class Par9,
+          class Arg2, class Arg3, class Arg4, class Arg5, class Arg6,
+          class Arg7, class Arg8, class Arg9, class Arg10>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<10, function_action<10, Result> >,
+    typename detail::bind_tuple_mapper<
+      Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
+      const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
+      const Arg8, const Arg9, const Arg10
+    >::type
+  >
+>
+
+bind(Result(* const & a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8,
+     Par9), const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
+     const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9,
+     const Arg10& a10) {
+  return
+    lambda_functor_base<
+      action<10, function_action<10, Result> >,
+      typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
+        const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
+        const Arg7, const Arg8, const Arg9, const Arg10
+      >::type
+    >
+    ( typename detail::bind_tuple_mapper<
+        Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
+        const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
+        const Arg7, const Arg8, const Arg9, const Arg10
+      >::type
+      (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
+    );
+}
+
+
+ #endif 
+
+} // namespace lambda 
+} // namespace ndnboost
+
+#endif
diff --git a/ndnboost/lambda/detail/function_adaptors.hpp b/ndnboost/lambda/detail/function_adaptors.hpp
new file mode 100644
index 0000000..df5367e
--- /dev/null
+++ b/ndnboost/lambda/detail/function_adaptors.hpp
@@ -0,0 +1,789 @@
+// Boost Lambda Library -  function_adaptors.hpp ----------------------------
+ 
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+
+#ifndef BOOST_LAMBDA_FUNCTION_ADAPTORS_HPP
+#define BOOST_LAMBDA_FUNCTION_ADAPTORS_HPP
+
+#include "ndnboost/mpl/has_xxx.hpp"
+#include "ndnboost/tuple/tuple.hpp"
+#include "ndnboost/type_traits/same_traits.hpp"
+#include "ndnboost/type_traits/remove_reference.hpp"
+#include "ndnboost/type_traits/remove_cv.hpp"
+#include "ndnboost/type_traits/add_const.hpp"
+#include "ndnboost/type_traits/add_volatile.hpp"
+#include "ndnboost/utility/result_of.hpp"
+
+namespace ndnboost { 
+namespace lambda {
+
+namespace detail {
+
+BOOST_MPL_HAS_XXX_TEMPLATE_DEF(sig)
+
+template<class Tuple>
+struct remove_references_from_elements {
+  typedef typename ndnboost::tuples::cons<
+    typename ndnboost::remove_reference<typename Tuple::head_type>::type,
+    typename remove_references_from_elements<typename Tuple::tail_type>::type
+  > type;
+};
+
+template<>
+struct remove_references_from_elements<ndnboost::tuples::null_type> {
+  typedef ndnboost::tuples::null_type type;
+};
+
+}
+
+template <class Func> struct function_adaptor {
+
+  typedef typename detail::remove_reference_and_cv<Func>::type plainF;
+
+#if !defined(BOOST_NO_RESULT_OF)
+  // Support functors that use the ndnboost::result_of return type convention.
+  template<class Tuple, int Length, bool HasSig>
+  struct result_converter;
+  template<class Tuple, int Length>
+  struct result_converter<Tuple, Length, true>
+    : plainF::template sig<
+        typename detail::remove_references_from_elements<Tuple>::type
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 0, false>
+    : result_of<plainF()>
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 1, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 2, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 3, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 4, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type,
+        typename tuples::element<4, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 5, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type,
+        typename tuples::element<4, Tuple>::type,
+        typename tuples::element<5, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 6, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type,
+        typename tuples::element<4, Tuple>::type,
+        typename tuples::element<5, Tuple>::type,
+        typename tuples::element<6, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 7, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type,
+        typename tuples::element<4, Tuple>::type,
+        typename tuples::element<5, Tuple>::type,
+        typename tuples::element<6, Tuple>::type,
+        typename tuples::element<7, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 8, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type,
+        typename tuples::element<4, Tuple>::type,
+        typename tuples::element<5, Tuple>::type,
+        typename tuples::element<6, Tuple>::type,
+        typename tuples::element<7, Tuple>::type,
+        typename tuples::element<8, Tuple>::type)
+      >
+  {};
+  template<class Tuple>
+  struct result_converter<Tuple, 9, false>
+    : result_of<plainF(
+        typename tuples::element<1, Tuple>::type,
+        typename tuples::element<2, Tuple>::type,
+        typename tuples::element<3, Tuple>::type,
+        typename tuples::element<4, Tuple>::type,
+        typename tuples::element<5, Tuple>::type,
+        typename tuples::element<6, Tuple>::type,
+        typename tuples::element<7, Tuple>::type,
+        typename tuples::element<8, Tuple>::type,
+        typename tuples::element<9, Tuple>::type)
+      >
+  {};
+
+  // we do not know the return type off-hand, we must ask it from Func
+  // To sig we pass a cons list, where the head is the function object type
+  // itself (potentially cv-qualified)
+  // and the tail contains the types of the actual arguments to be passed
+  // to the function object. The arguments can be cv qualified
+  // as well.
+  template <class Args>
+  struct sig
+    : result_converter<
+        Args
+      , tuples::length<typename Args::tail_type>::value
+      , detail::has_sig<plainF>::value
+      >
+  {};
+#else // BOOST_NO_RESULT_OF
+
+  template <class Args> class sig {
+    typedef typename detail::remove_reference_and_cv<Func>::type plainF;
+  public:
+    typedef typename plainF::template sig<
+      typename detail::remove_references_from_elements<Args>::type
+    >::type type;
+  };
+#endif
+
+  template<class RET, class A1>
+  static RET apply(A1& a1) {
+    return a1();
+  }
+  template<class RET, class A1, class A2>
+  static RET apply(A1& a1, A2& a2) {
+    return a1(a2);
+  }
+  template<class RET, class A1, class A2, class A3>
+  static RET apply(A1& a1, A2& a2, A3& a3) {
+    return a1(a2, a3);
+  }
+  template<class RET, class A1, class A2, class A3, class A4>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4) {
+    return a1(a2, a3, a4);
+  }
+  template<class RET, class A1, class A2, class A3, class A4, class A5>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return a1(a2, a3, a4, a5);
+  }
+  template<class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return a1(a2, a3, a4, a5, a6);
+  }
+  template<class RET, class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, 
+                           A7& a7) {
+    return a1(a2, a3, a4, a5, a6, a7);
+  }
+  template<class RET, class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7, class A8>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, 
+                           A7& a7, A8& a8) {
+    return a1(a2, a3, a4, a5, a6, a7, a8);
+  }
+  template<class RET, class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7, class A8, class A9>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, 
+                           A7& a7, A8& a8, A9& a9) {
+    return a1(a2, a3, a4, a5, a6, a7, a8, a9);
+  }
+  template<class RET, class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7, class A8, class A9, class A10>
+  static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, 
+                           A7& a7, A8& a8, A9& a9, A10& a10) {
+    return a1(a2, a3, a4, a5, a6, a7, a8, a9, a10);
+  }
+};
+
+template <class Func> struct function_adaptor<const Func>; // error 
+
+// -- function adaptors with data member access
+template <class Object, class T>
+struct function_adaptor<T Object::*> {
+
+  //  typedef detail::unspecified type;
+
+  // T can have qualifiers and can be a reference type
+  // We get the return type by adding const, if the object through which
+  // the data member is accessed is const, and finally adding a reference
+  template<class Args> class sig { 
+    typedef typename ndnboost::tuples::element<1, Args>::type argument_type;
+    typedef typename ndnboost::remove_reference<
+      argument_type
+    >::type unref_type;
+
+    typedef typename detail::IF<ndnboost::is_const<unref_type>::value,
+      typename ndnboost::add_const<T>::type,
+      T
+    >::RET properly_consted_return_type;
+
+    typedef typename detail::IF<ndnboost::is_volatile<unref_type>::value,
+      typename ndnboost::add_volatile<properly_consted_return_type>::type,
+      properly_consted_return_type
+    >::RET properly_cvd_return_type;
+
+
+  public:
+    typedef typename detail::IF<ndnboost::is_reference<argument_type>::value,
+      typename ndnboost::add_reference<properly_cvd_return_type>::type,
+      typename ndnboost::remove_cv<T>::type
+    >::RET type;
+  };
+
+  template <class RET>
+  static RET apply( T Object::*data, Object& o) {
+    return o.*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, const Object& o) {
+    return o.*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, volatile Object& o) {
+    return o.*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, const volatile Object& o) {
+    return o.*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, Object* o) {
+    return o->*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, const Object* o) {
+    return o->*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, volatile Object* o) {
+    return o->*data;
+  }
+  template <class RET>
+  static RET apply( T Object::*data, const volatile Object* o) {
+    return o->*data;
+  }
+};
+
+// -- function adaptors with 1 argument apply
+   
+template <class Result>
+struct function_adaptor<Result (void)> {
+  
+  template<class T> struct sig { typedef Result type; };
+  template <class RET>
+  static Result apply(Result (*func)()) {
+    return func();
+  }
+};
+
+template <class Result>
+struct function_adaptor<Result (*)(void)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET>
+  static Result apply(Result (*func)()) {
+    return func();
+  }
+};
+
+
+// -- function adaptors with 2 argument apply
+template <class Object, class Result>
+struct function_adaptor<Result (Object::*)() const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET>
+  static Result apply( Result (Object::*func)() const, const Object* o) {
+    return (o->*func)();
+  }
+  template <class RET>
+  static Result apply( Result (Object::*func)() const, const Object& o) {
+    return (o.*func)();
+  }
+};
+
+template <class Object, class Result>
+struct function_adaptor<Result (Object::*)()> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET>
+  static Result apply( Result (Object::*func)(), Object* o) {
+    return (o->*func)();
+  }
+  template <class RET>
+  static Result apply( Result (Object::*func)(), Object& o) {
+    return (o.*func)();
+  }
+};
+
+template <class Arg1, class Result>
+struct function_adaptor<Result (Arg1)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1>
+  static Result apply(Result (*func)(Arg1), A1& a1) {
+    return func(a1);
+  }
+};
+
+template <class Arg1, class Result>
+struct function_adaptor<Result (*)(Arg1)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1>
+  static Result apply(Result (*func)(Arg1), A1& a1) {
+    return func(a1);
+  }
+};
+
+
+// -- function adaptors with 3 argument apply
+template <class Object, class Arg1, class Result>
+struct function_adaptor<Result (Object::*)(Arg1) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1>
+  static Result apply( Result (Object::*func)(Arg1) const, const Object* o, 
+    A1& a1) {
+    return (o->*func)(a1);
+  }
+  template <class RET, class A1>
+  static Result apply( Result (Object::*func)(Arg1) const, const Object& o, 
+    A1& a1) {
+    return (o.*func)(a1);
+  }
+};
+
+template <class Object, class Arg1, class Result>
+struct function_adaptor<Result (Object::*)(Arg1)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1>
+  static Result apply( Result (Object::*func)(Arg1), Object* o, A1& a1) {
+    return (o->*func)(a1);
+  }
+  template <class RET, class A1>
+  static Result apply( Result (Object::*func)(Arg1), Object& o, A1& a1) {
+    return (o.*func)(a1);
+  }
+};
+
+template <class Arg1, class Arg2, class Result>
+struct function_adaptor<Result (Arg1, Arg2)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2>
+  static Result apply(Result (*func)(Arg1, Arg2), A1& a1, A2& a2) {
+    return func(a1, a2);
+  }
+};
+
+template <class Arg1, class Arg2, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2>
+  static Result apply(Result (*func)(Arg1, Arg2), A1& a1, A2& a2) {
+    return func(a1, a2);
+  }
+};
+
+
+// -- function adaptors with 4 argument apply
+template <class Object, class Arg1, class Arg2, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2>
+  static Result apply( Result (Object::*func)(Arg1, Arg2) const, const Object* o, A1& a1, A2& a2) {
+    return (o->*func)(a1, a2);
+  }
+  template <class RET, class A1, class A2>
+  static Result apply( Result (Object::*func)(Arg1, Arg2) const, const Object& o, A1& a1, A2& a2) {
+    return (o.*func)(a1, a2);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2>
+  static Result apply( Result (Object::*func)(Arg1, Arg2), Object* o, A1& a1, A2& a2) {
+    return (o->*func)(a1, a2);
+  }
+  template <class RET, class A1, class A2>
+  static Result apply( Result (Object::*func)(Arg1, Arg2), Object& o, A1& a1, A2& a2) {
+    return (o.*func)(a1, a2);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3), A1& a1, A2& a2, A3& a3) {
+    return func(a1, a2, a3);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3), A1& a1, A2& a2, A3& a3) {
+    return func(a1, a2, a3);
+  }
+};
+
+
+// -- function adaptors with 5 argument apply
+template <class Object, class Arg1, class Arg2, class Arg3, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3) const, const Object* o, A1& a1, A2& a2, A3& a3) {
+    return (o->*func)(a1, a2, a3);
+  }
+  template <class RET, class A1, class A2, class A3>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3) const, const Object& o, A1& a1, A2& a2, A3& a3) {
+    return (o.*func)(a1, a2, a3);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Arg3, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3), Object* o, A1& a1, A2& a2, A3& a3) {
+    return (o->*func)(a1, a2, a3);
+  }
+  template <class RET, class A1, class A2, class A3>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3), Object& o, A1& a1, A2& a2, A3& a3) {
+    return (o.*func)(a1, a2, a3);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4), A1& a1, A2& a2, A3& a3, A4& a4) {
+    return func(a1, a2, a3, a4);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4), A1& a1, A2& a2, A3& a3, A4& a4) {
+    return func(a1, a2, a3, a4);
+  }
+};
+
+
+// -- function adaptors with 6 argument apply
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4) {
+    return (o->*func)(a1, a2, a3, a4);
+  }
+  template <class RET, class A1, class A2, class A3, class A4>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4) {
+    return (o.*func)(a1, a2, a3, a4);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4), Object* o, A1& a1, A2& a2, A3& a3, A4& a4) {
+    return (o->*func)(a1, a2, a3, a4);
+  }
+  template <class RET, class A1, class A2, class A3, class A4>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4), Object& o, A1& a1, A2& a2, A3& a3, A4& a4) {
+    return (o.*func)(a1, a2, a3, a4);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return func(a1, a2, a3, a4, a5);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return func(a1, a2, a3, a4, a5);
+  }
+};
+
+
+// -- function adaptors with 7 argument apply
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return (o->*func)(a1, a2, a3, a4, a5);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return (o.*func)(a1, a2, a3, a4, a5);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return (o->*func)(a1, a2, a3, a4, a5);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
+    return (o.*func)(a1, a2, a3, a4, a5);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return func(a1, a2, a3, a4, a5, a6);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return func(a1, a2, a3, a4, a5, a6);
+  }
+};
+
+
+// -- function adaptors with 8 argument apply
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return (o->*func)(a1, a2, a3, a4, a5, a6);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return (o.*func)(a1, a2, a3, a4, a5, a6);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return (o->*func)(a1, a2, a3, a4, a5, a6);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
+    return (o.*func)(a1, a2, a3, a4, a5, a6);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return func(a1, a2, a3, a4, a5, a6, a7);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return func(a1, a2, a3, a4, a5, a6, a7);
+  }
+};
+
+
+// -- function adaptors with 9 argument apply
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return (o->*func)(a1, a2, a3, a4, a5, a6, a7);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return (o.*func)(a1, a2, a3, a4, a5, a6, a7);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return (o->*func)(a1, a2, a3, a4, a5, a6, a7);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
+    return (o.*func)(a1, a2, a3, a4, a5, a6, a7);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
+    return func(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
+    return func(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+};
+
+
+// -- function adaptors with 10 argument apply
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
+    return (o->*func)(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
+    return (o.*func)(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+};
+
+template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Result>
+struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
+    return (o->*func)(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+  static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
+    return (o.*func)(a1, a2, a3, a4, a5, a6, a7, a8);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9, class Result>
+struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) {
+    return func(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+  }
+};
+
+template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9, class Result>
+struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9)> {
+
+  template<class T> struct sig { typedef Result type; };
+  template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+  static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) {
+    return func(a1, a2, a3, a4, a5, a6, a7, a8, a9);
+  }
+};
+
+} // namespace lambda
+} // namespace ndnboost
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ndnboost/lambda/detail/is_instance_of.hpp b/ndnboost/lambda/detail/is_instance_of.hpp
new file mode 100644
index 0000000..3e91c66
--- /dev/null
+++ b/ndnboost/lambda/detail/is_instance_of.hpp
@@ -0,0 +1,104 @@
+// Boost Lambda Library - is_instance_of.hpp ---------------------
+
+// Copyright (C) 2001 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// ---------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_IS_INSTANCE_OF
+#define BOOST_LAMBDA_IS_INSTANCE_OF
+
+#include "ndnboost/config.hpp" // for BOOST_STATIC_CONSTANT
+#include "ndnboost/type_traits/conversion_traits.hpp" // for is_convertible
+#include "ndnboost/preprocessor/enum_shifted_params.hpp"
+#include "ndnboost/preprocessor/repeat_2nd.hpp"
+
+// is_instance_of --------------------------------
+// 
+// is_instance_of_n<A, B>::value is true, if type A is 
+// an instantiation of a template B, or A derives from an instantiation 
+// of template B
+//
+// n is the number of template arguments for B
+// 
+// Example:
+// is_instance_of_2<std::istream, basic_stream>::value == true
+
+// The original implementation was somewhat different, with different versions
+// for different compilers. However, there was still a problem
+// with gcc.3.0.2 and 3.0.3 compilers, which didn't think regard
+// is_instance_of_N<...>::value was a constant.
+// John Maddock suggested the way around this problem by building 
+// is_instance_of templates using ndnboost::is_convertible.
+// Now we only have one version of is_instance_of templates, which delagate
+// all the nasty compiler tricks to is_convertible. 
+
+#define BOOST_LAMBDA_CLASS(z, N,A) BOOST_PP_COMMA_IF(N) class
+#define BOOST_LAMBDA_CLASS_ARG(z, N,A) BOOST_PP_COMMA_IF(N) class A##N 
+#define BOOST_LAMBDA_ARG(z, N,A) BOOST_PP_COMMA_IF(N) A##N 
+
+#define BOOST_LAMBDA_CLASS_LIST(n, NAME) BOOST_PP_REPEAT(n, BOOST_LAMBDA_CLASS, NAME)
+
+#define BOOST_LAMBDA_CLASS_ARG_LIST(n, NAME) BOOST_PP_REPEAT(n, BOOST_LAMBDA_CLASS_ARG, NAME)
+
+#define BOOST_LAMBDA_ARG_LIST(n, NAME) BOOST_PP_REPEAT(n, BOOST_LAMBDA_ARG, NAME)
+
+namespace ndnboost {
+namespace lambda {
+
+#define BOOST_LAMBDA_IS_INSTANCE_OF_TEMPLATE(INDEX)                         \
+                                                                            \
+namespace detail {                                                          \
+                                                                            \
+template <template<BOOST_LAMBDA_CLASS_LIST(INDEX,T)> class F>               \
+struct BOOST_PP_CAT(conversion_tester_,INDEX) {                             \
+  template<BOOST_LAMBDA_CLASS_ARG_LIST(INDEX,A)>                            \
+  BOOST_PP_CAT(conversion_tester_,INDEX)                                    \
+    (const F<BOOST_LAMBDA_ARG_LIST(INDEX,A)>&);                             \
+};                                                                          \
+                                                                            \
+} /* end detail */                                                          \
+                                                                            \
+template <class From, template <BOOST_LAMBDA_CLASS_LIST(INDEX,T)> class To> \
+struct BOOST_PP_CAT(is_instance_of_,INDEX)                                  \
+{                                                                           \
+ private:                                                                   \
+   typedef ::ndnboost::is_convertible<                                         \
+     From,                                                                  \
+     BOOST_PP_CAT(detail::conversion_tester_,INDEX)<To>                     \
+   > helper_type;                                                           \
+                                                                            \
+public:                                                                     \
+  BOOST_STATIC_CONSTANT(bool, value = helper_type::value);                  \
+};
+
+
+#define BOOST_LAMBDA_HELPER(z, N, A) BOOST_LAMBDA_IS_INSTANCE_OF_TEMPLATE( BOOST_PP_INC(N) )
+
+// Generate the traits for 1-4 argument templates
+
+BOOST_PP_REPEAT_2ND(4,BOOST_LAMBDA_HELPER,FOO)
+
+#undef BOOST_LAMBDA_HELPER
+#undef BOOST_LAMBDA_IS_INSTANCE_OF_TEMPLATE
+#undef BOOST_LAMBDA_CLASS
+#undef BOOST_LAMBDA_ARG
+#undef BOOST_LAMBDA_CLASS_ARG
+#undef BOOST_LAMBDA_CLASS_LIST
+#undef BOOST_LAMBDA_ARG_LIST
+#undef BOOST_LAMBDA_CLASS_ARG_LIST
+
+} // lambda
+} // boost
+
+#endif
+
+
+
+
+
diff --git a/ndnboost/lambda/detail/lambda_config.hpp b/ndnboost/lambda/detail/lambda_config.hpp
new file mode 100644
index 0000000..9fd1a7b
--- /dev/null
+++ b/ndnboost/lambda/detail/lambda_config.hpp
@@ -0,0 +1,48 @@
+// Boost Lambda Library - lambda_config.hpp ------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// ---------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_LAMBDA_CONFIG_HPP
+#define BOOST_LAMBDA_LAMBDA_CONFIG_HPP
+
+// add to boost/config.hpp
+// for now
+
+
+# if defined __GNUC__
+#   if (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) 
+#     define BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
+#     define BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
+#   endif
+#   if (__GNUC__ == 2 && __GNUC_MINOR__ <= 97) 
+#     define BOOST_NO_TEMPLATED_STREAMS
+#     define BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
+#   endif
+#   if (__GNUC__ == 2 && __GNUC_MINOR__ <= 95) 
+#     define BOOST_LAMBDA_FAILS_IN_TEMPLATE_KEYWORD_AFTER_SCOPE_OPER
+#   endif
+# endif  // __GNUC__
+ 
+
+#if defined __KCC
+
+#define BOOST_NO_FDECL_TEMPLATES_AS_TEMPLATE_TEMPLATE_PARAMS
+
+#endif  // __KCC
+
+#endif
+
+
+
+
+
+
+
diff --git a/ndnboost/lambda/detail/lambda_functor_base.hpp b/ndnboost/lambda/detail/lambda_functor_base.hpp
new file mode 100644
index 0000000..2c90f56
--- /dev/null
+++ b/ndnboost/lambda/detail/lambda_functor_base.hpp
@@ -0,0 +1,615 @@
+// Boost Lambda Library  lambda_functor_base.hpp -----------------------------
+//
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// ------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_HPP
+#define BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_HPP
+
+#include "ndnboost/type_traits/add_reference.hpp"
+#include "ndnboost/type_traits/add_const.hpp"
+#include "ndnboost/type_traits/remove_const.hpp"
+#include "ndnboost/lambda/detail/lambda_fwd.hpp"
+#include "ndnboost/lambda/detail/lambda_traits.hpp"
+
+namespace ndnboost { 
+namespace lambda {
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(push)
+#pragma warning(disable:4512) //assignment operator could not be generated
+#endif
+
+  // for return type deductions we wrap bound argument to this class,
+  // which fulfils the base class contract for lambda_functors
+template <class T>
+class identity {
+
+  T elem;
+public:
+  
+  typedef T element_t;
+
+  // take all parameters as const references. Note that non-const references
+  // stay as they are.
+  typedef typename ndnboost::add_reference<
+    typename ndnboost::add_const<T>::type
+  >::type par_t;
+
+  explicit identity(par_t t) : elem(t) {}
+
+  template <typename SigArgs> 
+  struct sig { typedef typename ndnboost::remove_const<element_t>::type type; };
+
+  template<class RET, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const { CALL_USE_ARGS; return elem; }
+};
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(pop)
+#endif
+
+template <class T> 
+inline lambda_functor<identity<T&> > var(T& t) { return identity<T&>(t); }
+
+  // for lambda functors, var is an identity operator. It was forbidden
+  // at some point, but we might want to var something that can be a 
+  // non-lambda functor or a lambda functor.
+template <class T>
+lambda_functor<T> var(const lambda_functor<T>& t) { return t; }
+
+template <class T> struct var_type {
+  typedef lambda_functor<identity<T&> > type;
+};
+
+
+template <class T> 
+inline 
+lambda_functor<identity<typename bound_argument_conversion<const T>::type> >
+constant(const T& t) { 
+  return identity<typename bound_argument_conversion<const T>::type>(t); 
+}
+template <class T>
+lambda_functor<T> constant(const lambda_functor<T>& t) { return t; }
+
+template <class T> struct constant_type {
+  typedef 
+   lambda_functor<
+     identity<typename bound_argument_conversion<const T>::type> 
+   > type;
+};
+
+
+
+template <class T> 
+inline lambda_functor<identity<const T&> > constant_ref(const T& t) { 
+  return identity<const T&>(t); 
+}
+template <class T>
+lambda_functor<T> constant_ref(const lambda_functor<T>& t) { return t; }
+
+template <class T> struct constant_ref_type {
+  typedef 
+   lambda_functor<identity<const T&> > type;
+};
+
+
+
+  // as_lambda_functor turns any types to lambda functors 
+  // non-lambda_functors will be bound argument types
+template <class T>
+struct as_lambda_functor { 
+  typedef typename 
+    detail::remove_reference_and_cv<T>::type plain_T;
+  typedef typename 
+    detail::IF<is_lambda_functor<plain_T>::value, 
+      plain_T,
+      lambda_functor<
+        identity<typename bound_argument_conversion<T>::type> 
+      >
+    >::RET type; 
+};
+
+// turns arbitrary objects into lambda functors
+template <class T> 
+inline 
+lambda_functor<identity<typename bound_argument_conversion<const T>::type> > 
+to_lambda_functor(const T& t) { 
+  return identity<typename bound_argument_conversion<const T>::type>(t);
+}
+
+template <class T> 
+inline lambda_functor<T> 
+to_lambda_functor(const lambda_functor<T>& t) { 
+  return t;
+}
+
+namespace detail {   
+
+
+
+// In a call constify_rvals<T>::go(x)
+// x should be of type T. If T is a non-reference type, do
+// returns x as const reference. 
+// Otherwise the type doesn't change.
+// The purpose of this class is to avoid 
+// 'cannot bind temporaries to non-const references' errors.
+template <class T> struct constify_rvals {
+  template<class U>
+  static inline const U& go(const U& u) { return u; }
+};
+
+template <class T> struct constify_rvals<T&> {
+  template<class U>
+  static inline U& go(U& u) { return u; }
+};
+
+  // check whether one of the elements of a tuple (cons list) is of type
+  // null_type. Needed, because the compiler goes ahead and instantiates
+  // sig template for nullary case even if the nullary operator() is not
+  // called
+template <class T> struct is_null_type 
+{ BOOST_STATIC_CONSTANT(bool, value = false); };
+
+template <> struct is_null_type<null_type> 
+{ BOOST_STATIC_CONSTANT(bool, value = true); };
+
+template<class Tuple> struct has_null_type {
+  BOOST_STATIC_CONSTANT(bool, value = (is_null_type<typename Tuple::head_type>::value || has_null_type<typename Tuple::tail_type>::value));
+};
+template<> struct has_null_type<null_type> {
+  BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+
+// helpers -------------------
+
+
+template<class Args, class SigArgs>
+class deduce_argument_types_ {
+  typedef typename as_lambda_functor<typename Args::head_type>::type lf_t;
+  typedef typename lf_t::inherited::template sig<SigArgs>::type el_t;  
+public:
+  typedef
+    ndnboost::tuples::cons<
+      el_t, 
+      typename deduce_argument_types_<typename Args::tail_type, SigArgs>::type
+    > type;
+};
+
+template<class SigArgs>
+class deduce_argument_types_<null_type, SigArgs> {
+public:
+  typedef null_type type; 
+};
+
+
+//  // note that tuples cannot have plain function types as elements.
+//  // Hence, all other types will be non-const, except references to 
+//  // functions.
+//  template <class T> struct remove_reference_except_from_functions {
+//    typedef typename ndnboost::remove_reference<T>::type t;
+//    typedef typename detail::IF<ndnboost::is_function<t>::value, T, t>::RET type;
+//  };
+
+template<class Args, class SigArgs>
+class deduce_non_ref_argument_types_ {
+  typedef typename as_lambda_functor<typename Args::head_type>::type lf_t;
+  typedef typename lf_t::inherited::template sig<SigArgs>::type el_t;  
+public:
+  typedef
+    ndnboost::tuples::cons<
+  //      typename detail::remove_reference_except_from_functions<el_t>::type, 
+      typename ndnboost::remove_reference<el_t>::type, 
+      typename deduce_non_ref_argument_types_<typename Args::tail_type, SigArgs>::type
+    > type;
+};
+
+template<class SigArgs>
+class deduce_non_ref_argument_types_<null_type, SigArgs> {
+public:
+  typedef null_type type; 
+};
+
+  // -------------
+
+// take stored Args and Open Args, and return a const list with 
+// deduced elements (real return types)
+template<class Args, class SigArgs>
+class deduce_argument_types {
+  typedef typename deduce_argument_types_<Args, SigArgs>::type t1;
+public:
+  typedef typename detail::IF<
+    has_null_type<t1>::value, null_type, t1
+  >::RET type; 
+};
+
+// take stored Args and Open Args, and return a const list with 
+// deduced elements (references are stripped from the element types)
+
+template<class Args, class SigArgs>
+class deduce_non_ref_argument_types {
+  typedef typename deduce_non_ref_argument_types_<Args, SigArgs>::type t1;
+public:
+  typedef typename detail::IF<
+    has_null_type<t1>::value, null_type, t1
+  >::RET type; 
+};
+
+template <int N, class Args, class SigArgs>
+struct nth_return_type_sig {
+  typedef typename 
+          as_lambda_functor<
+            typename ndnboost::tuples::element<N, Args>::type 
+  //            typename tuple_element_as_reference<N, Args>::type 
+        >::type lf_type;
+
+  typedef typename lf_type::inherited::template sig<SigArgs>::type type;  
+};
+
+template<int N, class Tuple> struct element_or_null {
+  typedef typename ndnboost::tuples::element<N, Tuple>::type type;
+};
+
+template<int N> struct element_or_null<N, null_type> {
+  typedef null_type type;
+};
+
+
+   
+   
+} // end detail
+   
+ // -- lambda_functor base ---------------------
+
+// the explicit_return_type_action case -----------------------------------
+template<class RET, class Args>
+class lambda_functor_base<explicit_return_type_action<RET>, Args> 
+{
+public:
+  Args args;
+
+  typedef RET result_type;
+
+  explicit lambda_functor_base(const Args& a) : args(a) {}
+
+  template <class SigArgs> struct sig { typedef RET type; };
+
+  template<class RET_, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const 
+  {
+    return detail::constify_rvals<RET>::go(
+     detail::r_select<RET>::go(ndnboost::tuples::get<0>(args), CALL_ACTUAL_ARGS));
+  }
+};
+
+// the protect_action case -----------------------------------
+template<class Args>
+class lambda_functor_base<protect_action, Args>
+{
+public:
+  Args args;
+public:
+
+  explicit lambda_functor_base(const Args& a) : args(a) {}
+
+
+  template<class RET, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const 
+  {
+     CALL_USE_ARGS;
+     return ndnboost::tuples::get<0>(args);
+  }
+
+  template<class SigArgs> struct sig { 
+    //    typedef typename detail::tuple_element_as_reference<0, SigArgs>::type type;
+    typedef typename ndnboost::tuples::element<0, Args>::type type;
+  };
+};
+
+// Do nothing --------------------------------------------------------
+class do_nothing_action {};
+
+template<class Args>
+class lambda_functor_base<do_nothing_action, Args> {
+  //  Args args;
+public:
+  //  explicit lambda_functor_base(const Args& a) {}
+  lambda_functor_base() {}
+
+
+  template<class RET, CALL_TEMPLATE_ARGS> RET call(CALL_FORMAL_ARGS) const {
+    return CALL_USE_ARGS;
+  }
+
+  template<class SigArgs> struct sig { typedef void type; };
+};  
+
+
+//  These specializations provide a shorter notation to define actions.
+//  These lambda_functor_base instances take care of the recursive evaluation
+//  of the arguments and pass the evaluated arguments to the apply function
+//  of an action class. To make action X work with these classes, one must
+//  instantiate the lambda_functor_base as:
+//  lambda_functor_base<action<ARITY, X>, Args>
+//  Where ARITY is the arity of the apply function in X
+
+//  The return type is queried as:
+//  return_type_N<X, EvaluatedArgumentTypes>::type
+//  for which there must be a specialization.
+
+//  Function actions, casts, throws,... all go via these classes.
+
+
+template<class Act, class Args>  
+class lambda_functor_base<action<0, Act>, Args>           
+{  
+public:  
+//  Args args; not needed
+  explicit lambda_functor_base(const Args& /*a*/) {}  
+  
+  template<class SigArgs> struct sig {  
+    typedef typename return_type_N<Act, null_type>::type type;
+  };
+  
+  template<class RET, CALL_TEMPLATE_ARGS>  
+  RET call(CALL_FORMAL_ARGS) const {  
+    CALL_USE_ARGS;
+    return Act::template apply<RET>();
+  }
+};
+
+
+#if defined BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART  
+#error "Multiple defines of BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART"  
+#endif  
+  
+  
+#define BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(ARITY)             \
+template<class Act, class Args>                                        \
+class lambda_functor_base<action<ARITY, Act>, Args>                    \
+{                                                                      \
+public:                                                                \
+  Args args;                                                           \
+                                                                       \
+  explicit lambda_functor_base(const Args& a) : args(a) {}             \
+                                                                       \
+  template<class SigArgs> struct sig {                                 \
+    typedef typename                                                   \
+    detail::deduce_argument_types<Args, SigArgs>::type rets_t;         \
+  public:                                                              \
+    typedef typename                                                   \
+      return_type_N_prot<Act, rets_t>::type type;                      \
+  };                                                                   \
+                                                                       \
+                                                                       \
+  template<class RET, CALL_TEMPLATE_ARGS>                              \
+  RET call(CALL_FORMAL_ARGS) const {                                   \
+    using ndnboost::tuples::get;                                          \
+    using detail::constify_rvals;                                      \
+    using detail::r_select;                                            \
+    using detail::element_or_null;                                     \
+    using detail::deduce_argument_types;                                
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(1)
+
+  typedef typename
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(2)
+  
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(3)
+
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(4)
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(5)
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+  typedef typename element_or_null<4, rets_t>::type rt4;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(6)
+
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+  typedef typename element_or_null<4, rets_t>::type rt4;
+  typedef typename element_or_null<5, rets_t>::type rt5;
+
+
+    return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), CALL_ACTUAL_ARGS)) 
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(7)
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+  typedef typename element_or_null<4, rets_t>::type rt4;
+  typedef typename element_or_null<5, rets_t>::type rt5;
+  typedef typename element_or_null<6, rets_t>::type rt6;
+
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt6>::go(r_select<rt6>::go(get<6>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(8)
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+  typedef typename element_or_null<4, rets_t>::type rt4;
+  typedef typename element_or_null<5, rets_t>::type rt5;
+  typedef typename element_or_null<6, rets_t>::type rt6;
+  typedef typename element_or_null<7, rets_t>::type rt7;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt6>::go(r_select<rt6>::go(get<6>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt7>::go(r_select<rt7>::go(get<7>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(9)
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+  typedef typename element_or_null<4, rets_t>::type rt4;
+  typedef typename element_or_null<5, rets_t>::type rt5;
+  typedef typename element_or_null<6, rets_t>::type rt6;
+  typedef typename element_or_null<7, rets_t>::type rt7;
+  typedef typename element_or_null<8, rets_t>::type rt8;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt6>::go(r_select<rt6>::go(get<6>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt7>::go(r_select<rt7>::go(get<7>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt8>::go(r_select<rt8>::go(get<8>(args), CALL_ACTUAL_ARGS))
+    );
+  }
+};
+
+BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART(10) 
+  typedef typename 
+    deduce_argument_types<Args, tuple<CALL_REFERENCE_TYPES> >::type rets_t;
+  typedef typename element_or_null<0, rets_t>::type rt0;
+  typedef typename element_or_null<1, rets_t>::type rt1;
+  typedef typename element_or_null<2, rets_t>::type rt2;
+  typedef typename element_or_null<3, rets_t>::type rt3;
+  typedef typename element_or_null<4, rets_t>::type rt4;
+  typedef typename element_or_null<5, rets_t>::type rt5;
+  typedef typename element_or_null<6, rets_t>::type rt6;
+  typedef typename element_or_null<7, rets_t>::type rt7;
+  typedef typename element_or_null<8, rets_t>::type rt8;
+  typedef typename element_or_null<9, rets_t>::type rt9;
+
+  return Act::template apply<RET>(
+    constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt6>::go(r_select<rt6>::go(get<6>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt7>::go(r_select<rt7>::go(get<7>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt8>::go(r_select<rt8>::go(get<8>(args), CALL_ACTUAL_ARGS)),
+    constify_rvals<rt9>::go(r_select<rt9>::go(get<9>(args), CALL_ACTUAL_ARGS)) 
+    );
+  }
+};
+
+#undef BOOST_LAMBDA_LAMBDA_FUNCTOR_BASE_FIRST_PART
+
+
+} // namespace lambda
+} // namespace ndnboost
+
+#endif
diff --git a/ndnboost/lambda/detail/lambda_functors.hpp b/ndnboost/lambda/detail/lambda_functors.hpp
new file mode 100644
index 0000000..a6a9a7c
--- /dev/null
+++ b/ndnboost/lambda/detail/lambda_functors.hpp
@@ -0,0 +1,357 @@
+// Boost Lambda Library -  lambda_functors.hpp -------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org
+
+// ------------------------------------------------
+
+#ifndef BOOST_LAMBDA_LAMBDA_FUNCTORS_HPP
+#define BOOST_LAMBDA_LAMBDA_FUNCTORS_HPP
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/detail/workaround.hpp>
+#include <ndnboost/utility/result_of.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+
+#include <ndnboost/mpl/or.hpp>
+#include <ndnboost/utility/enable_if.hpp>
+#include <ndnboost/type_traits/is_array.hpp>
+
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY1(A1, R1)\
+  typename lazy_disable_if<is_array<A1>, typename R1 >::type
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY2(A1, A2, R1, R2) \
+  typename lazy_disable_if<mpl::or_<is_array<A1>, is_array<A2> >, typename R1, R2 >::type
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY3(A1, A2, A3, R1, R2, R3) \
+  typename lazy_disable_if<mpl::or_<is_array<A1>, is_array<A2>, is_array<A3> >, typename R1, R2, R3 >::type
+
+#else
+
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY1(A1, R1) typename R1::type
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY2(A1, A2, R1, R2) typename R1, R2::type
+#define BOOST_LAMBDA_DISABLE_IF_ARRAY3(A1, A2, A3, R1, R2, R3) typename R1, R2, R3::type
+
+#endif
+
+namespace ndnboost { 
+namespace lambda {
+
+// -- lambda_functor --------------------------------------------
+// --------------------------------------------------------------
+
+//inline const null_type const_null_type() { return null_type(); }
+
+namespace detail {
+namespace {
+
+  static const null_type constant_null_type = null_type();
+
+} // unnamed
+} // detail
+
+class unused {};
+
+#define cnull_type() detail::constant_null_type
+
+// -- free variables types -------------------------------------------------- 
+ 
+  // helper to work around the case where the nullary return type deduction 
+  // is always performed, even though the functor is not nullary  
+namespace detail {
+  template<int N, class Tuple> struct get_element_or_null_type {
+    typedef typename 
+      detail::tuple_element_as_reference<N, Tuple>::type type;
+  };
+  template<int N> struct get_element_or_null_type<N, null_type> {
+    typedef null_type type;
+  };
+}
+
+template <int I> struct placeholder;
+
+template<> struct placeholder<FIRST> {
+
+  template<class SigArgs> struct sig {
+    typedef typename detail::get_element_or_null_type<0, SigArgs>::type type;
+  };
+
+  template<class RET, CALL_TEMPLATE_ARGS> 
+  RET call(CALL_FORMAL_ARGS) const { 
+    BOOST_STATIC_ASSERT(ndnboost::is_reference<RET>::value); 
+    CALL_USE_ARGS; // does nothing, prevents warnings for unused args
+    return a; 
+  }
+};
+
+template<> struct placeholder<SECOND> {
+
+  template<class SigArgs> struct sig {
+    typedef typename detail::get_element_or_null_type<1, SigArgs>::type type;
+  };
+
+  template<class RET, CALL_TEMPLATE_ARGS> 
+  RET call(CALL_FORMAL_ARGS) const { CALL_USE_ARGS; return b; }
+};
+
+template<> struct placeholder<THIRD> {
+
+  template<class SigArgs> struct sig {
+    typedef typename detail::get_element_or_null_type<2, SigArgs>::type type;
+  };
+
+  template<class RET, CALL_TEMPLATE_ARGS> 
+  RET call(CALL_FORMAL_ARGS) const { CALL_USE_ARGS; return c; }
+};
+
+template<> struct placeholder<EXCEPTION> {
+
+  template<class SigArgs> struct sig {
+    typedef typename detail::get_element_or_null_type<3, SigArgs>::type type;
+  };
+
+  template<class RET, CALL_TEMPLATE_ARGS> 
+  RET call(CALL_FORMAL_ARGS) const { CALL_USE_ARGS; return env; }
+};
+   
+typedef const lambda_functor<placeholder<FIRST> >  placeholder1_type;
+typedef const lambda_functor<placeholder<SECOND> > placeholder2_type;
+typedef const lambda_functor<placeholder<THIRD> >  placeholder3_type;
+   
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+// free variables are lambda_functors. This is to allow uniform handling with 
+// other lambda_functors.
+// -------------------------------------------------------------------
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(push)
+#pragma warning(disable:4512) //assignment operator could not be generated
+#endif
+
+// -- lambda_functor NONE ------------------------------------------------
+template <class T>
+class lambda_functor : public T 
+{
+
+BOOST_STATIC_CONSTANT(int, arity_bits = get_arity<T>::value);
+ 
+public:
+  typedef T inherited;
+
+  lambda_functor() {}
+  lambda_functor(const lambda_functor& l) : inherited(l) {}
+
+  lambda_functor(const T& t) : inherited(t) {}
+
+  template <class SigArgs> struct sig {
+    typedef typename inherited::template 
+      sig<typename SigArgs::tail_type>::type type;
+  };
+
+  // Note that this return type deduction template is instantiated, even 
+  // if the nullary 
+  // operator() is not called at all. One must make sure that it does not fail.
+  typedef typename 
+    inherited::template sig<null_type>::type
+      nullary_return_type;
+
+  // Support for ndnboost::result_of.
+  template <class Sig> struct result;
+  template <class F>
+  struct result<F()> {
+    typedef nullary_return_type type;
+  };
+  template <class F, class A>
+  struct result<F(A)> {
+    typedef typename sig<tuple<F, A> >::type type;
+  };
+  template <class F, class A, class B>
+  struct result<F(A, B)> {
+    typedef typename sig<tuple<F, A, B> >::type type;
+  };
+  template <class F, class A, class B, class C>
+  struct result<F(A, B, C)> {
+    typedef typename sig<tuple<F, A, B, C> >::type type;
+  };
+
+  nullary_return_type operator()() const { 
+    return inherited::template 
+      call<nullary_return_type>
+        (cnull_type(), cnull_type(), cnull_type(), cnull_type()); 
+  }
+
+  template<class A>
+  typename inherited::template sig<tuple<A&> >::type
+  operator()(A& a) const { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A&> >::type
+    >(a, cnull_type(), cnull_type(), cnull_type());
+  }
+
+  template<class A>
+  BOOST_LAMBDA_DISABLE_IF_ARRAY1(A, inherited::template sig<tuple<A const&> >)
+  operator()(A const& a) const { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A const&> >::type
+    >(a, cnull_type(), cnull_type(), cnull_type());
+  }
+
+  template<class A, class B>
+  typename inherited::template sig<tuple<A&, B&> >::type
+  operator()(A& a, B& b) const { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A&, B&> >::type
+    >(a, b, cnull_type(), cnull_type()); 
+  }
+
+  template<class A, class B>
+  BOOST_LAMBDA_DISABLE_IF_ARRAY2(A, B, inherited::template sig<tuple<A const&, B&> >)
+  operator()(A const& a, B& b) const { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A const&, B&> >::type
+    >(a, b, cnull_type(), cnull_type()); 
+  }
+
+  template<class A, class B>
+  BOOST_LAMBDA_DISABLE_IF_ARRAY2(A, B, inherited::template sig<tuple<A&, B const&> >)
+  operator()(A& a, B const& b) const { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A&, B const&> >::type
+    >(a, b, cnull_type(), cnull_type()); 
+  }
+
+  template<class A, class B>
+  BOOST_LAMBDA_DISABLE_IF_ARRAY2(A, B, inherited::template sig<tuple<A const&, B const&> >)
+  operator()(A const& a, B const& b) const { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A const&, B const&> >::type
+    >(a, b, cnull_type(), cnull_type()); 
+  }
+
+  template<class A, class B, class C>
+  typename inherited::template sig<tuple<A&, B&, C&> >::type
+  operator()(A& a, B& b, C& c) const
+  { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A&, B&, C&> >::type
+    >(a, b, c, cnull_type()); 
+  }
+
+  template<class A, class B, class C>
+  BOOST_LAMBDA_DISABLE_IF_ARRAY3(A, B, C, inherited::template sig<tuple<A const&, B const&, C const&> >)
+  operator()(A const& a, B const& b, C const& c) const
+  { 
+    return inherited::template call<
+      typename inherited::template sig<tuple<A const&, B const&, C const&> >::type
+    >(a, b, c, cnull_type()); 
+  }
+
+  // for internal calls with env
+  template<CALL_TEMPLATE_ARGS>
+  typename inherited::template sig<tuple<CALL_REFERENCE_TYPES> >::type
+  internal_call(CALL_FORMAL_ARGS) const { 
+     return inherited::template 
+       call<typename inherited::template 
+         sig<tuple<CALL_REFERENCE_TYPES> >::type>(CALL_ACTUAL_ARGS); 
+  }
+
+  template<class A>
+  const lambda_functor<lambda_functor_base<
+                  other_action<assignment_action>,
+                  ndnboost::tuple<lambda_functor,
+                  typename const_copy_argument <const A>::type> > >
+  operator=(const A& a) const {
+    return lambda_functor_base<
+                  other_action<assignment_action>,
+                  ndnboost::tuple<lambda_functor,
+                  typename const_copy_argument <const A>::type> >
+     (  ndnboost::tuple<lambda_functor,
+             typename const_copy_argument <const A>::type>(*this, a) );
+  }
+
+  template<class A> 
+  const lambda_functor<lambda_functor_base< 
+                  other_action<subscript_action>, 
+                  ndnboost::tuple<lambda_functor, 
+                        typename const_copy_argument <const A>::type> > > 
+  operator[](const A& a) const { 
+    return lambda_functor_base< 
+                  other_action<subscript_action>, 
+                  ndnboost::tuple<lambda_functor, 
+                        typename const_copy_argument <const A>::type> >
+     ( ndnboost::tuple<lambda_functor, 
+             typename const_copy_argument <const A>::type>(*this, a ) ); 
+  } 
+};
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(pop)
+#endif
+
+} // namespace lambda
+} // namespace ndnboost
+
+namespace ndnboost {
+
+#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_DECLTYPE)
+
+template<class T>
+struct result_of<ndnboost::lambda::lambda_functor<T>()>
+{
+    typedef typename ndnboost::lambda::lambda_functor<T>::nullary_return_type type;
+};
+
+template<class T>
+struct result_of<const ndnboost::lambda::lambda_functor<T>()>
+{
+    typedef typename ndnboost::lambda::lambda_functor<T>::nullary_return_type type;
+};
+
+#endif
+
+template<class T>
+struct tr1_result_of<ndnboost::lambda::lambda_functor<T>()>
+{
+    typedef typename ndnboost::lambda::lambda_functor<T>::nullary_return_type type;
+};
+
+template<class T>
+struct tr1_result_of<const ndnboost::lambda::lambda_functor<T>()>
+{
+    typedef typename ndnboost::lambda::lambda_functor<T>::nullary_return_type type;
+};
+
+}
+
+// is_placeholder
+
+#include <ndnboost/is_placeholder.hpp>
+
+namespace ndnboost
+{
+
+template<> struct is_placeholder< lambda::lambda_functor< lambda::placeholder<lambda::FIRST> > >
+{
+    enum _vt { value = 1 };
+};
+
+template<> struct is_placeholder< lambda::lambda_functor< lambda::placeholder<lambda::SECOND> > >
+{
+    enum _vt { value = 2 };
+};
+
+template<> struct is_placeholder< lambda::lambda_functor< lambda::placeholder<lambda::THIRD> > >
+{
+    enum _vt { value = 3 };
+};
+
+} // namespace ndnboost
+
+#endif
diff --git a/ndnboost/lambda/detail/lambda_fwd.hpp b/ndnboost/lambda/detail/lambda_fwd.hpp
new file mode 100644
index 0000000..e0253b7
--- /dev/null
+++ b/ndnboost/lambda/detail/lambda_fwd.hpp
@@ -0,0 +1,74 @@
+//  lambda_fwd.hpp - Boost Lambda Library -------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// -------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_FWD_HPP
+#define BOOST_LAMBDA_FWD_HPP
+
+namespace ndnboost { 
+namespace lambda { 
+
+namespace detail {
+
+template<class T> struct generate_error;
+
+}   
+// -- placeholders --------------------------------------------
+
+template <int I> struct placeholder;
+
+// function_adaptors
+template <class Func> 
+struct function_adaptor;
+
+template <int I, class Act> class action;
+
+template <class Base> 
+class lambda_functor;
+
+template <class Act, class Args> 
+class lambda_functor_base;
+
+} // namespace lambda
+} // namespace ndnboost
+
+
+//  #define CALL_TEMPLATE_ARGS class A, class Env
+//  #define CALL_FORMAL_ARGS A& a, Env& env
+//  #define CALL_ACTUAL_ARGS a, env
+//  #define CALL_ACTUAL_ARGS_NO_ENV a
+//  #define CALL_REFERENCE_TYPES A&, Env&
+//  #define CALL_PLAIN_TYPES A, Env
+#define CALL_TEMPLATE_ARGS class A, class B, class C, class Env
+#define CALL_FORMAL_ARGS A& a, B& b, C& c, Env& env
+#define CALL_ACTUAL_ARGS a, b, c, env
+#define CALL_ACTUAL_ARGS_NO_ENV a, b, c
+#define CALL_REFERENCE_TYPES A&, B&, C&, Env&
+#define CALL_PLAIN_TYPES A, B, C, Env
+
+namespace ndnboost {
+namespace lambda {
+namespace detail {
+
+template<class A1, class A2, class A3, class A4>
+void do_nothing(A1&, A2&, A3&, A4&) {}
+
+} // detail
+} // lambda
+} // boost
+
+// prevent the warnings from unused arguments
+#define CALL_USE_ARGS \
+::ndnboost::lambda::detail::do_nothing(a, b, c, env)
+
+
+
+#endif
diff --git a/ndnboost/lambda/detail/lambda_traits.hpp b/ndnboost/lambda/detail/lambda_traits.hpp
new file mode 100644
index 0000000..aa241b6
--- /dev/null
+++ b/ndnboost/lambda/detail/lambda_traits.hpp
@@ -0,0 +1,578 @@
+// - lambda_traits.hpp --- Boost Lambda Library ----------------------------
+//
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+// -------------------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_LAMBDA_TRAITS_HPP
+#define BOOST_LAMBDA_LAMBDA_TRAITS_HPP
+
+#include "ndnboost/type_traits/transform_traits.hpp"
+#include "ndnboost/type_traits/cv_traits.hpp"
+#include "ndnboost/type_traits/function_traits.hpp"
+#include "ndnboost/type_traits/object_traits.hpp"
+#include "ndnboost/tuple/tuple.hpp"
+
+namespace ndnboost {
+namespace lambda {
+
+// -- if construct ------------------------------------------------
+// Proposed by Krzysztof Czarnecki and Ulrich Eisenecker
+
+namespace detail {
+
+template <bool If, class Then, class Else> struct IF { typedef Then RET; };
+
+template <class Then, class Else> struct IF<false, Then, Else> {
+  typedef Else RET;
+};
+
+
+// An if construct that doesn't instantiate the non-matching template:
+
+// Called as: 
+//  IF_type<condition, A, B>::type 
+// The matching template must define the typeded 'type'
+// I.e. A::type if condition is true, B::type if condition is false
+// Idea from Vesa Karvonen (from C&E as well I guess)
+template<class T>
+struct IF_type_
+{
+  typedef typename T::type type;
+};
+
+
+template<bool C, class T, class E>
+struct IF_type
+{
+  typedef typename
+    IF_type_<typename IF<C, T, E>::RET >::type type;
+};
+
+// helper that can be used to give typedef T to some type
+template <class T> struct identity_mapping { typedef T type; };
+
+// An if construct for finding an integral constant 'value'
+// Does not instantiate the non-matching branch
+// Called as IF_value<condition, A, B>::value
+// If condition is true A::value must be defined, otherwise B::value
+
+template<class T>
+struct IF_value_
+{
+  BOOST_STATIC_CONSTANT(int, value = T::value);
+};
+
+
+template<bool C, class T, class E>
+struct IF_value
+{
+  BOOST_STATIC_CONSTANT(int, value = (IF_value_<typename IF<C, T, E>::RET>::value));
+};
+
+
+// --------------------------------------------------------------
+
+// removes reference from other than function types:
+template<class T> class remove_reference_if_valid
+{
+
+  typedef typename ndnboost::remove_reference<T>::type plainT;
+public:
+  typedef typename IF<
+    ndnboost::is_function<plainT>::value,
+    T,
+    plainT
+  >::RET type;
+
+};
+
+
+template<class T> struct remove_reference_and_cv {
+   typedef typename ndnboost::remove_cv<
+     typename ndnboost::remove_reference<T>::type
+   >::type type;
+};
+
+
+   
+// returns a reference to the element of tuple T
+template<int N, class T> struct tuple_element_as_reference {   
+  typedef typename
+     ndnboost::tuples::access_traits<
+       typename ndnboost::tuples::element<N, T>::type
+     >::non_const_type type;
+};
+
+// returns the cv and reverence stripped type of a tuple element
+template<int N, class T> struct tuple_element_stripped {   
+  typedef typename
+     remove_reference_and_cv<
+       typename ndnboost::tuples::element<N, T>::type
+     >::type type;
+};
+
+// is_lambda_functor -------------------------------------------------   
+
+template <class T> struct is_lambda_functor_ {
+  BOOST_STATIC_CONSTANT(bool, value = false);
+};
+   
+template <class Arg> struct is_lambda_functor_<lambda_functor<Arg> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+   
+} // end detail
+
+   
+template <class T> struct is_lambda_functor {
+  BOOST_STATIC_CONSTANT(bool, 
+     value = 
+       detail::is_lambda_functor_<
+         typename detail::remove_reference_and_cv<T>::type
+       >::value);
+};
+   
+
+namespace detail {
+
+// -- parameter_traits_ ---------------------------------------------
+
+// An internal parameter type traits class that respects
+// the reference_wrapper class.
+
+// The conversions performed are:
+// references -> compile_time_error
+// T1 -> T2, 
+// reference_wrapper<T> -> T&
+// const array -> ref to const array
+// array -> ref to array
+// function -> ref to function
+
+// ------------------------------------------------------------------------
+
+template<class T1, class T2> 
+struct parameter_traits_ {
+  typedef T2 type;
+};
+
+// Do not instantiate with reference types
+template<class T, class Any> struct parameter_traits_<T&, Any> {
+  typedef typename 
+    generate_error<T&>::
+      parameter_traits_class_instantiated_with_reference_type type;
+};
+
+// Arrays can't be stored as plain types; convert them to references
+template<class T, int n, class Any> struct parameter_traits_<T[n], Any> {
+  typedef T (&type)[n];
+};
+   
+template<class T, int n, class Any> 
+struct parameter_traits_<const T[n], Any> {
+  typedef const T (&type)[n];
+};
+
+template<class T, int n, class Any> 
+struct parameter_traits_<volatile T[n], Any> {
+  typedef volatile  T (&type)[n];
+};
+template<class T, int n, class Any> 
+struct parameter_traits_<const volatile T[n], Any> {
+  typedef const volatile T (&type)[n];
+};
+
+
+template<class T, class Any> 
+struct parameter_traits_<ndnboost::reference_wrapper<T>, Any >{
+  typedef T& type;
+};
+
+template<class T, class Any> 
+struct parameter_traits_<const ndnboost::reference_wrapper<T>, Any >{
+  typedef T& type;
+};
+
+template<class T, class Any> 
+struct parameter_traits_<volatile ndnboost::reference_wrapper<T>, Any >{
+  typedef T& type;
+};
+
+template<class T, class Any> 
+struct parameter_traits_<const volatile ndnboost::reference_wrapper<T>, Any >{
+  typedef T& type;
+};
+
+template<class Any>
+struct parameter_traits_<void, Any> {
+  typedef void type;
+};
+
+template<class Arg, class Any>
+struct parameter_traits_<lambda_functor<Arg>, Any > {
+  typedef lambda_functor<Arg> type;
+};
+
+template<class Arg, class Any>
+struct parameter_traits_<const lambda_functor<Arg>, Any > {
+  typedef lambda_functor<Arg> type;
+};
+
+// Are the volatile versions needed?
+template<class Arg, class Any>
+struct parameter_traits_<volatile lambda_functor<Arg>, Any > {
+  typedef lambda_functor<Arg> type;
+};
+
+template<class Arg, class Any>
+struct parameter_traits_<const volatile lambda_functor<Arg>, Any > {
+  typedef lambda_functor<Arg> type;
+};
+
+} // end namespace detail
+
+
+// ------------------------------------------------------------------------
+// traits classes for lambda expressions (bind functions, operators ...)   
+
+// must be instantiated with non-reference types
+
+// The default is const plain type -------------------------
+// const T -> const T, 
+// T -> const T, 
+// references -> compile_time_error
+// reference_wrapper<T> -> T&
+// array -> const ref array
+template<class T>
+struct const_copy_argument {
+  typedef typename 
+    detail::parameter_traits_<
+      T,
+      typename detail::IF<ndnboost::is_function<T>::value, T&, const T>::RET
+    >::type type;
+};
+
+// T may be a function type. Without the IF test, const would be added 
+// to a function type, which is illegal.
+
+// all arrays are converted to const.
+// This traits template is used for 'const T&' parameter passing 
+// and thus the knowledge of the potential 
+// non-constness of an actual argument is lost.   
+template<class T, int n>  struct const_copy_argument <T[n]> {
+  typedef const T (&type)[n];
+};
+template<class T, int n>  struct const_copy_argument <volatile T[n]> {
+     typedef const volatile T (&type)[n];
+};
+   
+template<class T>
+struct const_copy_argument<T&> {};
+// do not instantiate with references
+  //  typedef typename detail::generate_error<T&>::references_not_allowed type;
+
+
+template<>
+struct const_copy_argument<void> {
+  typedef void type;
+};
+
+
+// Does the same as const_copy_argument, but passes references through as such
+template<class T>
+struct bound_argument_conversion {
+  typedef typename const_copy_argument<T>::type type; 
+};
+
+template<class T>
+struct bound_argument_conversion<T&> {
+  typedef T& type; 
+};
+   
+// The default is non-const reference -------------------------
+// const T -> const T&, 
+// T -> T&, 
+// references -> compile_time_error
+// reference_wrapper<T> -> T&
+template<class T>
+struct reference_argument {
+  typedef typename detail::parameter_traits_<T, T&>::type type; 
+};
+
+template<class T>
+struct reference_argument<T&> {
+  typedef typename detail::generate_error<T&>::references_not_allowed type; 
+};
+
+template<class Arg>
+struct reference_argument<lambda_functor<Arg> > {
+  typedef lambda_functor<Arg> type;
+};
+
+template<class Arg>
+struct reference_argument<const lambda_functor<Arg> > {
+  typedef lambda_functor<Arg> type;
+};
+
+// Are the volatile versions needed?
+template<class Arg>
+struct reference_argument<volatile lambda_functor<Arg> > {
+  typedef lambda_functor<Arg> type;
+};
+
+template<class Arg>
+struct reference_argument<const volatile lambda_functor<Arg> > {
+  typedef lambda_functor<Arg> type;
+};
+
+template<>
+struct reference_argument<void> {
+  typedef void type;
+};
+
+namespace detail {
+   
+// Array to pointer conversion
+template <class T>
+struct array_to_pointer { 
+  typedef T type;
+};
+
+template <class T, int N>
+struct array_to_pointer <const T[N]> { 
+  typedef const T* type;
+};
+template <class T, int N>
+struct array_to_pointer <T[N]> { 
+  typedef T* type;
+};
+
+template <class T, int N>
+struct array_to_pointer <const T (&) [N]> { 
+  typedef const T* type;
+};
+template <class T, int N>
+struct array_to_pointer <T (&) [N]> { 
+  typedef T* type;
+};
+
+
+// ---------------------------------------------------------------------------
+// The call_traits for bind
+// Respects the reference_wrapper class.
+
+// These templates are used outside of bind functions as well.
+// the bind_tuple_mapper provides a shorter notation for default
+// bound argument storing semantics, if all arguments are treated
+// uniformly.
+
+// from template<class T> foo(const T& t) : bind_traits<const T>::type
+// from template<class T> foo(T& t) : bind_traits<T>::type
+
+// Conversions:
+// T -> const T,
+// cv T -> cv T, 
+// T& -> T& 
+// reference_wrapper<T> -> T&
+// const reference_wrapper<T> -> T&
+// array -> const ref array
+
+// make bound arguments const, this is a deliberate design choice, the
+// purpose is to prevent side effects to bound arguments that are stored
+// as copies
+template<class T>
+struct bind_traits {
+  typedef const T type; 
+};
+
+template<class T>
+struct bind_traits<T&> {
+  typedef T& type; 
+};
+
+// null_types are an exception, we always want to store them as non const
+// so that other templates can assume that null_type is always without const
+template<>
+struct bind_traits<null_type> {
+  typedef null_type type;
+};
+
+// the bind_tuple_mapper, bind_type_generators may 
+// introduce const to null_type
+template<>
+struct bind_traits<const null_type> {
+  typedef null_type type;
+};
+
+// Arrays can't be stored as plain types; convert them to references.
+// All arrays are converted to const. This is because bind takes its
+// parameters as const T& and thus the knowledge of the potential 
+// non-constness of actual argument is lost.
+template<class T, int n>  struct bind_traits <T[n]> {
+  typedef const T (&type)[n];
+};
+
+template<class T, int n> 
+struct bind_traits<const T[n]> {
+  typedef const T (&type)[n];
+};
+
+template<class T, int n>  struct bind_traits<volatile T[n]> {
+  typedef const volatile T (&type)[n];
+};
+
+template<class T, int n> 
+struct bind_traits<const volatile T[n]> {
+  typedef const volatile T (&type)[n];
+};
+
+template<class R>
+struct bind_traits<R()> {
+    typedef R(&type)();
+};
+
+template<class R, class Arg1>
+struct bind_traits<R(Arg1)> {
+    typedef R(&type)(Arg1);
+};
+
+template<class R, class Arg1, class Arg2>
+struct bind_traits<R(Arg1, Arg2)> {
+    typedef R(&type)(Arg1, Arg2);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3>
+struct bind_traits<R(Arg1, Arg2, Arg3)> {
+    typedef R(&type)(Arg1, Arg2, Arg3);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3, class Arg4>
+struct bind_traits<R(Arg1, Arg2, Arg3, Arg4)> {
+    typedef R(&type)(Arg1, Arg2, Arg3, Arg4);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
+struct bind_traits<R(Arg1, Arg2, Arg3, Arg4, Arg5)> {
+    typedef R(&type)(Arg1, Arg2, Arg3, Arg4, Arg5);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6>
+struct bind_traits<R(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)> {
+    typedef R(&type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7>
+struct bind_traits<R(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)> {
+    typedef R(&type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8>
+struct bind_traits<R(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)> {
+    typedef R(&type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8);
+};
+
+template<class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9>
+struct bind_traits<R(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9)> {
+    typedef R(&type)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9);
+};
+
+template<class T> 
+struct bind_traits<reference_wrapper<T> >{
+  typedef T& type;
+};
+
+template<class T> 
+struct bind_traits<const reference_wrapper<T> >{
+  typedef T& type;
+};
+
+template<>
+struct bind_traits<void> {
+  typedef void type;
+};
+
+
+
+template <
+  class T0 = null_type, class T1 = null_type, class T2 = null_type, 
+  class T3 = null_type, class T4 = null_type, class T5 = null_type, 
+  class T6 = null_type, class T7 = null_type, class T8 = null_type, 
+  class T9 = null_type
+>
+struct bind_tuple_mapper {
+  typedef
+    tuple<typename bind_traits<T0>::type, 
+          typename bind_traits<T1>::type, 
+          typename bind_traits<T2>::type, 
+          typename bind_traits<T3>::type, 
+          typename bind_traits<T4>::type, 
+          typename bind_traits<T5>::type, 
+          typename bind_traits<T6>::type, 
+          typename bind_traits<T7>::type,
+          typename bind_traits<T8>::type,
+          typename bind_traits<T9>::type> type;
+};
+
+// bind_traits, except map const T& -> const T
+  // this is needed e.g. in currying. Const reference arguments can
+  // refer to temporaries, so it is not safe to store them as references.
+  template <class T> struct remove_const_reference {
+    typedef typename bind_traits<T>::type type;
+  };
+
+  template <class T> struct remove_const_reference<const T&> {
+    typedef const T type;
+  };
+
+
+// maps the bind argument types to the resulting lambda functor type
+template <
+  class T0 = null_type, class T1 = null_type, class T2 = null_type, 
+  class T3 = null_type, class T4 = null_type, class T5 = null_type, 
+  class T6 = null_type, class T7 = null_type, class T8 = null_type, 
+  class T9 = null_type
+>
+class bind_type_generator {
+
+  typedef typename
+  detail::bind_tuple_mapper<
+    T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
+  >::type args_t;
+
+  BOOST_STATIC_CONSTANT(int, nof_elems = ndnboost::tuples::length<args_t>::value);
+
+  typedef 
+    action<
+      nof_elems, 
+      function_action<nof_elems>
+    > action_type;
+
+public:
+  typedef
+    lambda_functor<
+      lambda_functor_base<
+        action_type, 
+        args_t
+      >
+    > type; 
+    
+};
+
+
+   
+} // detail
+   
+template <class T> inline const T&  make_const(const T& t) { return t; }
+
+
+} // end of namespace lambda
+} // end of namespace ndnboost
+
+
+   
+#endif // BOOST_LAMBDA_TRAITS_HPP
diff --git a/ndnboost/lambda/detail/member_ptr.hpp b/ndnboost/lambda/detail/member_ptr.hpp
new file mode 100644
index 0000000..37c10ab
--- /dev/null
+++ b/ndnboost/lambda/detail/member_ptr.hpp
@@ -0,0 +1,737 @@
+// Boost Lambda Library -- member_ptr.hpp ---------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+// Copyright (C) 2000 Gary Powell (gary.powell@sierra.com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// --------------------------------------------------------------------------
+
+#if !defined(BOOST_LAMBDA_MEMBER_PTR_HPP)
+#define BOOST_LAMBDA_MEMBER_PTR_HPP
+
+namespace ndnboost { 
+namespace lambda {
+
+
+class member_pointer_action {};
+
+
+namespace detail {
+
+// the boost type_traits member_pointer traits are not enough, 
+// need to know more details.
+template<class T>
+struct member_pointer {
+  typedef typename ndnboost::add_reference<T>::type type;
+  typedef detail::unspecified class_type;
+  typedef detail::unspecified qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = false);
+};
+
+template<class T, class U>
+struct member_pointer<T U::*> {
+  typedef typename ndnboost::add_reference<T>::type type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = true);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = false);
+};
+
+template<class T, class U>
+struct member_pointer<const T U::*> {
+  typedef typename ndnboost::add_reference<const T>::type type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = true);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = false);
+};
+
+template<class T, class U>
+struct member_pointer<volatile T U::*> {
+  typedef typename ndnboost::add_reference<volatile T>::type type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = true);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = false);
+};
+
+template<class T, class U>
+struct member_pointer<const volatile T U::*> {
+  typedef typename ndnboost::add_reference<const volatile T>::type type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = true);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = false);
+};
+
+// -- nonconst member functions --
+template<class T, class U>
+struct member_pointer<T (U::*)()> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1>
+struct member_pointer<T (U::*)(A1)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2>
+struct member_pointer<T (U::*)(A1, A2)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3>
+struct member_pointer<T (U::*)(A1, A2, A3)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4>
+struct member_pointer<T (U::*)(A1, A2, A3, A4)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8, class A9>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
+  typedef T type;
+  typedef U class_type;
+  typedef U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+// -- const member functions --
+template<class T, class U>
+struct member_pointer<T (U::*)() const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1>
+struct member_pointer<T (U::*)(A1) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2>
+struct member_pointer<T (U::*)(A1, A2) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3>
+struct member_pointer<T (U::*)(A1, A2, A3) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4>
+struct member_pointer<T (U::*)(A1, A2, A3, A4) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8, class A9>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9) const> {
+  typedef T type;
+  typedef U class_type;
+  typedef const U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+  // -- volatile --
+template<class T, class U>
+struct member_pointer<T (U::*)() volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1>
+struct member_pointer<T (U::*)(A1) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2>
+struct member_pointer<T (U::*)(A1, A2) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3>
+struct member_pointer<T (U::*)(A1, A2, A3) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4>
+struct member_pointer<T (U::*)(A1, A2, A3, A4) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8, class A9>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9) volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+  // -- const volatile
+template<class T, class U>
+struct member_pointer<T (U::*)() const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1>
+struct member_pointer<T (U::*)(A1) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2>
+struct member_pointer<T (U::*)(A1, A2) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3>
+struct member_pointer<T (U::*)(A1, A2, A3) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4>
+struct member_pointer<T (U::*)(A1, A2, A3, A4) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+template<class T, class U, class A1, class A2, class A3, class A4, class A5,
+         class A6, class A7, class A8, class A9>
+struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9) const volatile> {
+  typedef T type;
+  typedef U class_type;
+  typedef const volatile U qualified_class_type;
+  BOOST_STATIC_CONSTANT(bool, is_data_member = false);
+  BOOST_STATIC_CONSTANT(bool, is_function_member = true);
+};
+
+} // detail
+
+namespace detail {
+
+  // this class holds a pointer to a member function and the object.
+  // when called, it just calls the member function with the parameters 
+  // provided
+
+  // It would have been possible to use existing lambda_functors to represent
+  // a bound member function like this, but to have a separate template is 
+  // safer, since now this functor doesn't mix and match with lambda_functors
+  // only thing you can do with this is to call it
+
+  // note that previously instantiated classes 
+  // (other_action<member_pointer_action> and member_pointer_action_helper
+  // guarantee, that A and B are 
+  // such types, that for objects a and b of corresponding types, a->*b leads 
+  // to the builtin ->* to be called. So types that would end in a  call to 
+  // a user defined ->* do not create a member_pointer_caller object.
+
+template<class RET, class A, class B>
+class member_pointer_caller {
+  A a; B b;
+
+public:
+  member_pointer_caller(const A& aa, const B& bb) : a(aa), b(bb) {}
+
+  RET operator()() const { return (a->*b)(); } 
+
+  template<class A1>
+  RET operator()(const A1& a1) const { return (a->*b)(a1); } 
+
+  template<class A1, class A2>
+  RET operator()(const A1& a1, const A2& a2) const { return (a->*b)(a1, a2); } 
+
+  template<class A1, class A2, class A3>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3) const { 
+    return (a->*b)(a1, a2, a3); 
+  } 
+
+  template<class A1, class A2, class A3, class A4>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3, 
+                 const A4& a4) const { 
+    return (a->*b)(a1, a2, a3, a4); 
+  } 
+
+  template<class A1, class A2, class A3, class A4, class A5>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, 
+                 const A5& a5) const { 
+    return (a->*b)(a1, a2, a3, a4, a5); 
+  } 
+
+  template<class A1, class A2, class A3, class A4, class A5, class A6>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, 
+                 const A5& a5, const A6& a6) const { 
+    return (a->*b)(a1, a2, a3, a4, a5, a6); 
+  } 
+
+  template<class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, 
+                 const A5& a5, const A6& a6, const A7& a7) const { 
+    return (a->*b)(a1, a2, a3, a4, a5, a6, a7); 
+  } 
+
+  template<class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7, class A8>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, 
+                 const A5& a5, const A6& a6, const A7& a7,
+                 const A8& a8) const { 
+    return (a->*b)(a1, a2, a3, a4, a5, a6, a7, a8); 
+  } 
+
+  template<class A1, class A2, class A3, class A4, class A5, class A6, 
+           class A7, class A8, class A9>
+  RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, 
+                 const A5& a5, const A6& a6, const A7& a7,
+                 const A8& a8, const A9& a9) const { 
+    return (a->*b)(a1, a2, a3, a4, a5, a6, a7, a8, a9); 
+  } 
+
+};
+
+// helper templates for return type deduction and action classes
+// different cases for data member, function member, neither
+
+// true-true case
+template <bool Is_data_member, bool Is_function_member>
+struct member_pointer_action_helper;
+  // cannot be both, no body provided
+
+  // data member case
+  // this means, that B is a data member and A is a pointer type,
+  // so either built-in ->* should be called, or there is an error
+template <>
+struct member_pointer_action_helper<true, false> {
+public:
+
+  template<class RET, class A, class B>
+  static RET apply(A& a, B& b) { 
+    return a->*b; 
+  }
+
+  template<class A, class B>
+  struct return_type {
+  private:
+    typedef typename detail::remove_reference_and_cv<B>::type plainB;
+
+    typedef typename detail::member_pointer<plainB>::type type0;
+    // we remove the reference now, as we may have to add cv:s 
+    typedef typename ndnboost::remove_reference<type0>::type type1;
+
+    // A is a reference to pointer
+    // remove the top level cv qualifiers and reference
+    typedef typename 
+      detail::remove_reference_and_cv<A>::type non_ref_A;
+
+    // A is a pointer type, so take the type pointed to
+    typedef typename ::ndnboost::remove_pointer<non_ref_A>::type non_pointer_A; 
+
+  public:
+    // For non-reference types, we must add const and/or volatile if
+    // the pointer type has these qualifiers
+    // If the member is a reference, these do not have any effect
+    //   (cv T == T if T is a reference type)
+    typedef typename detail::IF<
+      ::ndnboost::is_const<non_pointer_A>::value, 
+      typename ::ndnboost::add_const<type1>::type,
+      type1
+    >::RET type2;
+    typedef typename detail::IF<
+      ::ndnboost::is_volatile<non_pointer_A>::value, 
+      typename ::ndnboost::add_volatile<type2>::type,
+      type2
+    >::RET type3;
+    // add reference back
+    typedef typename ::ndnboost::add_reference<type3>::type type;
+  };
+};
+
+  // neither case
+template <>
+struct member_pointer_action_helper<false, false> {
+public:
+  template<class RET, class A, class B>
+  static RET apply(A& a, B& b) { 
+// not a built in member pointer operator, just call ->*
+    return a->*b; 
+  }
+  // an overloaded member pointer operators, user should have specified
+  // the return type
+  // At this point we know that there is no matching specialization for
+  // return_type_2, so try return_type_2_plain
+  template<class A, class B>
+  struct return_type {
+
+    typedef typename plain_return_type_2<
+      other_action<member_pointer_action>, A, B
+    >::type type;
+  };
+  
+};
+
+
+// member pointer function case
+// This is a built in ->* call for a member function, 
+// the only thing that you can do with that, is to give it some arguments
+// note, it is guaranteed that A is a pointer type, and thus it cannot
+// be a call to overloaded ->*
+template <>
+struct member_pointer_action_helper<false, true> {
+  public:
+
+  template<class RET, class A, class B>
+  static RET apply(A& a, B& b) { 
+    typedef typename ::ndnboost::remove_cv<B>::type plainB;
+    typedef typename detail::member_pointer<plainB>::type ret_t; 
+    typedef typename ::ndnboost::remove_cv<A>::type plainA;
+
+    // we always strip cv:s to 
+    // make the two routes (calling and type deduction)
+    // to give the same results (and the const does not make any functional
+    // difference)
+    return detail::member_pointer_caller<ret_t, plainA, plainB>(a, b); 
+  }
+
+  template<class A, class B>
+  struct return_type {
+    typedef typename detail::remove_reference_and_cv<B>::type plainB;
+    typedef typename detail::member_pointer<plainB>::type ret_t; 
+    typedef typename detail::remove_reference_and_cv<A>::type plainA; 
+
+    typedef detail::member_pointer_caller<ret_t, plainA, plainB> type; 
+  };
+};
+
+} // detail
+
+template<> class other_action<member_pointer_action>  {
+public:
+  template<class RET, class A, class B>
+  static RET apply(A& a, B& b) {
+    typedef typename 
+      ::ndnboost::remove_cv<B>::type plainB;
+
+    return detail::member_pointer_action_helper<
+        ndnboost::is_pointer<A>::value && 
+          detail::member_pointer<plainB>::is_data_member,
+        ndnboost::is_pointer<A>::value && 
+          detail::member_pointer<plainB>::is_function_member
+      >::template apply<RET>(a, b); 
+    }
+};
+
+  // return type deduction --
+
+  // If the right argument is a pointer to data member, 
+  // and the left argument is of compatible pointer to class type
+  // return type is a reference to the data member type
+
+  // if right argument is a pointer to a member function, and the left 
+  // argument is of a compatible type, the return type is a 
+  // member_pointer_caller (see above)
+
+  // Otherwise, return type deduction fails. There is either an error, 
+  // or the user is trying to call an overloaded ->*
+  // In such a case either ret<> must be used, or a return_type_2 user 
+  // defined specialization must be provided
+
+
+template<class A, class B>
+struct return_type_2<other_action<member_pointer_action>, A, B> {
+private:
+  typedef typename 
+    detail::remove_reference_and_cv<B>::type plainB;
+public:
+  typedef typename 
+    detail::member_pointer_action_helper<
+      detail::member_pointer<plainB>::is_data_member,
+      detail::member_pointer<plainB>::is_function_member
+    >::template return_type<A, B>::type type; 
+};
+
+  // this is the way the generic lambda_functor_base functions instantiate
+  // return type deduction. We turn it into return_type_2, so that the 
+  // user can provide specializations on that level.
+template<class Args>
+struct return_type_N<other_action<member_pointer_action>, Args> {
+  typedef typename ndnboost::tuples::element<0, Args>::type A;
+  typedef typename ndnboost::tuples::element<1, Args>::type B;
+  typedef typename 
+    return_type_2<other_action<member_pointer_action>, 
+                  typename ndnboost::remove_reference<A>::type, 
+                  typename ndnboost::remove_reference<B>::type
+                 >::type type;
+};
+
+
+template<class Arg1, class Arg2>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<2, other_action<member_pointer_action> >,
+    tuple<lambda_functor<Arg1>, typename const_copy_argument<Arg2>::type>
+  >
+>
+operator->*(const lambda_functor<Arg1>& a1, const Arg2& a2)
+{
+  return 
+      lambda_functor_base<
+        action<2, other_action<member_pointer_action> >,
+        tuple<lambda_functor<Arg1>, typename const_copy_argument<Arg2>::type>
+      >
+      (tuple<lambda_functor<Arg1>, 
+             typename const_copy_argument<Arg2>::type>(a1, a2));
+}
+
+template<class Arg1, class Arg2>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<2, other_action<member_pointer_action> >,
+    tuple<lambda_functor<Arg1>, lambda_functor<Arg2> >
+  >
+>
+operator->*(const lambda_functor<Arg1>& a1, const lambda_functor<Arg2>& a2)
+{
+  return 
+      lambda_functor_base<
+        action<2, other_action<member_pointer_action> >,
+        tuple<lambda_functor<Arg1>, lambda_functor<Arg2> >
+      >
+    (tuple<lambda_functor<Arg1>, lambda_functor<Arg2> >(a1, a2));
+}
+
+template<class Arg1, class Arg2>
+inline const
+lambda_functor<
+  lambda_functor_base<
+    action<2, other_action<member_pointer_action> >,
+    tuple<typename const_copy_argument<Arg1>::type, lambda_functor<Arg2> >
+  >
+>
+operator->*(const Arg1& a1, const lambda_functor<Arg2>& a2)
+{
+  return 
+      lambda_functor_base<
+        action<2, other_action<member_pointer_action> >,
+        tuple<typename const_copy_argument<Arg1>::type, lambda_functor<Arg2> >
+      >
+      (tuple<typename const_copy_argument<Arg1>::type, 
+             lambda_functor<Arg2> >(a1, a2));
+}
+
+
+} // namespace lambda 
+} // namespace ndnboost
+
+
+#endif
+
+
+
+
+
+
diff --git a/ndnboost/lambda/detail/operator_actions.hpp b/ndnboost/lambda/detail/operator_actions.hpp
new file mode 100644
index 0000000..4947792
--- /dev/null
+++ b/ndnboost/lambda/detail/operator_actions.hpp
@@ -0,0 +1,139 @@
+// -- operator_actions.hpp - Boost Lambda Library ----------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://lambda.cs.utu.fi 
+
+#ifndef BOOST_LAMBDA_OPERATOR_ACTIONS_HPP
+#define BOOST_LAMBDA_OPERATOR_ACTIONS_HPP
+
+namespace ndnboost { 
+namespace lambda {
+
+
+// -- artihmetic ----------------------
+
+class plus_action {};
+class minus_action {};
+class multiply_action {};
+class divide_action {};
+class remainder_action {};
+
+// -- bitwise  -------------------
+
+class leftshift_action {};
+class rightshift_action {};
+class xor_action {};
+
+
+// -- bitwise/logical -------------------
+
+class and_action {};
+class or_action {};
+class not_action {};
+
+// -- relational -------------------------
+
+class less_action {};
+class greater_action {};
+class lessorequal_action {};
+class greaterorequal_action {};
+class equal_action {};
+class notequal_action {};
+
+// -- increment/decrement ------------------------------
+
+class increment_action {};
+class decrement_action {};
+
+// -- void return ------------------------------
+
+// -- other  ------------------------------
+
+class addressof_action {};
+  // class comma_action {}; // defined in actions.hpp
+class contentsof_action {};
+// class member_pointer_action {}; (defined in member_ptr.hpp)
+
+
+// -- actioun group templates --------------------
+
+template <class Action> class arithmetic_action;
+template <class Action> class bitwise_action;
+template <class Action> class logical_action;
+template <class Action> class relational_action;
+template <class Action> class arithmetic_assignment_action;
+template <class Action> class bitwise_assignment_action;
+template <class Action> class unary_arithmetic_action;
+template <class Action> class pre_increment_decrement_action;
+template <class Action> class post_increment_decrement_action;
+
+// ---------------------------------------------------------
+
+  // actions, for which the existence of protect is checked in return type 
+  // deduction.
+
+template <class Act> struct is_protectable<arithmetic_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> struct is_protectable<bitwise_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> struct is_protectable<logical_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> struct is_protectable<relational_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> 
+struct is_protectable<arithmetic_assignment_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> struct is_protectable<bitwise_assignment_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> struct is_protectable<unary_arithmetic_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> 
+struct is_protectable<pre_increment_decrement_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <class Act> struct 
+is_protectable<post_increment_decrement_action<Act> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template <> struct is_protectable<other_action<addressof_action> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template <> struct is_protectable<other_action<contentsof_action> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template<> struct is_protectable<other_action<subscript_action> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+template<> struct is_protectable<other_action<assignment_action> > {
+  BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+// NOTE: comma action is also protectable, but the specialization is
+  // in actions.hpp
+
+
+} // namespace lambda 
+} // namespace ndnboost
+
+#endif
+
+
+
+
+
+
+
diff --git a/ndnboost/lambda/detail/operator_lambda_func_base.hpp b/ndnboost/lambda/detail/operator_lambda_func_base.hpp
new file mode 100644
index 0000000..777726a
--- /dev/null
+++ b/ndnboost/lambda/detail/operator_lambda_func_base.hpp
@@ -0,0 +1,271 @@
+// Boost Lambda Library  - operator_lambda_func_base.hpp -----------------
+//
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// ------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_OPERATOR_LAMBDA_FUNC_BASE_HPP
+#define BOOST_LAMBDA_OPERATOR_LAMBDA_FUNC_BASE_HPP
+
+namespace ndnboost { 
+namespace lambda {
+
+
+// These operators cannot be implemented as apply functions of action 
+// templates
+
+
+// Specialization for comma.
+template<class Args>
+class lambda_functor_base<other_action<comma_action>, Args> {
+public:
+  Args args;
+public:
+  explicit lambda_functor_base(const Args& a) : args(a) {}
+
+  template<class RET, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const {
+    return detail::select(ndnboost::tuples::get<0>(args), CALL_ACTUAL_ARGS), 
+           detail::select(ndnboost::tuples::get<1>(args), CALL_ACTUAL_ARGS); 
+  }
+
+
+  template<class SigArgs> struct sig { 
+  private:
+    typedef typename
+      detail::deduce_argument_types<Args, SigArgs>::type rets_t;      
+  public:
+    typedef typename return_type_2_comma< // comma needs special handling
+      typename detail::element_or_null<0, rets_t>::type,
+      typename detail::element_or_null<1, rets_t>::type
+    >::type type;
+  };
+
+};  
+
+namespace detail {
+
+// helper traits to make the expression shorter, takes binary action
+// bound argument tuple, open argument tuple and gives the return type
+
+template<class Action, class Bound, class Open> class binary_rt {
+  private:
+    typedef typename
+      detail::deduce_argument_types<Bound, Open>::type rets_t;      
+  public:
+    typedef typename return_type_2_prot<
+      Action,  
+      typename detail::element_or_null<0, rets_t>::type,
+      typename detail::element_or_null<1, rets_t>::type
+    >::type type;
+};
+
+
+  // same for unary actions
+template<class Action, class Bound, class Open> class unary_rt {
+  private:
+    typedef typename
+      detail::deduce_argument_types<Bound, Open>::type rets_t;      
+  public:
+    typedef typename return_type_1_prot<
+      Action,  
+      typename detail::element_or_null<0, rets_t>::type
+    >::type type;
+};
+
+
+} // end detail
+
+// Specialization for logical and (to preserve shortcircuiting)
+// this could be done with a macro as the others, code used to be different
+template<class Args>
+class lambda_functor_base<logical_action<and_action>, Args> {
+public:
+  Args args;
+public:
+  explicit lambda_functor_base(const Args& a) : args(a) {}
+
+  template<class RET, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const {
+    return detail::select(ndnboost::tuples::get<0>(args), CALL_ACTUAL_ARGS) && 
+           detail::select(ndnboost::tuples::get<1>(args), CALL_ACTUAL_ARGS); 
+  }
+  template<class SigArgs> struct sig { 
+    typedef typename
+      detail::binary_rt<logical_action<and_action>, Args, SigArgs>::type type;
+  };      
+};  
+
+// Specialization for logical or (to preserve shortcircuiting)
+// this could be done with a macro as the others, code used to be different
+template<class Args>
+class lambda_functor_base<logical_action< or_action>, Args> {
+public:
+  Args args;
+public:
+  explicit lambda_functor_base(const Args& a) : args(a) {}
+
+  template<class RET, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const {
+    return detail::select(ndnboost::tuples::get<0>(args), CALL_ACTUAL_ARGS) || 
+           detail::select(ndnboost::tuples::get<1>(args), CALL_ACTUAL_ARGS); 
+  }
+
+  template<class SigArgs> struct sig { 
+    typedef typename
+      detail::binary_rt<logical_action<or_action>, Args, SigArgs>::type type;
+  };      
+};  
+
+// Specialization for subscript
+template<class Args>
+class lambda_functor_base<other_action<subscript_action>, Args> {
+public:
+  Args args;
+public:
+  explicit lambda_functor_base(const Args& a) : args(a) {}
+
+  template<class RET, CALL_TEMPLATE_ARGS>
+  RET call(CALL_FORMAL_ARGS) const {
+    return detail::select(ndnboost::tuples::get<0>(args), CALL_ACTUAL_ARGS) 
+           [detail::select(ndnboost::tuples::get<1>(args), CALL_ACTUAL_ARGS)]; 
+  }
+
+  template<class SigArgs> struct sig { 
+    typedef typename
+      detail::binary_rt<other_action<subscript_action>, Args, SigArgs>::type 
+        type;
+  };      
+};  
+
+
+#define BOOST_LAMBDA_BINARY_ACTION(SYMBOL, ACTION_CLASS)  \
+template<class Args>                                                      \
+class lambda_functor_base<ACTION_CLASS, Args> {                           \
+public:                                                                   \
+  Args args;                                                              \
+public:                                                                   \
+  explicit lambda_functor_base(const Args& a) : args(a) {}                \
+                                                                          \
+  template<class RET, CALL_TEMPLATE_ARGS>                                 \
+  RET call(CALL_FORMAL_ARGS) const {                                      \
+    return detail::select(ndnboost::tuples::get<0>(args), CALL_ACTUAL_ARGS)  \
+           SYMBOL                                                         \
+           detail::select(ndnboost::tuples::get<1>(args), CALL_ACTUAL_ARGS); \
+  }                                                                       \
+  template<class SigArgs> struct sig {                                    \
+    typedef typename                                                      \
+      detail::binary_rt<ACTION_CLASS, Args, SigArgs>::type type;          \
+  };                                                                      \
+};  
+
+#define BOOST_LAMBDA_PREFIX_UNARY_ACTION(SYMBOL, ACTION_CLASS)            \
+template<class Args>                                                      \
+class lambda_functor_base<ACTION_CLASS, Args> {                           \
+public:                                                                   \
+  Args args;                                                              \
+public:                                                                   \
+  explicit lambda_functor_base(const Args& a) : args(a) {}                \
+                                                                          \
+  template<class RET, CALL_TEMPLATE_ARGS>                                 \
+  RET call(CALL_FORMAL_ARGS) const {                                      \
+    return SYMBOL                                                         \
+           detail::select(ndnboost::tuples::get<0>(args), CALL_ACTUAL_ARGS); \
+  }                                                                       \
+  template<class SigArgs> struct sig {                                    \
+    typedef typename                                                      \
+      detail::unary_rt<ACTION_CLASS, Args, SigArgs>::type type;           \
+  };                                                                      \
+};  
+
+#define BOOST_LAMBDA_POSTFIX_UNARY_ACTION(SYMBOL, ACTION_CLASS)           \
+template<class Args>                                                      \
+class lambda_functor_base<ACTION_CLASS, Args> {                           \
+public:                                                                   \
+  Args args;                                                              \
+public:                                                                   \
+  explicit lambda_functor_base(const Args& a) : args(a) {}                \
+                                                                          \
+  template<class RET, CALL_TEMPLATE_ARGS>                                 \
+  RET call(CALL_FORMAL_ARGS) const {                                      \
+    return                                                                \
+    detail::select(ndnboost::tuples::get<0>(args), CALL_ACTUAL_ARGS) SYMBOL; \
+  }                                                                       \
+  template<class SigArgs> struct sig {                                    \
+    typedef typename                                                      \
+      detail::unary_rt<ACTION_CLASS, Args, SigArgs>::type type;           \
+  };                                                                      \
+};  
+
+BOOST_LAMBDA_BINARY_ACTION(+,arithmetic_action<plus_action>)
+BOOST_LAMBDA_BINARY_ACTION(-,arithmetic_action<minus_action>)
+BOOST_LAMBDA_BINARY_ACTION(*,arithmetic_action<multiply_action>)
+BOOST_LAMBDA_BINARY_ACTION(/,arithmetic_action<divide_action>)
+BOOST_LAMBDA_BINARY_ACTION(%,arithmetic_action<remainder_action>)
+
+BOOST_LAMBDA_BINARY_ACTION(<<,bitwise_action<leftshift_action>)
+BOOST_LAMBDA_BINARY_ACTION(>>,bitwise_action<rightshift_action>)
+BOOST_LAMBDA_BINARY_ACTION(&,bitwise_action<and_action>)
+BOOST_LAMBDA_BINARY_ACTION(|,bitwise_action<or_action>)
+BOOST_LAMBDA_BINARY_ACTION(^,bitwise_action<xor_action>)
+
+BOOST_LAMBDA_BINARY_ACTION(<,relational_action<less_action>)
+BOOST_LAMBDA_BINARY_ACTION(>,relational_action<greater_action>)
+BOOST_LAMBDA_BINARY_ACTION(<=,relational_action<lessorequal_action>)
+BOOST_LAMBDA_BINARY_ACTION(>=,relational_action<greaterorequal_action>)
+BOOST_LAMBDA_BINARY_ACTION(==,relational_action<equal_action>)
+BOOST_LAMBDA_BINARY_ACTION(!=,relational_action<notequal_action>)
+
+BOOST_LAMBDA_BINARY_ACTION(+=,arithmetic_assignment_action<plus_action>)
+BOOST_LAMBDA_BINARY_ACTION(-=,arithmetic_assignment_action<minus_action>)
+BOOST_LAMBDA_BINARY_ACTION(*=,arithmetic_assignment_action<multiply_action>)
+BOOST_LAMBDA_BINARY_ACTION(/=,arithmetic_assignment_action<divide_action>)
+BOOST_LAMBDA_BINARY_ACTION(%=,arithmetic_assignment_action<remainder_action>)
+
+BOOST_LAMBDA_BINARY_ACTION(<<=,bitwise_assignment_action<leftshift_action>)
+BOOST_LAMBDA_BINARY_ACTION(>>=,bitwise_assignment_action<rightshift_action>)
+BOOST_LAMBDA_BINARY_ACTION(&=,bitwise_assignment_action<and_action>)
+BOOST_LAMBDA_BINARY_ACTION(|=,bitwise_assignment_action<or_action>)
+BOOST_LAMBDA_BINARY_ACTION(^=,bitwise_assignment_action<xor_action>)
+
+BOOST_LAMBDA_BINARY_ACTION(=,other_action< assignment_action>)
+
+
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(+, unary_arithmetic_action<plus_action>)
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(-, unary_arithmetic_action<minus_action>)
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(~, bitwise_action<not_action>)
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(!, logical_action<not_action>)
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(++, pre_increment_decrement_action<increment_action>)
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(--, pre_increment_decrement_action<decrement_action>)
+
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(&,other_action<addressof_action>)
+BOOST_LAMBDA_PREFIX_UNARY_ACTION(*,other_action<contentsof_action>)
+
+BOOST_LAMBDA_POSTFIX_UNARY_ACTION(++, post_increment_decrement_action<increment_action>)
+BOOST_LAMBDA_POSTFIX_UNARY_ACTION(--, post_increment_decrement_action<decrement_action>)
+
+
+#undef BOOST_LAMBDA_POSTFIX_UNARY_ACTION
+#undef BOOST_LAMBDA_PREFIX_UNARY_ACTION
+#undef BOOST_LAMBDA_BINARY_ACTION
+
+} // namespace lambda
+} // namespace ndnboost
+
+#endif
+
+
+
+
+
+
+
+
+
+
diff --git a/ndnboost/lambda/detail/operator_return_type_traits.hpp b/ndnboost/lambda/detail/operator_return_type_traits.hpp
new file mode 100644
index 0000000..0ee927b
--- /dev/null
+++ b/ndnboost/lambda/detail/operator_return_type_traits.hpp
@@ -0,0 +1,917 @@
+//  operator_return_type_traits.hpp -- Boost Lambda Library ------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+#ifndef BOOST_LAMBDA_OPERATOR_RETURN_TYPE_TRAITS_HPP
+#define BOOST_LAMBDA_OPERATOR_RETURN_TYPE_TRAITS_HPP
+
+#include "ndnboost/lambda/detail/is_instance_of.hpp"
+#include "ndnboost/type_traits/same_traits.hpp"
+
+#include "ndnboost/indirect_reference.hpp"
+#include "ndnboost/detail/container_fwd.hpp"
+
+#include <cstddef> // needed for the ptrdiff_t
+#include <iosfwd>  // for istream and ostream
+
+#include <iterator> // needed for operator&
+
+namespace ndnboost { 
+namespace lambda {
+namespace detail {
+
+// -- general helper templates for type deduction ------------------
+
+// Much of the type deduction code for standard arithmetic types from Gary Powell
+
+template <class A> struct promote_code { static const int value = -1; };
+// this means that a code is not defined for A
+
+// -- the next 5 types are needed in if_then_else_return 
+// the promotion order is not important, but they must have distinct values.
+template <> struct promote_code<bool> { static const int value = 10; };
+template <> struct promote_code<char> { static const int value = 20; };
+template <> struct promote_code<unsigned char> { static const int value = 30; };
+template <> struct promote_code<signed char> { static const int value = 40; };
+template <> struct promote_code<short int> { static const int value = 50; };
+// ----------
+
+template <> struct promote_code<int> { static const int value = 100; };
+template <> struct promote_code<unsigned int> { static const int value = 200; };
+template <> struct promote_code<long> { static const int value = 300; };
+template <> struct promote_code<unsigned long> { static const int value = 400; };
+
+template <> struct promote_code<float> { static const int value = 500; };
+template <> struct promote_code<double> { static const int value = 600; };
+template <> struct promote_code<long double> { static const int value = 700; };
+
+// TODO: wchar_t
+
+// forward delcaration of complex.
+
+} // namespace detail
+} // namespace lambda 
+} // namespace ndnboost
+
+namespace ndnboost { 
+namespace lambda {
+namespace detail {
+
+template <> struct promote_code< std::complex<float> > { static const int value = 800; };
+template <> struct promote_code< std::complex<double> > { static const int value = 900; };
+template <> struct promote_code< std::complex<long double> > { static const int value = 1000; };
+
+// -- int promotion -------------------------------------------
+template <class T> struct promote_to_int { typedef T type; };
+
+template <> struct promote_to_int<bool> { typedef int type; };
+template <> struct promote_to_int<char> { typedef int type; };
+template <> struct promote_to_int<unsigned char> { typedef int type; };
+template <> struct promote_to_int<signed char> { typedef int type; };
+template <> struct promote_to_int<short int> { typedef int type; };
+
+// The unsigned short int promotion rule is this:
+// unsigned short int to signed int if a signed int can hold all values 
+// of unsigned short int, otherwise go to unsigned int.
+template <> struct promote_to_int<unsigned short int>
+{ 
+        typedef
+                detail::IF<sizeof(int) <= sizeof(unsigned short int),        
+// I had the logic reversed but ">" messes up the parsing.
+                unsigned int,
+                int>::RET type; 
+};
+
+
+// TODO: think, should there be default behaviour for non-standard types?
+
+} // namespace detail
+
+// ------------------------------------------ 
+// Unary actions ----------------------------
+// ------------------------------------------ 
+
+template<class Act, class A>
+struct plain_return_type_1 {
+  typedef detail::unspecified type;
+};
+
+
+
+template<class Act, class A>
+struct plain_return_type_1<unary_arithmetic_action<Act>, A> {
+  typedef A type;
+};
+
+template<class Act, class A> 
+struct return_type_1<unary_arithmetic_action<Act>, A> { 
+  typedef 
+    typename plain_return_type_1<
+      unary_arithmetic_action<Act>,
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type;
+};
+
+
+template<class A>
+struct plain_return_type_1<bitwise_action<not_action>, A> {
+  typedef A type;
+};
+
+// bitwise not, operator~()
+template<class A> struct return_type_1<bitwise_action<not_action>, A> {
+  typedef 
+    typename plain_return_type_1<
+      bitwise_action<not_action>,
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type;
+};
+
+
+// prefix increment and decrement operators return 
+// their argument by default as a non-const reference
+template<class Act, class A> 
+struct plain_return_type_1<pre_increment_decrement_action<Act>, A> {
+  typedef A& type;
+};
+
+template<class Act, class A> 
+struct return_type_1<pre_increment_decrement_action<Act>, A> {
+  typedef 
+    typename plain_return_type_1<
+      pre_increment_decrement_action<Act>,
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type;
+};
+
+// post decrement just returns the same plain type.
+template<class Act, class A>
+struct plain_return_type_1<post_increment_decrement_action<Act>, A> {
+  typedef A type;
+};
+
+template<class Act, class A> 
+struct return_type_1<post_increment_decrement_action<Act>, A> 
+{ 
+  typedef 
+    typename plain_return_type_1<
+      post_increment_decrement_action<Act>,
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type;
+};
+
+// logical not, operator!()
+template<class A> 
+struct plain_return_type_1<logical_action<not_action>, A> {
+  typedef bool type;
+};
+
+template<class A>
+struct return_type_1<logical_action<not_action>, A> {
+  typedef 
+    typename plain_return_type_1<
+      logical_action<not_action>,
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type;
+};
+
+// address of action ---------------------------------------
+
+
+template<class A> 
+struct return_type_1<other_action<addressof_action>, A> { 
+  typedef 
+    typename plain_return_type_1<
+      other_action<addressof_action>, 
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type1;
+
+  // If no user defined specialization for A, then return the
+  // cv qualified pointer to A
+  typedef typename detail::IF<
+    ndnboost::is_same<type1, detail::unspecified>::value, 
+    typename ndnboost::remove_reference<A>::type*,
+    type1
+  >::RET type;
+};
+
+// contentsof action ------------------------------------
+
+// TODO: this deduction may lead to fail directly, 
+// (if A has no specialization for iterator_traits and has no
+// typedef A::reference.
+// There is no easy way around this, cause there doesn't seem to be a way
+// to test whether a class is an iterator or not.
+ 
+// The default works with std::iterators.
+
+namespace detail {
+
+  // A is a nonreference type
+template <class A> struct contentsof_type {
+  typedef typename ndnboost::indirect_reference<A>::type type; 
+};
+
+  // this is since the nullary () in lambda_functor is always instantiated
+template <> struct contentsof_type<null_type> {
+  typedef detail::unspecified type;
+};
+
+
+template <class A> struct contentsof_type<const A> {
+  typedef typename contentsof_type<A>::type type;
+};
+
+template <class A> struct contentsof_type<volatile A> {
+  typedef typename contentsof_type<A>::type type;
+};
+
+template <class A> struct contentsof_type<const volatile A> {
+  typedef typename contentsof_type<A>::type type;
+};
+
+  // standard iterator traits should take care of the pointer types 
+  // but just to be on the safe side, we have the specializations here:
+  // these work even if A is cv-qualified.
+template <class A> struct contentsof_type<A*> {
+  typedef A& type;
+};
+template <class A> struct contentsof_type<A* const> {
+  typedef A& type;
+};
+template <class A> struct contentsof_type<A* volatile> {
+  typedef A& type;
+};
+template <class A> struct contentsof_type<A* const volatile> {
+  typedef A& type;
+};
+
+template<class A, int N> struct contentsof_type<A[N]> { 
+  typedef A& type; 
+};
+template<class A, int N> struct contentsof_type<const A[N]> { 
+  typedef const A& type; 
+};
+template<class A, int N> struct contentsof_type<volatile A[N]> { 
+  typedef volatile A& type; 
+};
+template<class A, int N> struct contentsof_type<const volatile A[N]> { 
+  typedef const volatile A& type; 
+};
+
+
+
+
+
+} // end detail
+
+template<class A> 
+struct return_type_1<other_action<contentsof_action>, A> { 
+
+  typedef 
+    typename plain_return_type_1<
+      other_action<contentsof_action>, 
+      typename detail::remove_reference_and_cv<A>::type
+    >::type type1;
+
+  // If no user defined specialization for A, then return the
+  // cv qualified pointer to A
+  typedef typename 
+  detail::IF_type<
+    ndnboost::is_same<type1, detail::unspecified>::value, 
+    detail::contentsof_type<
+      typename ndnboost::remove_reference<A>::type
+    >,
+    detail::identity_mapping<type1>
+  >::type type;
+};
+
+
+// ------------------------------------------------------------------
+// binary actions ---------------------------------------------------
+// ------------------------------------------------------------------
+
+// here the default case is: no user defined versions:
+template <class Act, class A, class B>
+struct plain_return_type_2 {
+  typedef detail::unspecified type; 
+};
+
+namespace detail {
+
+// error classes
+class illegal_pointer_arithmetic{};
+
+// pointer arithmetic type deductions ----------------------
+// value = false means that this is not a pointer arithmetic case
+// value = true means, that this can be a pointer arithmetic case, but not necessarily is
+// This means, that for user defined operators for pointer types, say for some operator+(X, *Y),
+// the deductions must be coded at an earliel level (return_type_2).
+
+template<class Act, class A, class B> 
+struct pointer_arithmetic_traits { static const bool value = false; };
+
+template<class A, class B> 
+struct pointer_arithmetic_traits<plus_action, A, B> { 
+
+  typedef typename 
+    array_to_pointer<typename ndnboost::remove_reference<A>::type>::type AP;
+  typedef typename 
+    array_to_pointer<typename ndnboost::remove_reference<B>::type>::type BP;
+
+  static const bool is_pointer_A = ndnboost::is_pointer<AP>::value;
+  static const bool is_pointer_B = ndnboost::is_pointer<BP>::value;  
+
+  static const bool value = is_pointer_A || is_pointer_B;
+
+  // can't add two pointers.
+  // note, that we do not check wether the other type is valid for 
+  // addition with a pointer.
+  // the compiler will catch it in the apply function
+
+  typedef typename 
+  detail::IF<
+    is_pointer_A && is_pointer_B, 
+      detail::return_type_deduction_failure<
+        detail::illegal_pointer_arithmetic
+      >,
+      typename detail::IF<is_pointer_A, AP, BP>::RET
+  >::RET type; 
+
+};
+
+template<class A, class B> 
+struct pointer_arithmetic_traits<minus_action, A, B> { 
+  typedef typename 
+    array_to_pointer<typename ndnboost::remove_reference<A>::type>::type AP;
+  typedef typename 
+    array_to_pointer<typename ndnboost::remove_reference<B>::type>::type BP;
+
+  static const bool is_pointer_A = ndnboost::is_pointer<AP>::value;
+  static const bool is_pointer_B = ndnboost::is_pointer<BP>::value;  
+
+  static const bool value = is_pointer_A || is_pointer_B;
+
+  static const bool same_pointer_type =
+    is_pointer_A && is_pointer_B && 
+    ndnboost::is_same<
+      typename ndnboost::remove_const<
+        typename ndnboost::remove_pointer<
+          typename ndnboost::remove_const<AP>::type
+        >::type
+      >::type,
+      typename ndnboost::remove_const<
+        typename ndnboost::remove_pointer<
+          typename ndnboost::remove_const<BP>::type
+        >::type
+      >::type
+    >::value;
+
+  // ptr - ptr has type ptrdiff_t
+  // note, that we do not check if, in ptr - B, B is 
+  // valid for subtraction with a pointer.
+  // the compiler will catch it in the apply function
+
+  typedef typename 
+  detail::IF<
+    same_pointer_type, const std::ptrdiff_t,
+    typename detail::IF<
+      is_pointer_A, 
+      AP, 
+      detail::return_type_deduction_failure<detail::illegal_pointer_arithmetic>
+    >::RET
+  >::RET type; 
+};
+
+} // namespace detail
+   
+// -- arithmetic actions ---------------------------------------------
+
+namespace detail {
+   
+template<bool is_pointer_arithmetic, class Act, class A, class B> 
+struct return_type_2_arithmetic_phase_1;
+
+template<class A, class B> struct return_type_2_arithmetic_phase_2;
+template<class A, class B> struct return_type_2_arithmetic_phase_3;
+
+} // namespace detail
+  
+
+// drop any qualifiers from the argument types within arithmetic_action
+template<class A, class B, class Act> 
+struct return_type_2<arithmetic_action<Act>, A, B>
+{
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<arithmetic_action<Act>, plain_A, plain_B>::type type1;
+  
+  // if user defined return type, do not enter the whole arithmetic deductions
+  typedef typename 
+    detail::IF_type<
+      ndnboost::is_same<type1, detail::unspecified>::value, 
+      detail::return_type_2_arithmetic_phase_1<
+         detail::pointer_arithmetic_traits<Act, A, B>::value, Act, A, B
+      >,
+      plain_return_type_2<arithmetic_action<Act>, plain_A, plain_B>
+    >::type type;
+};
+
+namespace detail {
+   
+// perform integral promotion, no pointer arithmetic
+template<bool is_pointer_arithmetic, class Act, class A, class B> 
+struct return_type_2_arithmetic_phase_1
+{
+  typedef typename 
+    return_type_2_arithmetic_phase_2<
+      typename remove_reference_and_cv<A>::type,
+      typename remove_reference_and_cv<B>::type
+    >::type type;
+};
+
+// pointer_arithmetic
+template<class Act, class A, class B> 
+struct return_type_2_arithmetic_phase_1<true, Act, A, B>
+{
+  typedef typename 
+    pointer_arithmetic_traits<Act, A, B>::type type;
+};
+
+template<class A, class B>
+struct return_type_2_arithmetic_phase_2 {
+  typedef typename
+    return_type_2_arithmetic_phase_3<
+      typename promote_to_int<A>::type, 
+      typename promote_to_int<B>::type
+    >::type type;
+};
+
+// specialization for unsigned int.
+// We only have to do these two specialization because the value promotion will
+// take care of the other cases.
+// The unsigned int promotion rule is this:
+// unsigned int to long if a long can hold all values of unsigned int,
+// otherwise go to unsigned long.
+
+// struct so I don't have to type this twice.
+struct promotion_of_unsigned_int
+{
+        typedef
+        detail::IF<sizeof(long) <= sizeof(unsigned int),        
+                unsigned long,
+                long>::RET type; 
+};
+
+template<>
+struct return_type_2_arithmetic_phase_2<unsigned int, long>
+{
+        typedef promotion_of_unsigned_int::type type;
+};
+template<>
+struct return_type_2_arithmetic_phase_2<long, unsigned int>
+{
+        typedef promotion_of_unsigned_int::type type;
+};
+
+
+template<class A, class B> struct return_type_2_arithmetic_phase_3 { 
+   enum { promote_code_A_value = promote_code<A>::value,
+         promote_code_B_value = promote_code<B>::value }; // enums for KCC
+  typedef typename
+    detail::IF<
+      promote_code_A_value == -1 || promote_code_B_value == -1,
+      detail::return_type_deduction_failure<return_type_2_arithmetic_phase_3>,
+      typename detail::IF<
+        ((int)promote_code_A_value > (int)promote_code_B_value), 
+        A, 
+        B
+      >::RET
+    >::RET type;                    
+};
+
+} // namespace detail
+
+// --  bitwise actions -------------------------------------------
+// note: for integral types deuduction is similar to arithmetic actions. 
+
+// drop any qualifiers from the argument types within arithmetic action
+template<class A, class B, class Act> 
+struct return_type_2<bitwise_action<Act>, A, B>
+{
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<bitwise_action<Act>, plain_A, plain_B>::type type1;
+  
+  // if user defined return type, do not enter type deductions
+  typedef typename 
+    detail::IF_type<
+      ndnboost::is_same<type1, detail::unspecified>::value, 
+      return_type_2<arithmetic_action<plus_action>, A, B>,
+      plain_return_type_2<bitwise_action<Act>, plain_A, plain_B>
+    >::type type;
+
+  // plus_action is just a random pick, has to be a concrete instance
+
+  // TODO: This check is only valid for built-in types, overloaded types might
+  // accept floating point operators
+
+  // bitwise operators not defined for floating point types
+  // these test are not strictly needed here, since the error will be caught in
+  // the apply function
+  BOOST_STATIC_ASSERT(!(ndnboost::is_float<plain_A>::value && ndnboost::is_float<plain_B>::value));
+
+};
+
+namespace detail {
+
+#ifdef BOOST_NO_TEMPLATED_STREAMS
+
+template<class A, class B>
+struct leftshift_type {
+
+  typedef typename detail::IF<
+    ndnboost::is_convertible<
+      typename ndnboost::remove_reference<A>::type*,
+      std::ostream*
+    >::value,
+    std::ostream&, 
+    typename detail::remove_reference_and_cv<A>::type
+  >::RET type;
+};
+
+template<class A, class B>
+struct rightshift_type {
+
+  typedef typename detail::IF<
+
+    ndnboost::is_convertible<
+      typename ndnboost::remove_reference<A>::type*,
+      std::istream*
+    >::value, 
+    std::istream&,
+    typename detail::remove_reference_and_cv<A>::type
+  >::RET type;
+};
+
+#else
+
+template <class T> struct get_ostream_type {
+  typedef std::basic_ostream<typename T::char_type, 
+                             typename T::traits_type>& type;
+};
+
+template <class T> struct get_istream_type {
+  typedef std::basic_istream<typename T::char_type, 
+                             typename T::traits_type>& type;
+};
+
+template<class A, class B>
+struct leftshift_type {
+private:
+  typedef typename ndnboost::remove_reference<A>::type plainA;
+public:
+  typedef typename detail::IF_type<
+    is_instance_of_2<plainA, std::basic_ostream>::value, 
+    get_ostream_type<plainA>, //reference to the stream 
+    detail::remove_reference_and_cv<A>
+  >::type type;
+};
+
+template<class A, class B>
+struct rightshift_type {
+private:
+  typedef typename ndnboost::remove_reference<A>::type plainA;
+public:
+  typedef typename detail::IF_type<
+    is_instance_of_2<plainA, std::basic_istream>::value, 
+    get_istream_type<plainA>, //reference to the stream 
+    detail::remove_reference_and_cv<A>
+  >::type type;
+};
+
+
+#endif
+
+} // end detail
+
+// ostream
+template<class A, class B> 
+struct return_type_2<bitwise_action<leftshift_action>, A, B>
+{
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<bitwise_action<leftshift_action>, plain_A, plain_B>::type type1;
+  
+  // if user defined return type, do not enter type deductions
+  typedef typename 
+    detail::IF_type<
+      ndnboost::is_same<type1, detail::unspecified>::value, 
+      detail::leftshift_type<A, B>,
+      plain_return_type_2<bitwise_action<leftshift_action>, plain_A, plain_B>
+    >::type type;
+};
+
+// istream
+template<class A, class B> 
+struct return_type_2<bitwise_action<rightshift_action>, A, B>
+{
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<bitwise_action<rightshift_action>, plain_A, plain_B>::type type1;
+  
+  // if user defined return type, do not enter type deductions
+  typedef typename 
+    detail::IF_type<
+      ndnboost::is_same<type1, detail::unspecified>::value, 
+      detail::rightshift_type<A, B>,
+      plain_return_type_2<bitwise_action<rightshift_action>, plain_A, plain_B>
+    >::type type;
+};
+
+// -- logical actions ----------------------------------------
+// always bool
+// NOTE: this may not be true for some weird user-defined types,
+template<class A, class B, class Act> 
+struct plain_return_type_2<logical_action<Act>, A, B> { 
+  typedef bool type; 
+};
+
+template<class A, class B, class Act> 
+struct return_type_2<logical_action<Act>, A, B> { 
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<logical_action<Act>, plain_A, plain_B>::type type;
+  
+};
+
+
+// -- relational actions ----------------------------------------
+// always bool
+// NOTE: this may not be true for some weird user-defined types,
+template<class A, class B, class Act> 
+struct plain_return_type_2<relational_action<Act>, A, B> { 
+  typedef bool type; 
+};
+
+template<class A, class B, class Act> 
+struct return_type_2<relational_action<Act>, A, B> { 
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<relational_action<Act>, plain_A, plain_B>::type type; 
+};
+
+// Assingment actions -----------------------------------------------
+// return type is the type of the first argument as reference
+
+// note that cv-qualifiers are preserved.
+// Yes, assignment operator can be const!
+
+// NOTE: this may not be true for some weird user-defined types,
+
+template<class A, class B, class Act> 
+struct return_type_2<arithmetic_assignment_action<Act>, A, B> { 
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<
+      arithmetic_assignment_action<Act>, plain_A, plain_B
+    >::type type1;
+  
+  typedef typename 
+    detail::IF<
+      ndnboost::is_same<type1, detail::unspecified>::value, 
+      typename ndnboost::add_reference<A>::type,
+      type1
+    >::RET type;
+};
+
+template<class A, class B, class Act> 
+struct return_type_2<bitwise_assignment_action<Act>, A, B> { 
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<
+      bitwise_assignment_action<Act>, plain_A, plain_B
+    >::type type1;
+  
+  typedef typename 
+    detail::IF<
+      ndnboost::is_same<type1, detail::unspecified>::value, 
+      typename ndnboost::add_reference<A>::type,
+      type1
+    >::RET type;
+};
+
+template<class A, class B> 
+struct return_type_2<other_action<assignment_action>, A, B> { 
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<
+      other_action<assignment_action>, plain_A, plain_B
+    >::type type1;
+  
+  typedef typename 
+    detail::IF<
+      ndnboost::is_same<type1, detail::unspecified>::value, 
+      typename ndnboost::add_reference<A>::type,
+      type1
+    >::RET type;
+};
+
+// -- other actions ----------------------------------------
+
+// comma action ----------------------------------
+// Note: this may not be true for some weird user-defined types,
+
+// NOTE! This only tries the plain_return_type_2 layer and gives
+// detail::unspecified as default. If no such specialization is found, the 
+// type rule in the spcecialization of the return_type_2_prot is used
+// to give the type of the right argument (which can be a reference too)
+// (The built in operator, can return a l- or rvalue).
+template<class A, class B> 
+struct return_type_2<other_action<comma_action>, A, B> { 
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename 
+    plain_return_type_2<
+      other_action<comma_action>, plain_A, plain_B
+    >::type type;
+  };
+
+// subscript action -----------------------------------------------
+
+
+namespace detail {
+  // A and B are nonreference types
+template <class A, class B> struct subscript_type {
+  typedef detail::unspecified type; 
+};
+
+template <class A, class B> struct subscript_type<A*, B> {
+  typedef A& type;
+};
+template <class A, class B> struct subscript_type<A* const, B> {
+  typedef A& type;
+};
+template <class A, class B> struct subscript_type<A* volatile, B> {
+  typedef A& type;
+};
+template <class A, class B> struct subscript_type<A* const volatile, B> {
+  typedef A& type;
+};
+
+
+template<class A, class B, int N> struct subscript_type<A[N], B> { 
+  typedef A& type; 
+};
+
+  // these 3 specializations are needed to make gcc <3 happy
+template<class A, class B, int N> struct subscript_type<const A[N], B> { 
+  typedef const A& type; 
+};
+template<class A, class B, int N> struct subscript_type<volatile A[N], B> { 
+  typedef volatile A& type; 
+};
+template<class A, class B, int N> struct subscript_type<const volatile A[N], B> { 
+  typedef const volatile A& type; 
+};
+
+} // end detail
+
+template<class A, class B>
+struct return_type_2<other_action<subscript_action>, A, B> {
+
+  typedef typename detail::remove_reference_and_cv<A>::type plain_A;
+  typedef typename detail::remove_reference_and_cv<B>::type plain_B;
+
+  typedef typename ndnboost::remove_reference<A>::type nonref_A;
+  typedef typename ndnboost::remove_reference<B>::type nonref_B;
+
+  typedef typename 
+    plain_return_type_2<
+      other_action<subscript_action>, plain_A, plain_B
+    >::type type1;
+  
+  typedef typename 
+    detail::IF_type<
+      ndnboost::is_same<type1, detail::unspecified>::value, 
+      detail::subscript_type<nonref_A, nonref_B>,
+      plain_return_type_2<other_action<subscript_action>, plain_A, plain_B>
+    >::type type;
+
+};
+
+template<class Key, class T, class Cmp, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, std::map<Key, T, Cmp, Allocator>, B> { 
+  typedef T& type;
+  // T == std::map<Key, T, Cmp, Allocator>::mapped_type; 
+};
+
+template<class Key, class T, class Cmp, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, std::multimap<Key, T, Cmp, Allocator>, B> { 
+  typedef T& type;
+  // T == std::map<Key, T, Cmp, Allocator>::mapped_type; 
+};
+
+  // deque
+template<class T, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, std::deque<T, Allocator>, B> { 
+  typedef typename std::deque<T, Allocator>::reference type;
+};
+template<class T, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, const std::deque<T, Allocator>, B> { 
+  typedef typename std::deque<T, Allocator>::const_reference type;
+};
+
+  // vector
+template<class T, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, std::vector<T, Allocator>, B> { 
+  typedef typename std::vector<T, Allocator>::reference type;
+};
+template<class T, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, const std::vector<T, Allocator>, B> { 
+  typedef typename std::vector<T, Allocator>::const_reference type;
+};
+
+  // basic_string
+template<class Char, class Traits, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, std::basic_string<Char, Traits, Allocator>, B> { 
+  typedef typename std::basic_string<Char, Traits, Allocator>::reference type;
+};
+template<class Char, class Traits, class Allocator, class B> 
+struct plain_return_type_2<other_action<subscript_action>, const std::basic_string<Char, Traits, Allocator>, B> { 
+  typedef typename std::basic_string<Char, Traits, Allocator>::const_reference type;
+};
+
+template<class Char, class Traits, class Allocator> 
+struct plain_return_type_2<arithmetic_action<plus_action>,
+                           std::basic_string<Char, Traits, Allocator>,
+                           std::basic_string<Char, Traits, Allocator> > { 
+  typedef std::basic_string<Char, Traits, Allocator> type;
+};
+
+template<class Char, class Traits, class Allocator> 
+struct plain_return_type_2<arithmetic_action<plus_action>,
+                           const Char*,
+                           std::basic_string<Char, Traits, Allocator> > { 
+  typedef std::basic_string<Char, Traits, Allocator> type;
+};
+
+template<class Char, class Traits, class Allocator> 
+struct plain_return_type_2<arithmetic_action<plus_action>,
+                           std::basic_string<Char, Traits, Allocator>,
+                           const Char*> { 
+  typedef std::basic_string<Char, Traits, Allocator> type;
+};
+
+template<class Char, class Traits, class Allocator, std::size_t N> 
+struct plain_return_type_2<arithmetic_action<plus_action>,
+                           Char[N],
+                           std::basic_string<Char, Traits, Allocator> > { 
+  typedef std::basic_string<Char, Traits, Allocator> type;
+};
+
+template<class Char, class Traits, class Allocator, std::size_t N> 
+struct plain_return_type_2<arithmetic_action<plus_action>,
+                           std::basic_string<Char, Traits, Allocator>,
+                           Char[N]> { 
+  typedef std::basic_string<Char, Traits, Allocator> type;
+};
+
+
+} // namespace lambda
+} // namespace ndnboost
+
+#endif
+
+
diff --git a/ndnboost/lambda/detail/operators.hpp b/ndnboost/lambda/detail/operators.hpp
new file mode 100644
index 0000000..7c3bc8b
--- /dev/null
+++ b/ndnboost/lambda/detail/operators.hpp
@@ -0,0 +1,370 @@
+// Boost Lambda Library - operators.hpp --------------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+// ---------------------------------------------------------------
+
+#ifndef BOOST_LAMBDA_OPERATORS_HPP
+#define BOOST_LAMBDA_OPERATORS_HPP
+
+#include "ndnboost/lambda/detail/is_instance_of.hpp"
+
+namespace ndnboost { 
+namespace lambda {
+
+#if defined BOOST_LAMBDA_BE1
+#error "Multiple defines of BOOST_LAMBDA_BE1"
+#endif
+
+  // For all BOOSTA_LAMBDA_BE* macros:
+
+  // CONSTA must be either 'A' or 'const A'
+  // CONSTB must be either 'B' or 'const B'
+
+  // It is stupid to have the names A and B as macro arguments, but it avoids
+  // the need to pass in emtpy macro arguments, which gives warnings on some
+  // compilers
+
+#define BOOST_LAMBDA_BE1(OPER_NAME, ACTION, CONSTA, CONSTB, CONVERSION)      \
+template<class Arg, class B>                                                 \
+inline const                                                                 \
+lambda_functor<                                                              \
+  lambda_functor_base<                                                       \
+    ACTION,                                                                  \
+    tuple<lambda_functor<Arg>, typename const_copy_argument <CONSTB>::type>  \
+  >                                                                          \
+>                                                                            \
+OPER_NAME (const lambda_functor<Arg>& a, CONSTB& b) {                      \
+  return                                                                     \
+    lambda_functor_base<                                                     \
+      ACTION,                                                                \
+      tuple<lambda_functor<Arg>, typename const_copy_argument <CONSTB>::type>\
+    >                                                                        \
+   (tuple<lambda_functor<Arg>, typename const_copy_argument <CONSTB>::type>(a, b)); \
+}
+
+
+#if defined BOOST_LAMBDA_BE2
+#error "Multiple defines of BOOST_LAMBDA_BE2"
+#endif
+
+#define BOOST_LAMBDA_BE2(OPER_NAME, ACTION, CONSTA, CONSTB, CONVERSION)      \
+template<class A, class Arg>                                                 \
+inline const                                                                 \
+lambda_functor<                                                              \
+  lambda_functor_base<                                                       \
+    ACTION,                                                                  \
+    tuple<typename CONVERSION <CONSTA>::type, lambda_functor<Arg> >        \
+  >                                                                          \
+>                                                                            \
+OPER_NAME (CONSTA& a, const lambda_functor<Arg>& b) {                      \
+  return                                                                     \
+    lambda_functor_base<                                                     \
+      ACTION,                                                                \
+      tuple<typename CONVERSION <CONSTA>::type, lambda_functor<Arg> >      \
+    >                                                                        \
+  (tuple<typename CONVERSION <CONSTA>::type, lambda_functor<Arg> >(a, b)); \
+}
+
+
+#if defined BOOST_LAMBDA_BE3
+#error "Multiple defines of BOOST_LAMBDA_BE3"
+#endif
+
+#define BOOST_LAMBDA_BE3(OPER_NAME, ACTION, CONSTA, CONSTB, CONVERSION)    \
+template<class ArgA, class ArgB>                                           \
+inline const                                                               \
+lambda_functor<                                                            \
+  lambda_functor_base<                                                     \
+    ACTION,                                                                \
+    tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >                     \
+  >                                                                        \
+>                                                                          \
+OPER_NAME (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { \
+  return                                                                   \
+    lambda_functor_base<                                                   \
+      ACTION,                                                              \
+      tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >                   \
+    >                                                                      \
+  (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b));              \
+}
+
+#if defined BOOST_LAMBDA_BE
+#error "Multiple defines of BOOST_LAMBDA_BE"
+#endif
+
+#define BOOST_LAMBDA_BE(OPER_NAME, ACTION, CONSTA, CONSTB, CONST_CONVERSION) \
+BOOST_LAMBDA_BE1(OPER_NAME, ACTION, CONSTA, CONSTB, CONST_CONVERSION)        \
+BOOST_LAMBDA_BE2(OPER_NAME, ACTION, CONSTA, CONSTB, CONST_CONVERSION)        \
+BOOST_LAMBDA_BE3(OPER_NAME, ACTION, CONSTA, CONSTB, CONST_CONVERSION)
+
+#define BOOST_LAMBDA_EMPTY() 
+
+BOOST_LAMBDA_BE(operator+, arithmetic_action<plus_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator-, arithmetic_action<minus_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator*, arithmetic_action<multiply_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator/, arithmetic_action<divide_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator%, arithmetic_action<remainder_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator<<, bitwise_action<leftshift_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator>>, bitwise_action<rightshift_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator&, bitwise_action<and_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator|, bitwise_action<or_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator^, bitwise_action<xor_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator&&, logical_action<and_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator||, logical_action<or_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator<, relational_action<less_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator>, relational_action<greater_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator<=, relational_action<lessorequal_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator>=, relational_action<greaterorequal_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator==, relational_action<equal_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE(operator!=, relational_action<notequal_action>, const A, const B, const_copy_argument)
+
+BOOST_LAMBDA_BE(operator+=, arithmetic_assignment_action<plus_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator-=, arithmetic_assignment_action<minus_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator*=, arithmetic_assignment_action<multiply_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator/=, arithmetic_assignment_action<divide_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator%=, arithmetic_assignment_action<remainder_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator<<=, bitwise_assignment_action<leftshift_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator>>=, bitwise_assignment_action<rightshift_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator&=, bitwise_assignment_action<and_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator|=, bitwise_assignment_action<or_action>, A, const B, reference_argument)
+BOOST_LAMBDA_BE(operator^=, bitwise_assignment_action<xor_action>, A, const B, reference_argument)
+
+
+// A special trick for comma operator for correct preprocessing
+#if defined BOOST_LAMBDA_COMMA_OPERATOR_NAME
+#error "Multiple defines of BOOST_LAMBDA_COMMA_OPERATOR_NAME"
+#endif
+
+#define BOOST_LAMBDA_COMMA_OPERATOR_NAME operator,
+
+BOOST_LAMBDA_BE1(BOOST_LAMBDA_COMMA_OPERATOR_NAME, other_action<comma_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE2(BOOST_LAMBDA_COMMA_OPERATOR_NAME, other_action<comma_action>, const A, const B, const_copy_argument)
+BOOST_LAMBDA_BE3(BOOST_LAMBDA_COMMA_OPERATOR_NAME, other_action<comma_action>, const A, const B, const_copy_argument)
+
+
+
+namespace detail {
+
+// special cases for ostream& << Any and istream& >> Any ---------------
+// the actual stream classes may vary and thus a specialisation for, 
+// say ostream& does not match (the general case above is chosen). 
+// Therefore we specialise for non-const reference:
+// if the left argument is a stream, we store the stream as reference
+// if it is something else, we store a const plain by default
+
+// Note that the overloading is const vs. non-const first argument
+
+#ifdef BOOST_NO_TEMPLATED_STREAMS
+template<class T> struct convert_ostream_to_ref_others_to_c_plain_by_default {
+  typedef typename detail::IF<
+                       ndnboost::is_convertible<T*, std::ostream*>::value,
+                       T&,
+                       typename const_copy_argument <T>::type
+                     >::RET type;
+};
+
+template<class T> struct convert_istream_to_ref_others_to_c_plain_by_default {
+  typedef typename detail::IF<
+                       ndnboost::is_convertible<T*, std::istream*>::value,
+                       T&,
+                       typename const_copy_argument <T>::type
+                     >::RET type;
+};
+#else
+
+template<class T> struct convert_ostream_to_ref_others_to_c_plain_by_default {
+  typedef typename detail::IF<
+                       is_instance_of_2<
+                         T, std::basic_ostream
+                       >::value,
+                       T&,
+                       typename const_copy_argument <T>::type
+                     >::RET type;
+};
+
+template<class T> struct convert_istream_to_ref_others_to_c_plain_by_default {
+  typedef typename detail::IF<
+                       is_instance_of_2<
+                         T, std::basic_istream
+                       >::value,
+                       T&,
+                       typename const_copy_argument <T>::type
+                     >::RET type;
+};
+#endif
+
+} // detail
+
+BOOST_LAMBDA_BE2(operator<<, bitwise_action< leftshift_action>, A, const B, detail::convert_ostream_to_ref_others_to_c_plain_by_default)
+BOOST_LAMBDA_BE2(operator>>, bitwise_action< rightshift_action>, A, const B, detail::convert_istream_to_ref_others_to_c_plain_by_default)      
+
+
+// special case for io_manipulators.
+// function references cannot be given as arguments to lambda operator
+// expressions in general. With << and >> the use of manipulators is
+// so common, that specializations are provided to make them work.
+
+template<class Arg, class Ret, class ManipArg>
+inline const 
+lambda_functor<
+  lambda_functor_base<
+    bitwise_action<leftshift_action>,
+    tuple<lambda_functor<Arg>, Ret(&)(ManipArg)> 
+  > 
+>
+operator<<(const lambda_functor<Arg>& a, Ret(&b)(ManipArg))
+{
+  return 
+      lambda_functor_base<
+        bitwise_action<leftshift_action>,
+        tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>
+      > 
+    ( tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>(a, b) );
+}
+
+template<class Arg, class Ret, class ManipArg>
+inline const 
+lambda_functor<
+  lambda_functor_base<
+    bitwise_action<rightshift_action>,
+    tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>
+  > 
+>
+operator>>(const lambda_functor<Arg>& a, Ret(&b)(ManipArg))
+{
+  return 
+      lambda_functor_base<
+        bitwise_action<rightshift_action>,
+        tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>
+      > 
+    ( tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>(a, b) );
+}
+
+
+// (+ and -) take their arguments as const references. 
+// This has consquences with pointer artihmetic
+// E.g int a[]; ... *a = 1 works but not *(a+1) = 1. 
+// the result of a+1 would be const
+// To make the latter work too, 
+// non-const arrays are taken as non-const and stored as non-const as well.
+#if defined  BOOST_LAMBDA_PTR_ARITHMETIC_E1
+#error "Multiple defines of  BOOST_LAMBDA_PTR_ARITHMETIC_E1"
+#endif
+
+#define BOOST_LAMBDA_PTR_ARITHMETIC_E1(OPER_NAME, ACTION, CONSTB)           \
+template<class Arg, int N, class B>                                         \
+inline const                                                                \
+lambda_functor<                                                             \
+  lambda_functor_base<ACTION, tuple<lambda_functor<Arg>, CONSTB(&)[N]> >    \
+>                                                                           \
+OPER_NAME (const lambda_functor<Arg>& a, CONSTB(&b)[N])                     \
+{                                                                           \
+  return                                                                    \
+    lambda_functor_base<ACTION, tuple<lambda_functor<Arg>, CONSTB(&)[N]> >  \
+  (tuple<lambda_functor<Arg>, CONSTB(&)[N]>(a, b));                         \
+}
+
+
+#if defined  BOOST_LAMBDA_PTR_ARITHMETIC_E2
+#error "Multiple defines of  BOOST_LAMBDA_PTR_ARITHMETIC_E2"
+#endif
+
+#define BOOST_LAMBDA_PTR_ARITHMETIC_E2(OPER_NAME, ACTION, CONSTA)           \
+template<int N, class A, class Arg>                                         \
+inline const                                                                \
+lambda_functor<                                                             \
+  lambda_functor_base<ACTION, tuple<CONSTA(&)[N], lambda_functor<Arg> > >   \
+>                                                                           \
+OPER_NAME (CONSTA(&a)[N], const lambda_functor<Arg>& b)                     \
+{                                                                           \
+  return                                                                    \
+    lambda_functor_base<ACTION, tuple<CONSTA(&)[N], lambda_functor<Arg> > > \
+    (tuple<CONSTA(&)[N], lambda_functor<Arg> >(a, b));                      \
+}
+
+
+BOOST_LAMBDA_PTR_ARITHMETIC_E1(operator+, arithmetic_action<plus_action>, B)
+BOOST_LAMBDA_PTR_ARITHMETIC_E2(operator+, arithmetic_action<plus_action>, A)
+BOOST_LAMBDA_PTR_ARITHMETIC_E1(operator+, arithmetic_action<plus_action>,const B)
+BOOST_LAMBDA_PTR_ARITHMETIC_E2(operator+, arithmetic_action<plus_action>,const A)
+
+
+//BOOST_LAMBDA_PTR_ARITHMETIC_E1(operator-, arithmetic_action<minus_action>)
+// This is not needed, since the result of ptr-ptr is an rvalue anyway
+
+BOOST_LAMBDA_PTR_ARITHMETIC_E2(operator-, arithmetic_action<minus_action>, A)
+BOOST_LAMBDA_PTR_ARITHMETIC_E2(operator-, arithmetic_action<minus_action>, const A)
+
+
+#undef BOOST_LAMBDA_BE1
+#undef BOOST_LAMBDA_BE2
+#undef BOOST_LAMBDA_BE3
+#undef BOOST_LAMBDA_BE
+#undef BOOST_LAMBDA_COMMA_OPERATOR_NAME
+
+#undef BOOST_LAMBDA_PTR_ARITHMETIC_E1
+#undef BOOST_LAMBDA_PTR_ARITHMETIC_E2
+
+
+// ---------------------------------------------------------------------
+// unary operators -----------------------------------------------------
+// ---------------------------------------------------------------------
+
+#if defined BOOST_LAMBDA_UE
+#error "Multiple defines of BOOST_LAMBDA_UE"
+#endif
+
+#define BOOST_LAMBDA_UE(OPER_NAME, ACTION)                                 \
+template<class Arg>                                                        \
+inline const                                                               \
+lambda_functor<lambda_functor_base<ACTION, tuple<lambda_functor<Arg> > > > \
+OPER_NAME (const lambda_functor<Arg>& a)                                   \
+{                                                                          \
+  return                                                                   \
+    lambda_functor_base<ACTION, tuple<lambda_functor<Arg> > >              \
+    ( tuple<lambda_functor<Arg> >(a) );                                    \
+}
+
+
+BOOST_LAMBDA_UE(operator+, unary_arithmetic_action<plus_action>)
+BOOST_LAMBDA_UE(operator-, unary_arithmetic_action<minus_action>)
+BOOST_LAMBDA_UE(operator~, bitwise_action<not_action>)
+BOOST_LAMBDA_UE(operator!, logical_action<not_action>)
+BOOST_LAMBDA_UE(operator++, pre_increment_decrement_action<increment_action>)
+BOOST_LAMBDA_UE(operator--, pre_increment_decrement_action<decrement_action>)
+BOOST_LAMBDA_UE(operator*, other_action<contentsof_action>)
+BOOST_LAMBDA_UE(operator&, other_action<addressof_action>)
+
+#if defined BOOST_LAMBDA_POSTFIX_UE
+#error "Multiple defines of BOOST_LAMBDA_POSTFIX_UE"
+#endif
+
+#define BOOST_LAMBDA_POSTFIX_UE(OPER_NAME, ACTION)                         \
+template<class Arg>                                                        \
+inline const                                                               \
+lambda_functor<lambda_functor_base<ACTION, tuple<lambda_functor<Arg> > > > \
+OPER_NAME (const lambda_functor<Arg>& a, int)                              \
+{                                                                          \
+  return                                                                   \
+    lambda_functor_base<ACTION, tuple<lambda_functor<Arg> > >              \
+    ( tuple<lambda_functor<Arg> >(a) );                                    \
+}
+
+
+BOOST_LAMBDA_POSTFIX_UE(operator++, post_increment_decrement_action<increment_action>)
+BOOST_LAMBDA_POSTFIX_UE(operator--, post_increment_decrement_action<decrement_action>)
+
+#undef BOOST_LAMBDA_UE
+#undef BOOST_LAMBDA_POSTFIX_UE
+
+} // namespace lambda
+} // namespace ndnboost
+
+#endif
diff --git a/ndnboost/lambda/detail/ret.hpp b/ndnboost/lambda/detail/ret.hpp
new file mode 100644
index 0000000..8261bbd
--- /dev/null
+++ b/ndnboost/lambda/detail/ret.hpp
@@ -0,0 +1,325 @@
+// Boost Lambda Library  ret.hpp -----------------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+
+#ifndef BOOST_LAMBDA_RET_HPP
+#define BOOST_LAMBDA_RET_HPP
+
+namespace ndnboost { 
+namespace lambda {
+
+  // TODO:
+
+//  Add specializations for function references for ret, protect and unlambda
+//  e.g void foo(); unlambda(foo); fails, as it would add a const qualifier
+  // for a function type. 
+  // on the other hand unlambda(*foo) does work
+
+
+// -- ret -------------------------
+// the explicit return type template 
+
+  // TODO: It'd be nice to make ret a nop for other than lambda functors
+  // but causes an ambiguiyty with gcc (not with KCC), check what is the
+  // right interpretation.
+
+  //  // ret for others than lambda functors has no effect
+  // template <class U, class T>
+  // inline const T& ret(const T& t) { return t; }
+
+
+template<class RET, class Arg>
+inline const 
+lambda_functor<
+  lambda_functor_base<
+    explicit_return_type_action<RET>, 
+    tuple<lambda_functor<Arg> >
+  > 
+>
+ret(const lambda_functor<Arg>& a1)
+{
+  return  
+    lambda_functor_base<
+      explicit_return_type_action<RET>, 
+      tuple<lambda_functor<Arg> >
+    > 
+    (tuple<lambda_functor<Arg> >(a1));
+}
+
+// protect ------------------
+
+  // protecting others than lambda functors has no effect
+template <class T>
+inline const T& protect(const T& t) { return t; }
+
+template<class Arg>
+inline const 
+lambda_functor<
+  lambda_functor_base<
+    protect_action, 
+    tuple<lambda_functor<Arg> >
+  > 
+>
+protect(const lambda_functor<Arg>& a1)
+{
+  return 
+      lambda_functor_base<
+        protect_action, 
+        tuple<lambda_functor<Arg> >
+      > 
+    (tuple<lambda_functor<Arg> >(a1));
+}
+   
+// -------------------------------------------------------------------
+
+// Hides the lambda functorness of a lambda functor. 
+// After this, the functor is immune to argument substitution, etc.
+// This can be used, e.g. to make it safe to pass lambda functors as 
+// arguments to functions, which might use them as target functions
+
+// note, unlambda and protect are different things. Protect hides the lambda
+// functor for one application, unlambda for good.
+
+template <class LambdaFunctor>
+class non_lambda_functor
+{
+  LambdaFunctor lf;
+public:
+  
+  // This functor defines the result_type typedef.
+  // The result type must be deducible without knowing the arguments
+
+  template <class SigArgs> struct sig {
+    typedef typename 
+      LambdaFunctor::inherited:: 
+        template sig<typename SigArgs::tail_type>::type type;
+  };
+
+  explicit non_lambda_functor(const LambdaFunctor& a) : lf(a) {}
+
+  typename LambdaFunctor::nullary_return_type  
+  operator()() const {
+    return lf.template 
+      call<typename LambdaFunctor::nullary_return_type>
+        (cnull_type(), cnull_type(), cnull_type(), cnull_type()); 
+  }
+
+  template<class A>
+  typename sig<tuple<const non_lambda_functor, A&> >::type 
+  operator()(A& a) const {
+    return lf.template call<typename sig<tuple<const non_lambda_functor, A&> >::type >(a, cnull_type(), cnull_type(), cnull_type()); 
+  }
+
+  template<class A, class B>
+  typename sig<tuple<const non_lambda_functor, A&, B&> >::type 
+  operator()(A& a, B& b) const {
+    return lf.template call<typename sig<tuple<const non_lambda_functor, A&, B&> >::type >(a, b, cnull_type(), cnull_type()); 
+  }
+
+  template<class A, class B, class C>
+  typename sig<tuple<const non_lambda_functor, A&, B&, C&> >::type 
+  operator()(A& a, B& b, C& c) const {
+    return lf.template call<typename sig<tuple<const non_lambda_functor, A&, B&, C&> >::type>(a, b, c, cnull_type()); 
+  }
+};
+
+template <class Arg>
+inline const Arg& unlambda(const Arg& a) { return a; }
+
+template <class Arg>
+inline const non_lambda_functor<lambda_functor<Arg> > 
+unlambda(const lambda_functor<Arg>& a)
+{
+  return non_lambda_functor<lambda_functor<Arg> >(a);
+}
+
+  // Due to a language restriction, lambda functors cannot be made to
+  // accept non-const rvalue arguments. Usually iterators do not return 
+  // temporaries, but sometimes they do. That's why a workaround is provided.
+  // Note, that this potentially breaks const correctness, so be careful!
+
+// any lambda functor can be turned into a const_incorrect_lambda_functor
+// The operator() takes arguments as consts and then casts constness
+// away. So this breaks const correctness!!! but is a necessary workaround
+// in some cases due to language limitations.
+// Note, that this is not a lambda_functor anymore, so it can not be used
+// as a sub lambda expression.
+
+template <class LambdaFunctor>
+struct const_incorrect_lambda_functor {
+  LambdaFunctor lf;
+public:
+
+  explicit const_incorrect_lambda_functor(const LambdaFunctor& a) : lf(a) {}
+
+  template <class SigArgs> struct sig {
+    typedef typename
+      LambdaFunctor::inherited::template 
+        sig<typename SigArgs::tail_type>::type type;
+  };
+
+  // The nullary case is not needed (no arguments, no parameter type problems)
+
+  template<class A>
+  typename sig<tuple<const const_incorrect_lambda_functor, A&> >::type
+  operator()(const A& a) const {
+    return lf.template call<typename sig<tuple<const const_incorrect_lambda_functor, A&> >::type >(const_cast<A&>(a), cnull_type(), cnull_type(), cnull_type());
+  }
+
+  template<class A, class B>
+  typename sig<tuple<const const_incorrect_lambda_functor, A&, B&> >::type
+  operator()(const A& a, const B& b) const {
+    return lf.template call<typename sig<tuple<const const_incorrect_lambda_functor, A&, B&> >::type >(const_cast<A&>(a), const_cast<B&>(b), cnull_type(), cnull_type());
+  }
+
+  template<class A, class B, class C>
+  typename sig<tuple<const const_incorrect_lambda_functor, A&, B&, C&> >::type
+  operator()(const A& a, const B& b, const C& c) const {
+    return lf.template call<typename sig<tuple<const const_incorrect_lambda_functor, A&, B&, C&> >::type>(const_cast<A&>(a), const_cast<B&>(b), const_cast<C&>(c), cnull_type());
+  }
+};
+
+// ------------------------------------------------------------------------
+// any lambda functor can be turned into a const_parameter_lambda_functor
+// The operator() takes arguments as const.
+// This is useful if lambda functors are called with non-const rvalues.
+// Note, that this is not a lambda_functor anymore, so it can not be used
+// as a sub lambda expression.
+
+template <class LambdaFunctor>
+struct const_parameter_lambda_functor {
+  LambdaFunctor lf;
+public:
+
+  explicit const_parameter_lambda_functor(const LambdaFunctor& a) : lf(a) {}
+
+  template <class SigArgs> struct sig {
+    typedef typename
+      LambdaFunctor::inherited::template 
+        sig<typename SigArgs::tail_type>::type type;
+  };
+
+  // The nullary case is not needed: no arguments, no constness problems.
+
+  template<class A>
+  typename sig<tuple<const const_parameter_lambda_functor, const A&> >::type
+  operator()(const A& a) const {
+    return lf.template call<typename sig<tuple<const const_parameter_lambda_functor, const A&> >::type >(a, cnull_type(), cnull_type(), cnull_type());
+  }
+
+  template<class A, class B>
+  typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&> >::type
+  operator()(const A& a, const B& b) const {
+    return lf.template call<typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&> >::type >(a, b, cnull_type(), cnull_type());
+  }
+
+  template<class A, class B, class C>
+  typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&, const C&>
+>::type
+  operator()(const A& a, const B& b, const C& c) const {
+    return lf.template call<typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&, const C&> >::type>(a, b, c, cnull_type());
+  }
+};
+
+template <class Arg>
+inline const const_incorrect_lambda_functor<lambda_functor<Arg> >
+break_const(const lambda_functor<Arg>& lf)
+{
+  return const_incorrect_lambda_functor<lambda_functor<Arg> >(lf);
+}
+
+
+template <class Arg>
+inline const const_parameter_lambda_functor<lambda_functor<Arg> >
+const_parameters(const lambda_functor<Arg>& lf)
+{
+  return const_parameter_lambda_functor<lambda_functor<Arg> >(lf);
+}
+
+// make void ------------------------------------------------
+// make_void( x ) turns a lambda functor x with some return type y into
+// another lambda functor, which has a void return type
+// when called, the original return type is discarded
+
+// we use this action. The action class will be called, which means that
+// the wrapped lambda functor is evaluated, but we just don't do anything
+// with the result.
+struct voidifier_action {
+  template<class Ret, class A> static void apply(A&) {}
+};
+
+template<class Args> struct return_type_N<voidifier_action, Args> {
+  typedef void type;
+};
+
+template<class Arg1>
+inline const 
+lambda_functor<
+  lambda_functor_base<
+    action<1, voidifier_action>,
+    tuple<lambda_functor<Arg1> >
+  > 
+> 
+make_void(const lambda_functor<Arg1>& a1) { 
+return 
+    lambda_functor_base<
+      action<1, voidifier_action>,
+      tuple<lambda_functor<Arg1> >
+    > 
+  (tuple<lambda_functor<Arg1> > (a1));
+}
+
+// for non-lambda functors, make_void does nothing 
+// (the argument gets evaluated immediately)
+
+template<class Arg1>
+inline const 
+lambda_functor<
+  lambda_functor_base<do_nothing_action, null_type> 
+> 
+make_void(const Arg1&) { 
+return 
+    lambda_functor_base<do_nothing_action, null_type>();
+}
+
+// std_functor -----------------------------------------------------
+
+//  The STL uses the result_type typedef as the convention to let binders know
+//  the return type of a function object. 
+//  LL uses the sig template.
+//  To let LL know that the function object has the result_type typedef 
+//  defined, it can be wrapped with the std_functor function.
+
+
+// Just inherit form the template parameter (the standard functor), 
+// and provide a sig template. So we have a class which is still the
+// same functor + the sig template.
+
+template<class T>
+struct result_type_to_sig : public T {
+  template<class Args> struct sig { typedef typename T::result_type type; };
+  result_type_to_sig(const T& t) : T(t) {}
+};
+
+template<class F>
+inline result_type_to_sig<F> std_functor(const F& f) { return f; }
+
+
+} // namespace lambda 
+} // namespace ndnboost
+
+#endif
+
+
+
+
+
+
+
diff --git a/ndnboost/lambda/detail/return_type_traits.hpp b/ndnboost/lambda/detail/return_type_traits.hpp
new file mode 100644
index 0000000..58771b7
--- /dev/null
+++ b/ndnboost/lambda/detail/return_type_traits.hpp
@@ -0,0 +1,282 @@
+//  return_type_traits.hpp -- Boost Lambda Library ---------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see www.boost.org
+
+
+#ifndef BOOST_LAMBDA_RETURN_TYPE_TRAITS_HPP
+#define BOOST_LAMBDA_RETURN_TYPE_TRAITS_HPP
+
+#include "ndnboost/mpl/has_xxx.hpp"
+
+#include <cstddef> // needed for the ptrdiff_t
+
+namespace ndnboost { 
+namespace lambda {
+
+using ::ndnboost::type_traits::ice_and;
+using ::ndnboost::type_traits::ice_or;
+using ::ndnboost::type_traits::ice_not;
+
+// Much of the type deduction code for standard arithmetic types 
+// from Gary Powell
+
+  // different arities:
+template <class Act, class A1> struct return_type_1; // 1-ary actions
+template <class Act, class A1, class A2> struct return_type_2; // 2-ary
+template <class Act, class Args> struct return_type_N; // >3- ary
+
+template <class Act, class A1> struct return_type_1_prot;
+template <class Act, class A1, class A2> struct return_type_2_prot; // 2-ary
+template <class Act, class A1> struct return_type_N_prot; // >3-ary
+
+
+namespace detail {
+
+template<class> class return_type_deduction_failure {};
+
+  // In some cases return type deduction should fail (an invalid lambda 
+  // expression). Sometimes the lambda expression can be ok, the return type
+  // just is not deducible (user defined operators). Then return type deduction
+  // should never be entered at all, and the use of ret<> does this.
+  // However, for nullary lambda functors, return type deduction is always
+  // entered, and there seems to be no way around this.
+
+  // (the return type is part of the prototype of the non-template
+  // operator()(). The prototype is instantiated, even though the body 
+  // is not.) 
+ 
+  // So, in the case the return type deduction should fail, it should not
+  // fail directly, but rather result in a valid but wrong return type,
+  // causing a compile time error only if the function is really called.
+
+
+
+} // end detail
+
+
+
+// return_type_X_prot classes --------------------------------------------
+// These classes are the first layer that gets instantiated from the 
+// lambda_functor_base sig templates. It will check whether 
+// the action is protectable and one of arguments is "protected" or its
+// evaluation will otherwise result in another lambda functor.
+// If this is a case, the result type will be another lambda functor.
+
+// The arguments are always non-reference types, except for comma action
+// where the right argument can be a reference too. This is because it 
+// matters (in the builtin case) whether the argument is an lvalue or 
+// rvalue: int i; i, 1 -> rvalue; 1, i -> lvalue
+
+template <class Act, class A> struct return_type_1_prot {
+public:
+  typedef typename 
+    detail::IF<
+  //      is_protectable<Act>::value && is_lambda_functor<A>::value,
+      ice_and<is_protectable<Act>::value, is_lambda_functor<A>::value>::value,
+      lambda_functor<
+        lambda_functor_base< 
+          Act, 
+          tuple<typename detail::remove_reference_and_cv<A>::type>
+        >
+      >,
+      typename return_type_1<Act, A>::type
+    >::RET type;  
+};
+
+  // take care of the unavoidable instantiation for nullary case
+template<class Act> struct return_type_1_prot<Act, null_type> {
+  typedef null_type type;
+};
+ 
+// Unary actions (result from unary operators)
+// do not have a default return type.
+template<class Act, class A> struct return_type_1 { 
+   typedef typename 
+     detail::return_type_deduction_failure<return_type_1> type;
+};
+
+
+namespace detail {
+
+  template <class T>
+  class protect_conversion {
+      typedef typename ndnboost::remove_reference<T>::type non_ref_T;
+    public:
+
+  // add const to rvalues, so that all rvalues are stored as const in 
+  // the args tuple
+    typedef typename detail::IF_type<
+//      ndnboost::is_reference<T>::value && !ndnboost::is_const<non_ref_T>::value,
+      ice_and<ndnboost::is_reference<T>::value,
+              ice_not<ndnboost::is_const<non_ref_T>::value>::value>::value,
+      detail::identity_mapping<T>,
+      const_copy_argument<non_ref_T> // handles funtion and array 
+    >::type type;                      // types correctly
+  };
+
+} // end detail
+
+template <class Act, class A, class B> struct return_type_2_prot {
+
+// experimental feature
+  // We may have a lambda functor as a result type of a subexpression 
+  // (if protect) has  been used.
+  // Thus, if one of the parameter types is a lambda functor, the result
+  // is a lambda functor as well. 
+  // We need to make a conservative choise here.
+  // The resulting lambda functor stores all const reference arguments as
+  // const copies. References to non-const are stored as such.
+  // So if the source of the argument is a const open argument, a bound
+  // argument stored as a const reference, or a function returning a 
+  // const reference, that information is lost. There is no way of 
+  // telling apart 'real const references' from just 'LL internal
+  // const references' (or it would be really hard)
+
+  // The return type is a subclass of lambda_functor, which has a converting 
+  // copy constructor. It can copy any lambda functor, that has the same 
+  // action type and code, and a copy compatible argument tuple.
+
+
+  typedef typename ndnboost::remove_reference<A>::type non_ref_A;
+  typedef typename ndnboost::remove_reference<B>::type non_ref_B;
+
+typedef typename 
+  detail::IF<
+//    is_protectable<Act>::value &&
+//      (is_lambda_functor<A>::value || is_lambda_functor<B>::value),
+    ice_and<is_protectable<Act>::value,
+            ice_or<is_lambda_functor<A>::value, 
+                   is_lambda_functor<B>::value>::value>::value,
+    lambda_functor<
+      lambda_functor_base< 
+        Act, 
+        tuple<typename detail::protect_conversion<A>::type, 
+              typename detail::protect_conversion<B>::type>
+      >
+    >,
+    typename return_type_2<Act, non_ref_A, non_ref_B>::type
+  >::RET type;
+};
+
+  // take care of the unavoidable instantiation for nullary case
+template<class Act> struct return_type_2_prot<Act, null_type, null_type> {
+  typedef null_type type;
+};
+  // take care of the unavoidable instantiation for nullary case
+template<class Act, class Other> struct return_type_2_prot<Act, Other, null_type> {
+  typedef null_type type;
+};
+  // take care of the unavoidable instantiation for nullary case
+template<class Act, class Other> struct return_type_2_prot<Act, null_type, Other> {
+  typedef null_type type;
+};
+
+  // comma is a special case, as the user defined operator can return
+  // an lvalue (reference) too, hence it must be handled at this level.
+template<class A, class B> 
+struct return_type_2_comma
+{
+  typedef typename ndnboost::remove_reference<A>::type non_ref_A;
+  typedef typename ndnboost::remove_reference<B>::type non_ref_B;
+
+typedef typename 
+  detail::IF<
+//  is_protectable<other_action<comma_action> >::value && // it is protectable
+//  (is_lambda_functor<A>::value || is_lambda_functor<B>::value),
+    ice_and<is_protectable<other_action<comma_action> >::value, // it is protectable
+            ice_or<is_lambda_functor<A>::value, 
+                   is_lambda_functor<B>::value>::value>::value,
+    lambda_functor<
+      lambda_functor_base< 
+        other_action<comma_action>, 
+        tuple<typename detail::protect_conversion<A>::type, 
+              typename detail::protect_conversion<B>::type>
+      >
+    >,
+    typename 
+      return_type_2<other_action<comma_action>, non_ref_A, non_ref_B>::type
+  >::RET type1;
+
+   // if no user defined return_type_2 (or plain_return_type_2) specialization
+  // matches, then return the righthand argument
+  typedef typename 
+    detail::IF<
+      ndnboost::is_same<type1, detail::unspecified>::value, 
+      B,
+      type1
+    >::RET type;
+
+};
+
+
+  // currently there are no protectable actions with > 2 args
+
+template<class Act, class Args> struct return_type_N_prot {
+  typedef typename return_type_N<Act, Args>::type type;
+};
+
+  // take care of the unavoidable instantiation for nullary case
+template<class Act> struct return_type_N_prot<Act, null_type> {
+  typedef null_type type;
+};
+
+// handle different kind of actions ------------------------
+
+  // use the return type given in the bind invocation as bind<Ret>(...)
+template<int I, class Args, class Ret> 
+struct return_type_N<function_action<I, Ret>, Args> { 
+  typedef Ret type;
+};
+
+// ::result_type support
+
+namespace detail
+{
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type)
+
+template<class F> struct get_result_type
+{
+  typedef typename F::result_type type;
+};
+
+template<class F, class A> struct get_sig
+{
+  typedef typename function_adaptor<F>::template sig<A>::type type;
+};
+
+} // namespace detail
+
+  // Ret is detail::unspecified, so try to deduce return type
+template<int I, class Args> 
+struct return_type_N<function_action<I, detail::unspecified>, Args > { 
+
+  // in the case of function action, the first element in Args is 
+  // some type of function
+  typedef typename Args::head_type Func;
+  typedef typename detail::remove_reference_and_cv<Func>::type plain_Func;
+
+public: 
+  // pass the function to function_adaptor, and get the return type from 
+  // that
+  typedef typename detail::IF<
+    detail::has_result_type<plain_Func>::value,
+    detail::get_result_type<plain_Func>,
+    detail::get_sig<plain_Func, Args>
+  >::RET::type type;
+};
+
+
+} // namespace lambda
+} // namespace ndnboost
+
+#endif
+
+
+
diff --git a/ndnboost/lambda/detail/select_functions.hpp b/ndnboost/lambda/detail/select_functions.hpp
new file mode 100644
index 0000000..7b3ef8a
--- /dev/null
+++ b/ndnboost/lambda/detail/select_functions.hpp
@@ -0,0 +1,74 @@
+// -- select_functions.hpp -- Boost Lambda Library --------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org
+
+
+#ifndef BOOST_LAMBDA_SELECT_FUNCTIONS_HPP
+#define BOOST_LAMBDA_SELECT_FUNCTIONS_HPP
+
+namespace ndnboost { 
+namespace lambda {
+namespace detail {
+
+
+// select functions -------------------------------
+template<class Any, CALL_TEMPLATE_ARGS>
+inline Any& select(Any& any, CALL_FORMAL_ARGS) { CALL_USE_ARGS; return any; }
+
+
+template<class Arg, CALL_TEMPLATE_ARGS>
+inline typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type
+select ( const lambda_functor<Arg>& op, CALL_FORMAL_ARGS ) { 
+  return op.template call<
+    typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type
+  >(CALL_ACTUAL_ARGS); 
+}
+template<class Arg, CALL_TEMPLATE_ARGS>
+inline typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type
+select ( lambda_functor<Arg>& op, CALL_FORMAL_ARGS) { 
+  return op.template call<
+    typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type
+  >(CALL_ACTUAL_ARGS); 
+}
+
+// ------------------------------------------------------------------------
+// select functions where the return type is explicitly given
+// Note: on many functions, this return type is just discarded.
+// The select functions are inside a class template, and the return type
+// is a class template argument.
+// The first implementation used function templates with an explicitly 
+// specified template parameter.
+// However, this resulted in ambiguous calls (at least with gcc 2.95.2 
+// and edg 2.44). Not sure whether the compilers were right or wrong. 
+  
+template<class RET> struct r_select {
+
+// Any == RET
+  template<class Any, CALL_TEMPLATE_ARGS>
+  static 
+  inline RET go (Any& any, CALL_FORMAL_ARGS) { CALL_USE_ARGS; return any; }
+
+
+  template<class Arg, CALL_TEMPLATE_ARGS> 
+  static 
+  inline RET go (const lambda_functor<Arg>& op, CALL_FORMAL_ARGS ) {
+    return op.template call<RET>(CALL_ACTUAL_ARGS); 
+  }
+  template<class Arg, CALL_TEMPLATE_ARGS> 
+  static 
+  inline RET go (lambda_functor<Arg>& op, CALL_FORMAL_ARGS ) { 
+    return op.template call<RET>(CALL_ACTUAL_ARGS); 
+  }
+};
+   
+} // namespace detail
+} // namespace lambda
+} // namespace ndnboost
+
+#endif
diff --git a/ndnboost/lambda/lambda.hpp b/ndnboost/lambda/lambda.hpp
new file mode 100644
index 0000000..593ef70
--- /dev/null
+++ b/ndnboost/lambda/lambda.hpp
@@ -0,0 +1,34 @@
+// -- lambda.hpp -- Boost Lambda Library -----------------------------------
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://lambda.cs.utu.fi 
+
+#ifndef BOOST_LAMBDA_LAMBDA_HPP
+#define BOOST_LAMBDA_LAMBDA_HPP
+
+
+#include "ndnboost/lambda/core.hpp"
+
+#ifdef BOOST_NO_FDECL_TEMPLATES_AS_TEMPLATE_TEMPLATE_PARAMS
+#include <istream>
+#include <ostream>
+#endif
+
+#include "ndnboost/lambda/detail/operator_actions.hpp"
+#include "ndnboost/lambda/detail/operator_lambda_func_base.hpp"
+#include "ndnboost/lambda/detail/operator_return_type_traits.hpp"
+
+
+#include "ndnboost/lambda/detail/operators.hpp"
+
+#ifndef BOOST_LAMBDA_FAILS_IN_TEMPLATE_KEYWORD_AFTER_SCOPE_OPER
+// sorry, member ptr does not work with gcc2.95
+#include "ndnboost/lambda/detail/member_ptr.hpp"
+#endif
+
+
+#endif
diff --git a/ndnboost/lexical_cast.hpp b/ndnboost/lexical_cast.hpp
new file mode 100644
index 0000000..40d1903
--- /dev/null
+++ b/ndnboost/lexical_cast.hpp
@@ -0,0 +1,2725 @@
+#ifndef BOOST_LEXICAL_CAST_INCLUDED
+#define BOOST_LEXICAL_CAST_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// Boost lexical_cast.hpp header  -------------------------------------------//
+//
+// See http://www.boost.org/libs/conversion for documentation.
+// See end of this header for rights and permissions.
+//
+// what:  lexical_cast custom keyword cast
+// who:   contributed by Kevlin Henney,
+//        enhanced with contributions from Terje Slettebo,
+//        with additional fixes and suggestions from Gennaro Prota,
+//        Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
+//        Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
+//        Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
+// when:  November 2000, March 2003, June 2005, June 2006, March 2011 - 2013
+
+#include <ndnboost/config.hpp>
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING)
+#define BOOST_LCAST_NO_WCHAR_T
+#endif
+
+#include <climits>
+#include <cstddef>
+#include <string>
+#include <cstring>
+#include <cstdio>
+#include <typeinfo>
+#include <exception>
+#include <ndnboost/limits.hpp>
+#include <ndnboost/mpl/if.hpp>
+#include <ndnboost/throw_exception.hpp>
+#include <ndnboost/type_traits/ice.hpp>
+#include <ndnboost/type_traits/is_pointer.hpp>
+#include <ndnboost/static_assert.hpp>
+#include <ndnboost/detail/lcast_precision.hpp>
+#include <ndnboost/detail/workaround.hpp>
+
+
+#ifndef BOOST_NO_STD_LOCALE
+#   include <locale>
+#else
+#   ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+        // Getting error at this point means, that your STL library is old/lame/misconfigured.
+        // If nothing can be done with STL library, define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE,
+        // but beware: lexical_cast will understand only 'C' locale delimeters and thousands
+        // separators.
+#       error "Unable to use <locale> header. Define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE to force "
+#       error "ndnboost::lexical_cast to use only 'C' locale during conversions."
+#   endif
+#endif
+
+#ifdef BOOST_NO_STRINGSTREAM
+#include <strstream>
+#else
+#include <sstream>
+#endif
+
+#ifdef BOOST_NO_TYPEID
+#define BOOST_LCAST_THROW_BAD_CAST(S, T) throw_exception(bad_lexical_cast())
+#else
+#define BOOST_LCAST_THROW_BAD_CAST(Source, Target) \
+    throw_exception(bad_lexical_cast(typeid(Source), typeid(Target)))
+#endif
+
+#if (defined(BOOST_LCAST_HAS_INT128) && !defined(__GNUC__)) || GCC_VERSION > 40700
+#define BOOST_LCAST_HAS_INT128
+#endif
+
+
+namespace ndnboost
+{
+    // exception used to indicate runtime lexical_cast failure
+    class BOOST_SYMBOL_VISIBLE bad_lexical_cast :
+    // workaround MSVC bug with std::bad_cast when _HAS_EXCEPTIONS == 0 
+#if defined(BOOST_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS 
+        public std::exception 
+#else 
+        public std::bad_cast 
+#endif 
+
+#if defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, < 0x560 )
+        // under bcc32 5.5.1 bad_cast doesn't derive from exception
+        , public std::exception
+#endif
+
+    {
+    public:
+        bad_lexical_cast() BOOST_NOEXCEPT :
+#ifndef BOOST_NO_TYPEID
+          source(&typeid(void)), target(&typeid(void))
+#else
+          source(0), target(0) // this breaks getters
+#endif
+        {
+        }
+
+        bad_lexical_cast(
+            const std::type_info &source_type_arg,
+            const std::type_info &target_type_arg) BOOST_NOEXCEPT :
+            source(&source_type_arg), target(&target_type_arg)
+        {
+        }
+
+        const std::type_info &source_type() const
+        {
+            return *source;
+        }
+        const std::type_info &target_type() const
+        {
+            return *target;
+        }
+
+#ifndef BOOST_NO_CXX11_NOEXCEPT
+        virtual const char *what() const noexcept
+#else
+        virtual const char *what() const throw()
+#endif
+        {
+            return "bad lexical cast: "
+                   "source type value could not be interpreted as target";
+        }
+
+#ifndef BOOST_NO_CXX11_NOEXCEPT
+        virtual ~bad_lexical_cast() BOOST_NOEXCEPT
+#else
+        virtual ~bad_lexical_cast() throw()
+#endif
+        {}
+    private:
+        const std::type_info *source;
+        const std::type_info *target;
+    };
+
+    namespace detail // widest_char
+    {
+        template <typename TargetChar, typename SourceChar>
+        struct widest_char
+        {
+            typedef BOOST_DEDUCED_TYPENAME ndnboost::mpl::if_c<
+                (sizeof(TargetChar) > sizeof(SourceChar))
+                , TargetChar
+                , SourceChar >::type type;
+        };
+    }
+} // namespace ndnboost
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(__SUNPRO_CC) && !defined(__PGIC__)
+
+#include <cmath>
+#include <istream>
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+#include <array>
+#endif
+
+#include <ndnboost/array.hpp>
+#include <ndnboost/numeric/conversion/cast.hpp>
+#include <ndnboost/type_traits/make_unsigned.hpp>
+#include <ndnboost/type_traits/is_signed.hpp>
+#include <ndnboost/type_traits/is_integral.hpp>
+#include <ndnboost/type_traits/is_arithmetic.hpp>
+#include <ndnboost/type_traits/remove_pointer.hpp>
+#include <ndnboost/type_traits/has_left_shift.hpp>
+#include <ndnboost/type_traits/has_right_shift.hpp>
+#include <ndnboost/math/special_functions/sign.hpp>
+#include <ndnboost/math/special_functions/fpclassify.hpp>
+#include <ndnboost/range/iterator_range_core.hpp>
+#include <ndnboost/container/container_fwd.hpp>
+#include <ndnboost/integer.hpp>
+#ifndef BOOST_NO_CWCHAR
+#   include <cwchar>
+#endif
+
+namespace ndnboost {
+
+    namespace detail // is_char_or_wchar<...>
+    {
+        // returns true, if T is one of the character types
+        template < typename T >
+        struct is_char_or_wchar
+        {
+            typedef ndnboost::type_traits::ice_or<
+                    ndnboost::is_same< T, char >::value,
+                    #ifndef BOOST_LCAST_NO_WCHAR_T
+                        ndnboost::is_same< T, wchar_t >::value,
+                    #endif
+                    #ifndef BOOST_NO_CXX11_CHAR16_T
+                        ndnboost::is_same< T, char16_t >::value,
+                    #endif
+                    #ifndef BOOST_NO_CXX11_CHAR32_T
+                        ndnboost::is_same< T, char32_t >::value,
+                    #endif
+                    ndnboost::is_same< T, unsigned char >::value,
+                    ndnboost::is_same< T, signed char >::value
+            > result_type;
+
+            BOOST_STATIC_CONSTANT(bool, value = (result_type::value) );
+        };
+    }
+
+    namespace detail // normalize_single_byte_char<Char>
+    {
+        // Converts signed/unsigned char to char
+        template < class Char >
+        struct normalize_single_byte_char 
+        {
+            typedef Char type;
+        };
+
+        template <>
+        struct normalize_single_byte_char< signed char >
+        {
+            typedef char type;
+        };
+
+        template <>
+        struct normalize_single_byte_char< unsigned char >
+        {
+            typedef char type;
+        };
+    }
+
+    namespace detail // deduce_character_type_later<T>
+    {
+        // Helper type, meaning that stram character for T must be deduced 
+        // at Stage 2 (See deduce_source_char<T> and deduce_target_char<T>)
+        template < class T > struct deduce_character_type_later {};
+    }
+
+    namespace detail // stream_char_common<T>
+    {
+        // Selectors to choose stream character type (common for Source and Target)
+        // Returns one of char, wchar_t, char16_t, char32_t or deduce_character_type_later<T> types
+        // Executed on Stage 1 (See deduce_source_char<T> and deduce_target_char<T>)
+        template < typename Type >
+        struct stream_char_common: public ndnboost::mpl::if_c<
+            ndnboost::detail::is_char_or_wchar< Type >::value,
+            Type,
+            ndnboost::detail::deduce_character_type_later< Type >
+        > {};
+
+        template < typename Char >
+        struct stream_char_common< Char* >: public ndnboost::mpl::if_c<
+            ndnboost::detail::is_char_or_wchar< Char >::value,
+            Char,
+            ndnboost::detail::deduce_character_type_later< Char* >
+        > {};
+
+        template < typename Char >
+        struct stream_char_common< const Char* >: public ndnboost::mpl::if_c<
+            ndnboost::detail::is_char_or_wchar< Char >::value,
+            Char,
+            ndnboost::detail::deduce_character_type_later< const Char* >
+        > {};
+
+        template < typename Char >
+        struct stream_char_common< ndnboost::iterator_range< Char* > >: public ndnboost::mpl::if_c<
+            ndnboost::detail::is_char_or_wchar< Char >::value,
+            Char,
+            ndnboost::detail::deduce_character_type_later< ndnboost::iterator_range< Char* > >
+        > {};
+    
+        template < typename Char >
+        struct stream_char_common< ndnboost::iterator_range< const Char* > >: public ndnboost::mpl::if_c<
+            ndnboost::detail::is_char_or_wchar< Char >::value,
+            Char,
+            ndnboost::detail::deduce_character_type_later< ndnboost::iterator_range< const Char* > >
+        > {};
+
+        template < class Char, class Traits, class Alloc >
+        struct stream_char_common< std::basic_string< Char, Traits, Alloc > >
+        {
+            typedef Char type;
+        };
+
+        template < class Char, class Traits, class Alloc >
+        struct stream_char_common< ndnboost::container::basic_string< Char, Traits, Alloc > >
+        {
+            typedef Char type;
+        };
+
+        template < typename Char, std::size_t N >
+        struct stream_char_common< ndnboost::array< Char, N > >: public ndnboost::mpl::if_c<
+            ndnboost::detail::is_char_or_wchar< Char >::value,
+            Char,
+            ndnboost::detail::deduce_character_type_later< ndnboost::array< Char, N > >
+        > {};
+
+        template < typename Char, std::size_t N >
+        struct stream_char_common< ndnboost::array< const Char, N > >: public ndnboost::mpl::if_c<
+            ndnboost::detail::is_char_or_wchar< Char >::value,
+            Char,
+            ndnboost::detail::deduce_character_type_later< ndnboost::array< const Char, N > >
+        > {};
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+        template < typename Char, std::size_t N >
+        struct stream_char_common< std::array<Char, N > >: public ndnboost::mpl::if_c<
+            ndnboost::detail::is_char_or_wchar< Char >::value,
+            Char,
+            ndnboost::detail::deduce_character_type_later< std::array< Char, N > >
+        > {};
+
+        template < typename Char, std::size_t N >
+        struct stream_char_common< std::array< const Char, N > >: public ndnboost::mpl::if_c<
+            ndnboost::detail::is_char_or_wchar< Char >::value,
+            Char,
+            ndnboost::detail::deduce_character_type_later< std::array< const Char, N > >
+        > {};
+#endif
+
+#ifdef BOOST_LCAST_HAS_INT128
+        template <> struct stream_char_common< ndnboost::int128_type >: public ndnboost::mpl::identity< char > {};
+        template <> struct stream_char_common< ndnboost::uint128_type >: public ndnboost::mpl::identity< char > {};
+#endif
+
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && defined(BOOST_NO_INTRINSIC_WCHAR_T)
+        template <>
+        struct stream_char_common< wchar_t >
+        {
+            typedef char type;
+        };
+#endif
+    }
+
+    namespace detail // deduce_source_char_impl<T>
+    {
+        // If type T is `deduce_character_type_later` type, then tries to deduce
+        // character type using ndnboost::has_left_shift<T> metafunction.
+        // Otherwise supplied type T is a character type, that must be normalized
+        // using normalize_single_byte_char<Char>.
+        // Executed at Stage 2  (See deduce_source_char<T> and deduce_target_char<T>)
+        template < class Char > 
+        struct deduce_source_char_impl
+        { 
+            typedef BOOST_DEDUCED_TYPENAME ndnboost::detail::normalize_single_byte_char< Char >::type type; 
+        };
+        
+        template < class T > 
+        struct deduce_source_char_impl< deduce_character_type_later< T > > 
+        {
+            typedef ndnboost::has_left_shift< std::basic_ostream< char >, T > result_t;
+
+#if defined(BOOST_LCAST_NO_WCHAR_T)
+            BOOST_STATIC_ASSERT_MSG((result_t::value), 
+                "Source type is not std::ostream`able and std::wostream`s are not supported by your STL implementation");
+            typedef char type;
+#else
+            typedef BOOST_DEDUCED_TYPENAME ndnboost::mpl::if_c<
+                result_t::value, char, wchar_t
+            >::type type;
+
+            BOOST_STATIC_ASSERT_MSG((result_t::value || ndnboost::has_left_shift< std::basic_ostream< type >, T >::value), 
+                "Source type is neither std::ostream`able nor std::wostream`able");
+#endif
+        };
+    }
+
+    namespace detail  // deduce_target_char_impl<T>
+    {
+        // If type T is `deduce_character_type_later` type, then tries to deduce
+        // character type using ndnboost::has_right_shift<T> metafunction.
+        // Otherwise supplied type T is a character type, that must be normalized
+        // using normalize_single_byte_char<Char>.
+        // Executed at Stage 2  (See deduce_source_char<T> and deduce_target_char<T>)
+        template < class Char > 
+        struct deduce_target_char_impl 
+        { 
+            typedef BOOST_DEDUCED_TYPENAME normalize_single_byte_char< Char >::type type; 
+        };
+        
+        template < class T > 
+        struct deduce_target_char_impl< deduce_character_type_later<T> > 
+        { 
+            typedef ndnboost::has_right_shift<std::basic_istream<char>, T > result_t;
+
+#if defined(BOOST_LCAST_NO_WCHAR_T)
+            BOOST_STATIC_ASSERT_MSG((result_t::value), 
+                "Target type is not std::istream`able and std::wistream`s are not supported by your STL implementation");
+            typedef char type;
+#else
+            typedef BOOST_DEDUCED_TYPENAME ndnboost::mpl::if_c<
+                result_t::value, char, wchar_t
+            >::type type;
+            
+            BOOST_STATIC_ASSERT_MSG((result_t::value || ndnboost::has_right_shift<std::basic_istream<wchar_t>, T >::value), 
+                "Target type is neither std::istream`able nor std::wistream`able");
+#endif
+        };
+    } 
+
+    namespace detail  // deduce_target_char<T> and deduce_source_char<T>
+    {
+        // We deduce stream character types in two stages.
+        //
+        // Stage 1 is common for Target and Source. At Stage 1 we get 
+        // non normalized character type (may contain unsigned/signed char)
+        // or deduce_character_type_later<T> where T is the original type.
+        // Stage 1 is executed by stream_char_common<T>
+        //
+        // At Stage 2 we normalize character types or try to deduce character 
+        // type using metafunctions. 
+        // Stage 2 is executed by deduce_target_char_impl<T> and 
+        // deduce_source_char_impl<T>
+        //
+        // deduce_target_char<T> and deduce_source_char<T> functions combine 
+        // both stages
+
+        template < class T >
+        struct deduce_target_char
+        {
+            typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type;
+            typedef BOOST_DEDUCED_TYPENAME deduce_target_char_impl< stage1_type >::type stage2_type;
+
+            typedef stage2_type type;
+        };
+
+        template < class T >
+        struct deduce_source_char
+        {
+            typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type;
+            typedef BOOST_DEDUCED_TYPENAME deduce_source_char_impl< stage1_type >::type stage2_type;
+
+            typedef stage2_type type;
+        };
+    }
+
+    namespace detail // deduce_char_traits template
+    {
+        // We are attempting to get char_traits<> from Source or Tagret
+        // template parameter. Otherwise we'll be using std::char_traits<Char>
+        template < class Char, class Target, class Source >
+        struct deduce_char_traits
+        {
+            typedef std::char_traits< Char > type;
+        };
+
+        template < class Char, class Traits, class Alloc, class Source >
+        struct deduce_char_traits< Char
+                                 , std::basic_string< Char, Traits, Alloc >
+                                 , Source
+                                 >
+        {
+            typedef Traits type;
+        };
+
+        template < class Char, class Target, class Traits, class Alloc >
+        struct deduce_char_traits< Char
+                                 , Target
+                                 , std::basic_string< Char, Traits, Alloc >
+                                 >
+        {
+            typedef Traits type;
+        };
+
+        template < class Char, class Traits, class Alloc, class Source >
+        struct deduce_char_traits< Char
+                                 , ndnboost::container::basic_string< Char, Traits, Alloc >
+                                 , Source
+                                 >
+        {
+            typedef Traits type;
+        };
+
+        template < class Char, class Target, class Traits, class Alloc >
+        struct deduce_char_traits< Char
+                                 , Target
+                                 , ndnboost::container::basic_string< Char, Traits, Alloc >
+                                 >
+        {
+            typedef Traits type;
+        };
+
+        template < class Char, class Traits, class Alloc1, class Alloc2 >
+        struct deduce_char_traits< Char
+                                 , std::basic_string< Char, Traits, Alloc1 >
+                                 , std::basic_string< Char, Traits, Alloc2 >
+                                 >
+        {
+            typedef Traits type;
+        };
+
+        template<class Char, class Traits, class Alloc1, class Alloc2>
+        struct deduce_char_traits< Char
+                                 , ndnboost::container::basic_string< Char, Traits, Alloc1 >
+                                 , ndnboost::container::basic_string< Char, Traits, Alloc2 >
+                                 >
+        {
+            typedef Traits type;
+        };
+
+        template < class Char, class Traits, class Alloc1, class Alloc2 >
+        struct deduce_char_traits< Char
+                                 , ndnboost::container::basic_string< Char, Traits, Alloc1 >
+                                 , std::basic_string< Char, Traits, Alloc2 >
+                                 >
+        {
+            typedef Traits type;
+        };
+
+        template < class Char, class Traits, class Alloc1, class Alloc2 >
+        struct deduce_char_traits< Char
+                                 , std::basic_string< Char, Traits, Alloc1 >
+                                 , ndnboost::container::basic_string< Char, Traits, Alloc2 >
+                                 >
+        {
+            typedef Traits type;
+        };
+    }
+
+    namespace detail // array_to_pointer_decay<T>
+    {
+        template<class T>
+        struct array_to_pointer_decay
+        {
+            typedef T type;
+        };
+
+        template<class T, std::size_t N>
+        struct array_to_pointer_decay<T[N]>
+        {
+            typedef const T * type;
+        };
+    }
+
+    namespace detail // is_this_float_conversion_optimized<Float, Char>
+    {
+        // this metafunction evaluates to true, if we have optimized comnversion 
+        // from Float type to Char array. 
+        // Must be in sync with lexical_stream_limited_src<Char, ...>::shl_real_type(...)
+        template <typename Float, typename Char>
+        struct is_this_float_conversion_optimized 
+        {
+            typedef ndnboost::type_traits::ice_and<
+                ndnboost::is_float<Float>::value,
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__)
+                ndnboost::type_traits::ice_or<
+                    ndnboost::type_traits::ice_eq<sizeof(Char), sizeof(char) >::value,
+                    ndnboost::is_same<Char, wchar_t>::value
+                >::value
+#else
+                ndnboost::type_traits::ice_eq<sizeof(Char), sizeof(char) >::value
+#endif
+            > result_type;
+
+            BOOST_STATIC_CONSTANT(bool, value = (result_type::value) );
+        };
+    }
+    
+    namespace detail // lcast_src_length
+    {
+        // Return max. length of string representation of Source;
+        template< class Source // Source type of lexical_cast.
+                >
+        struct lcast_src_length
+        {
+            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
+            // To check coverage, build the test with
+            // bjam --v2 profile optimization=off
+            static void check_coverage() {}
+        };
+
+        // Helper for integral types.
+        // Notes on length calculation:
+        // Max length for 32bit int with grouping "\1" and thousands_sep ',':
+        // "-2,1,4,7,4,8,3,6,4,7"
+        //  ^                    - is_signed
+        //   ^                   - 1 digit not counted by digits10
+        //    ^^^^^^^^^^^^^^^^^^ - digits10 * 2
+        //
+        // Constant is_specialized is used instead of constant 1
+        // to prevent buffer overflow in a rare case when
+        // <ndnboost/limits.hpp> doesn't add missing specialization for
+        // numeric_limits<T> for some integral type T.
+        // When is_specialized is false, the whole expression is 0.
+        template<class Source>
+        struct lcast_src_length_integral
+        {
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+            BOOST_STATIC_CONSTANT(std::size_t, value =
+                  std::numeric_limits<Source>::is_signed +
+                  std::numeric_limits<Source>::is_specialized + /* == 1 */
+                  std::numeric_limits<Source>::digits10 * 2
+              );
+#else
+            BOOST_STATIC_CONSTANT(std::size_t, value = 156);
+            BOOST_STATIC_ASSERT(sizeof(Source) * CHAR_BIT <= 256);
+#endif
+        };
+
+#define BOOST_LCAST_DEF(T)               \
+    template<> struct lcast_src_length<T> \
+        : lcast_src_length_integral<T>           \
+    { static void check_coverage() {} };
+
+        BOOST_LCAST_DEF(short)
+        BOOST_LCAST_DEF(unsigned short)
+        BOOST_LCAST_DEF(int)
+        BOOST_LCAST_DEF(unsigned int)
+        BOOST_LCAST_DEF(long)
+        BOOST_LCAST_DEF(unsigned long)
+#if defined(BOOST_HAS_LONG_LONG)
+        BOOST_LCAST_DEF(ndnboost::ulong_long_type)
+        BOOST_LCAST_DEF(ndnboost::long_long_type )
+#elif defined(BOOST_HAS_MS_INT64)
+        BOOST_LCAST_DEF(unsigned __int64)
+        BOOST_LCAST_DEF(         __int64)
+#endif
+#ifdef BOOST_LCAST_HAS_INT128
+        BOOST_LCAST_DEF(ndnboost::int128_type)
+        BOOST_LCAST_DEF(ndnboost::uint128_type)
+#endif
+
+#undef BOOST_LCAST_DEF
+
+#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
+        // Helper for floating point types.
+        // -1.23456789e-123456
+        // ^                   sign
+        //  ^                  leading digit
+        //   ^                 decimal point 
+        //    ^^^^^^^^         lcast_precision<Source>::value
+        //            ^        "e"
+        //             ^       exponent sign
+        //              ^^^^^^ exponent (assumed 6 or less digits)
+        // sign + leading digit + decimal point + "e" + exponent sign == 5
+        template<class Source>
+        struct lcast_src_length_floating
+        {
+            BOOST_STATIC_ASSERT(
+                    std::numeric_limits<Source>::max_exponent10 <=  999999L &&
+                    std::numeric_limits<Source>::min_exponent10 >= -999999L
+                );
+            BOOST_STATIC_CONSTANT(std::size_t, value =
+                    5 + lcast_precision<Source>::value + 6
+                );
+        };
+
+        template<>
+        struct lcast_src_length<float>
+          : lcast_src_length_floating<float>
+        {
+            static void check_coverage() {}
+        };
+
+        template<>
+        struct lcast_src_length<double>
+          : lcast_src_length_floating<double>
+        {
+            static void check_coverage() {}
+        };
+
+        template<>
+        struct lcast_src_length<long double>
+          : lcast_src_length_floating<long double>
+        {
+            static void check_coverage() {}
+        };
+
+#endif // #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
+    }
+
+    namespace detail // lexical_cast_stream_traits<Source, Target>
+    {
+        template <class Source, class Target>
+        struct lexical_cast_stream_traits {
+            typedef BOOST_DEDUCED_TYPENAME ndnboost::detail::array_to_pointer_decay<Source>::type src;
+            typedef BOOST_DEDUCED_TYPENAME ndnboost::remove_cv<src>::type            no_cv_src;
+                
+            typedef ndnboost::detail::deduce_source_char<no_cv_src>                           deduce_src_char_metafunc;
+            typedef BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::type           src_char_t;
+            typedef BOOST_DEDUCED_TYPENAME ndnboost::detail::deduce_target_char<Target>::type target_char_t;
+                
+            typedef BOOST_DEDUCED_TYPENAME ndnboost::detail::widest_char<
+                target_char_t, src_char_t
+            >::type char_type;
+
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+            BOOST_STATIC_ASSERT_MSG(( !ndnboost::is_same<char16_t, src_char_t>::value
+                                        && !ndnboost::is_same<char16_t, target_char_t>::value),
+                "Your compiler does not have full support for char16_t" );
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+            BOOST_STATIC_ASSERT_MSG(( !ndnboost::is_same<char32_t, src_char_t>::value
+                                        && !ndnboost::is_same<char32_t, target_char_t>::value),
+                "Your compiler does not have full support for char32_t" );
+#endif
+
+            typedef BOOST_DEDUCED_TYPENAME ndnboost::detail::deduce_char_traits<
+                char_type, Target, no_cv_src
+            >::type traits;
+
+            typedef ndnboost::type_traits::ice_and<
+                ndnboost::is_same<char, src_char_t>::value,                                  // source is not a wide character based type
+                ndnboost::type_traits::ice_ne<sizeof(char), sizeof(target_char_t) >::value,  // target type is based on wide character
+                ndnboost::type_traits::ice_not<
+                    ndnboost::detail::is_char_or_wchar<no_cv_src>::value                     // single character widening is optimized
+                >::value                                                                  // and does not requires stringbuffer
+            >   is_string_widening_required_t;
+
+            typedef ndnboost::type_traits::ice_not< ndnboost::type_traits::ice_or<
+                ndnboost::is_integral<no_cv_src>::value,
+                ndnboost::detail::is_this_float_conversion_optimized<no_cv_src, char_type >::value,
+                ndnboost::detail::is_char_or_wchar<
+                    BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::stage1_type          // if we did not get character type at stage1
+                >::value                                                                  // then we have no optimization for that type
+            >::value >   is_source_input_not_optimized_t;
+
+            // If we have an optimized conversion for
+            // Source, we do not need to construct stringbuf.
+            BOOST_STATIC_CONSTANT(bool, requires_stringbuf = 
+                (ndnboost::type_traits::ice_or<
+                    is_string_widening_required_t::value, is_source_input_not_optimized_t::value
+                >::value)
+            );
+            
+            typedef ndnboost::detail::lcast_src_length<no_cv_src> len_t;
+        };
+    }
+
+    namespace detail // '0', '+' and '-' constants
+    {
+        template < typename Char > struct lcast_char_constants;
+
+        template<>
+        struct lcast_char_constants<char>
+        {
+            BOOST_STATIC_CONSTANT(char, zero  = '0');
+            BOOST_STATIC_CONSTANT(char, minus = '-');
+            BOOST_STATIC_CONSTANT(char, plus = '+');
+            BOOST_STATIC_CONSTANT(char, lowercase_e = 'e');
+            BOOST_STATIC_CONSTANT(char, capital_e = 'E');
+            BOOST_STATIC_CONSTANT(char, c_decimal_separator = '.');
+        };
+
+#ifndef BOOST_LCAST_NO_WCHAR_T
+        template<>
+        struct lcast_char_constants<wchar_t>
+        {
+            BOOST_STATIC_CONSTANT(wchar_t, zero  = L'0');
+            BOOST_STATIC_CONSTANT(wchar_t, minus = L'-');
+            BOOST_STATIC_CONSTANT(wchar_t, plus = L'+');
+            BOOST_STATIC_CONSTANT(wchar_t, lowercase_e = L'e');
+            BOOST_STATIC_CONSTANT(wchar_t, capital_e = L'E');
+            BOOST_STATIC_CONSTANT(wchar_t, c_decimal_separator = L'.');
+        };
+#endif
+
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+        template<>
+        struct lcast_char_constants<char16_t>
+        {
+            BOOST_STATIC_CONSTANT(char16_t, zero  = u'0');
+            BOOST_STATIC_CONSTANT(char16_t, minus = u'-');
+            BOOST_STATIC_CONSTANT(char16_t, plus = u'+');
+            BOOST_STATIC_CONSTANT(char16_t, lowercase_e = u'e');
+            BOOST_STATIC_CONSTANT(char16_t, capital_e = u'E');
+            BOOST_STATIC_CONSTANT(char16_t, c_decimal_separator = u'.');
+        };
+#endif
+
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+        template<>
+        struct lcast_char_constants<char32_t>
+        {
+            BOOST_STATIC_CONSTANT(char32_t, zero  = U'0');
+            BOOST_STATIC_CONSTANT(char32_t, minus = U'-');
+            BOOST_STATIC_CONSTANT(char32_t, plus = U'+');
+            BOOST_STATIC_CONSTANT(char32_t, lowercase_e = U'e');
+            BOOST_STATIC_CONSTANT(char32_t, capital_e = U'E');
+            BOOST_STATIC_CONSTANT(char32_t, c_decimal_separator = U'.');
+        };
+#endif
+    }
+
+    namespace detail // lcast_to_unsigned
+    {
+        template<class T>
+        inline
+        BOOST_DEDUCED_TYPENAME make_unsigned<T>::type lcast_to_unsigned(T value) BOOST_NOEXCEPT
+        {
+            typedef BOOST_DEDUCED_TYPENAME ndnboost::make_unsigned<T>::type result_type;
+            return static_cast<result_type>(
+                value < 0 ? 0u - static_cast<result_type>(value) : value
+            );
+        }
+    }
+
+    namespace detail // lcast_put_unsigned
+    {
+        template<class Traits, class T, class CharT>
+        CharT* lcast_put_unsigned(const T n_param, CharT* finish)
+        {
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+            BOOST_STATIC_ASSERT(!std::numeric_limits<T>::is_signed);
+#endif
+
+            typedef typename Traits::int_type int_type;
+            CharT const czero = lcast_char_constants<CharT>::zero;
+            int_type const zero = Traits::to_int_type(czero);
+            BOOST_DEDUCED_TYPENAME ndnboost::mpl::if_c<
+                    (sizeof(int_type) > sizeof(T))
+                    , int_type
+                    , T
+            >::type n = n_param;
+
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+            std::locale loc;
+            if (loc != std::locale::classic()) {
+                typedef std::numpunct<CharT> numpunct;
+                numpunct const& np = BOOST_USE_FACET(numpunct, loc);
+                std::string const grouping = np.grouping();
+                std::string::size_type const grouping_size = grouping.size();
+
+                if ( grouping_size && grouping[0] > 0 )
+                {
+
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+                // Check that ulimited group is unreachable:
+                BOOST_STATIC_ASSERT(std::numeric_limits<T>::digits10 < CHAR_MAX);
+#endif
+                    CharT thousands_sep = np.thousands_sep();
+                    std::string::size_type group = 0; // current group number
+                    char last_grp_size = grouping[0];
+                    char left = last_grp_size;
+
+                    do
+                    {
+                        if(left == 0)
+                        {
+                            ++group;
+                            if(group < grouping_size)
+                            {
+                                char const grp_size = grouping[group];
+                                last_grp_size = grp_size <= 0 ? static_cast<char>(CHAR_MAX) : grp_size;
+                            }
+
+                            left = last_grp_size;
+                            --finish;
+                            Traits::assign(*finish, thousands_sep);
+                        }
+
+                        --left;
+
+                        --finish;
+                        int_type const digit = static_cast<int_type>(n % 10U);
+                        Traits::assign(*finish, Traits::to_char_type(zero + digit));
+                        n /= 10;
+                    } while(n);
+                    return finish;
+                }
+            }
+#endif
+            {
+                do
+                {
+                    --finish;
+                    int_type const digit = static_cast<int_type>(n % 10U);
+                    Traits::assign(*finish, Traits::to_char_type(zero + digit));
+                    n /= 10;
+                } while(n);
+            }
+
+            return finish;
+        }
+    }
+
+    namespace detail // lcast_ret_unsigned
+    {
+        template<class Traits, class T, class CharT>
+        inline bool lcast_ret_unsigned(T& value, const CharT* const begin, const CharT* end)
+        {
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+            BOOST_STATIC_ASSERT(!std::numeric_limits<T>::is_signed);
+#endif
+            CharT const czero = lcast_char_constants<CharT>::zero;
+            --end;
+            value = 0;
+
+            if (begin > end || *end < czero || *end >= czero + 10)
+                return false;
+            value = static_cast<T>(*end - czero);
+            --end;
+            T multiplier = 1;
+            bool multiplier_overflowed = false;
+
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+            std::locale loc;
+            if (loc != std::locale::classic()) {
+                typedef std::numpunct<CharT> numpunct;
+                numpunct const& np = BOOST_USE_FACET(numpunct, loc);
+                std::string const& grouping = np.grouping();
+                std::string::size_type const grouping_size = grouping.size();
+
+                /* According to Programming languages - C++
+                 * we MUST check for correct grouping
+                 */
+                if (grouping_size && grouping[0] > 0)
+                {
+                    unsigned char current_grouping = 0;
+                    CharT const thousands_sep = np.thousands_sep();
+                    char remained = static_cast<char>(grouping[current_grouping] - 1);
+                    bool shall_we_return = true;
+
+                    for(;end>=begin; --end)
+                    {
+                        if (remained) {
+                            T const multiplier_10 = static_cast<T>(multiplier * 10);
+                            if (multiplier_10 / 10 != multiplier) multiplier_overflowed = true;
+
+                            T const dig_value = static_cast<T>(*end - czero);
+                            T const new_sub_value = static_cast<T>(multiplier_10 * dig_value);
+
+                            if (*end < czero || *end >= czero + 10
+                                    /* detecting overflow */
+                                    || (dig_value && new_sub_value / dig_value != multiplier_10)
+                                    || static_cast<T>((std::numeric_limits<T>::max)()-new_sub_value) < value
+                                    || (multiplier_overflowed && dig_value)
+                                    )
+                                return false;
+
+                            value = static_cast<T>(value + new_sub_value);
+                            multiplier = static_cast<T>(multiplier * 10);
+                            --remained;
+                        } else {
+                            if ( !Traits::eq(*end, thousands_sep) ) //|| begin == end ) return false;
+                            {
+                                /*
+                                 * According to Programming languages - C++
+                                 * Digit grouping is checked. That is, the positions of discarded
+                                 * separators is examined for consistency with
+                                 * use_facet<numpunct<charT> >(loc ).grouping()
+                                 *
+                                 * BUT what if there is no separators at all and grouping()
+                                 * is not empty? Well, we have no extraced separators, so we
+                                 * won`t check them for consistency. This will allow us to
+                                 * work with "C" locale from other locales
+                                 */
+                                shall_we_return = false;
+                                break;
+                            } else {
+                                if ( begin == end ) return false;
+                                if (current_grouping < grouping_size-1 ) ++current_grouping;
+                                remained = grouping[current_grouping];
+                            }
+                        }
+                    }
+
+                    if (shall_we_return) return true;
+                }
+            }
+#endif
+            {
+                while ( begin <= end )
+                {
+                    T const multiplier_10 = static_cast<T>(multiplier * 10);
+                    if (multiplier_10 / 10 != multiplier) multiplier_overflowed = true;
+
+                    T const dig_value = static_cast<T>(*end - czero);
+                    T const new_sub_value = static_cast<T>(multiplier_10 * dig_value);
+
+                    if (*end < czero || *end >= czero + 10
+                            /* detecting overflow */
+                            || (dig_value && new_sub_value / dig_value != multiplier_10)
+                            || static_cast<T>((std::numeric_limits<T>::max)()-new_sub_value) < value
+                            || (multiplier_overflowed && dig_value)
+                            )
+                        return false;
+
+                    value = static_cast<T>(value + new_sub_value);
+                    multiplier = static_cast<T>(multiplier * 10);
+                    --end;
+                }
+            }
+            return true;
+        }
+    }
+
+    namespace detail
+    {
+        template <class CharT>
+        bool lc_iequal(const CharT* val, const CharT* lcase, const CharT* ucase, unsigned int len) BOOST_NOEXCEPT {
+            for( unsigned int i=0; i < len; ++i ) {
+                if ( val[i] != lcase[i] && val[i] != ucase[i] ) return false;
+            }
+
+            return true;
+        }
+
+        /* Returns true and sets the correct value if found NaN or Inf. */
+        template <class CharT, class T>
+        inline bool parse_inf_nan_impl(const CharT* begin, const CharT* end, T& value
+            , const CharT* lc_NAN, const CharT* lc_nan
+            , const CharT* lc_INFINITY, const CharT* lc_infinity
+            , const CharT opening_brace, const CharT closing_brace) BOOST_NOEXCEPT
+        {
+            using namespace std;
+            if (begin == end) return false;
+            const CharT minus = lcast_char_constants<CharT>::minus;
+            const CharT plus = lcast_char_constants<CharT>::plus;
+            const int inifinity_size = 8;
+
+            bool has_minus = false;
+            /* Parsing +/- */
+            if( *begin == minus)
+            {
+                ++ begin;
+                has_minus = true;
+            }
+            else if( *begin == plus ) ++begin;
+
+            if( end-begin < 3 ) return false;
+            if( lc_iequal(begin, lc_nan, lc_NAN, 3) )
+            {
+                begin += 3;
+                if (end != begin) /* It is 'nan(...)' or some bad input*/
+                {
+                    if(end-begin<2) return false; // bad input
+                    -- end;
+                    if( *begin != opening_brace || *end != closing_brace) return false; // bad input
+                }
+
+                if( !has_minus ) value = std::numeric_limits<T>::quiet_NaN();
+                else value = (ndnboost::math::changesign) (std::numeric_limits<T>::quiet_NaN());
+                return true;
+            } else
+            if (( /* 'INF' or 'inf' */
+                  end-begin==3
+                  &&
+                  lc_iequal(begin, lc_infinity, lc_INFINITY, 3)
+                )
+                ||
+                ( /* 'INFINITY' or 'infinity' */
+                  end-begin==inifinity_size
+                  &&
+                  lc_iequal(begin, lc_infinity, lc_INFINITY, inifinity_size)
+                )
+             )
+            {
+                if( !has_minus ) value = std::numeric_limits<T>::infinity();
+                else value = (ndnboost::math::changesign) (std::numeric_limits<T>::infinity());
+                return true;
+            }
+
+            return false;
+        }
+
+        template <class CharT, class T>
+        bool put_inf_nan_impl(CharT* begin, CharT*& end, const T& value
+                         , const CharT* lc_nan
+                         , const CharT* lc_infinity) BOOST_NOEXCEPT
+        {
+            using namespace std;
+            const CharT minus = lcast_char_constants<CharT>::minus;
+            if ( (ndnboost::math::isnan)(value) )
+            {
+                if ( (ndnboost::math::signbit)(value) )
+                {
+                    *begin = minus;
+                    ++ begin;
+                }
+
+                memcpy(begin, lc_nan, 3 * sizeof(CharT));
+                end = begin + 3;
+                return true;
+            } else if ( (ndnboost::math::isinf)(value) )
+            {
+                if ( (ndnboost::math::signbit)(value) )
+                {
+                    *begin = minus;
+                    ++ begin;
+                }
+
+                memcpy(begin, lc_infinity, 3 * sizeof(CharT));
+                end = begin + 3;
+                return true;
+            }
+
+            return false;
+        }
+
+
+#ifndef BOOST_LCAST_NO_WCHAR_T
+        template <class T>
+        bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value) BOOST_NOEXCEPT
+        {
+            return parse_inf_nan_impl(begin, end, value
+                               , L"NAN", L"nan"
+                               , L"INFINITY", L"infinity"
+                               , L'(', L')');
+        }
+
+        template <class T>
+        bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value) BOOST_NOEXCEPT
+        {
+            return put_inf_nan_impl(begin, end, value, L"nan", L"infinity");
+        }
+
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+        template <class T>
+        bool parse_inf_nan(const char16_t* begin, const char16_t* end, T& value) BOOST_NOEXCEPT
+        {
+            return parse_inf_nan_impl(begin, end, value
+                               , u"NAN", u"nan"
+                               , u"INFINITY", u"infinity"
+                               , u'(', u')');
+        }
+
+        template <class T>
+        bool put_inf_nan(char16_t* begin, char16_t*& end, const T& value) BOOST_NOEXCEPT
+        {
+            return put_inf_nan_impl(begin, end, value, u"nan", u"infinity");
+        }
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+        template <class T>
+        bool parse_inf_nan(const char32_t* begin, const char32_t* end, T& value) BOOST_NOEXCEPT
+        {
+            return parse_inf_nan_impl(begin, end, value
+                               , U"NAN", U"nan"
+                               , U"INFINITY", U"infinity"
+                               , U'(', U')');
+        }
+
+        template <class T>
+        bool put_inf_nan(char32_t* begin, char32_t*& end, const T& value) BOOST_NOEXCEPT
+        {
+            return put_inf_nan_impl(begin, end, value, U"nan", U"infinity");
+        }
+#endif
+
+        template <class CharT, class T>
+        bool parse_inf_nan(const CharT* begin, const CharT* end, T& value) BOOST_NOEXCEPT
+        {
+            return parse_inf_nan_impl(begin, end, value
+                               , "NAN", "nan"
+                               , "INFINITY", "infinity"
+                               , '(', ')');
+        }
+
+        template <class CharT, class T>
+        bool put_inf_nan(CharT* begin, CharT*& end, const T& value) BOOST_NOEXCEPT
+        {
+            return put_inf_nan_impl(begin, end, value, "nan", "infinity");
+        }
+    }
+
+
+    namespace detail // lcast_ret_float
+    {
+
+// Silence buggy MS warnings like C4244: '+=' : conversion from 'int' to 'unsigned short', possible loss of data 
+#if defined(_MSC_VER) && (_MSC_VER == 1400) 
+#  pragma warning(push) 
+#  pragma warning(disable:4244) 
+#endif 
+        template <class T>
+        struct mantissa_holder_type
+        {
+            /* Can not be used with this type */
+        };
+
+        template <>
+        struct mantissa_holder_type<float>
+        {
+            typedef unsigned int type;
+            typedef double       wide_result_t;
+        };
+
+        template <>
+        struct mantissa_holder_type<double>
+        {
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+            typedef long double  wide_result_t;
+#if defined(BOOST_HAS_LONG_LONG)
+            typedef ndnboost::ulong_long_type type;
+#elif defined(BOOST_HAS_MS_INT64)
+            typedef unsigned __int64 type;
+#endif
+#endif
+        };
+
+        template<class Traits, class T, class CharT>
+        inline bool lcast_ret_float(T& value, const CharT* begin, const CharT* end)
+        {
+
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+            std::locale loc;
+            typedef std::numpunct<CharT> numpunct;
+            numpunct const& np = BOOST_USE_FACET(numpunct, loc);
+            std::string const grouping(
+                    (loc == std::locale::classic())
+                    ? std::string()
+                    : np.grouping()
+            );
+            std::string::size_type const grouping_size = grouping.size();
+            CharT const thousands_sep = static_cast<CharT>(grouping_size ? np.thousands_sep() : 0);
+            CharT const decimal_point = np.decimal_point();
+            bool found_grouping = false;
+            std::string::size_type last_grouping_pos = grouping_size - 1;
+#else
+            CharT const decimal_point = lcast_char_constants<CharT>::c_decimal_separator;
+#endif
+
+            CharT const czero = lcast_char_constants<CharT>::zero;
+            CharT const minus = lcast_char_constants<CharT>::minus;
+            CharT const plus = lcast_char_constants<CharT>::plus;
+            CharT const capital_e = lcast_char_constants<CharT>::capital_e;
+            CharT const lowercase_e = lcast_char_constants<CharT>::lowercase_e;
+
+            value = static_cast<T>(0);
+
+            if (parse_inf_nan(begin, end, value)) return true;
+
+            typedef typename Traits::int_type int_type;
+            typedef BOOST_DEDUCED_TYPENAME mantissa_holder_type<T>::type mantissa_type;
+            typedef BOOST_DEDUCED_TYPENAME mantissa_holder_type<T>::wide_result_t wide_result_t;
+            int_type const zero = Traits::to_int_type(czero);
+            if (begin == end) return false;
+
+            /* Getting the plus/minus sign */
+            bool has_minus = false;
+            if (Traits::eq(*begin, minus) ) {
+                ++ begin;
+                has_minus = true;
+                if (begin == end) return false;
+            } else if (Traits::eq(*begin, plus) ) {
+                ++begin;
+                if (begin == end) return false;
+            }
+
+            bool found_decimal = false;
+            bool found_number_before_exp = false;
+            int pow_of_10 = 0;
+            mantissa_type mantissa=0;
+            bool is_mantissa_full = false;
+
+            char length_since_last_delim = 0;
+
+            while ( begin != end )
+            {
+                if (found_decimal) {
+                    /* We allow no thousand_separators after decimal point */
+
+                    mantissa_type tmp_mantissa = mantissa * 10u;
+                    if (Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) break;
+                    if ( *begin < czero || *begin >= czero + 10 ) return false;
+                    if (    is_mantissa_full
+                            || tmp_mantissa / 10u != mantissa
+                            || (std::numeric_limits<mantissa_type>::max)()-(*begin - zero) < tmp_mantissa
+                            ) {
+                        is_mantissa_full = true;
+                        ++ begin;
+                        continue;
+                    }
+
+                    -- pow_of_10;
+                    mantissa = tmp_mantissa;
+                    mantissa += *begin - zero;
+
+                    found_number_before_exp = true;
+                } else {
+
+                    if (*begin >= czero && *begin < czero + 10) {
+
+                        /* Checking for mantissa overflow. If overflow will
+                         * occur, them we only increase multiplyer
+                         */
+                        mantissa_type tmp_mantissa = mantissa * 10u;
+                        if(     !is_mantissa_full
+                                && tmp_mantissa / 10u == mantissa
+                                && (std::numeric_limits<mantissa_type>::max)()-(*begin - zero) >= tmp_mantissa
+                            )
+                        {
+                            mantissa = tmp_mantissa;
+                            mantissa += *begin - zero;
+                        } else
+                        {
+                            is_mantissa_full = true;
+                            ++ pow_of_10;
+                        }
+
+                        found_number_before_exp = true;
+                        ++ length_since_last_delim;
+                    } else if (Traits::eq(*begin, decimal_point) || Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) {
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+                        /* If ( we need to check grouping
+                         *      and (   grouping missmatches
+                         *              or grouping position is incorrect
+                         *              or we are using the grouping position 0 twice
+                         *           )
+                         *    ) then return error
+                         */
+                        if( grouping_size && found_grouping
+                            && (
+                                   length_since_last_delim != grouping[0]
+                                   || last_grouping_pos>1
+                                   || (last_grouping_pos==0 && grouping_size>1)
+                                )
+                           ) return false;
+#endif
+
+                        if(Traits::eq(*begin, decimal_point)) {
+                            ++ begin;
+                            found_decimal = true;
+                            if (!found_number_before_exp && begin==end) return false;
+                            continue;
+                        }else {
+                            if (!found_number_before_exp) return false;
+                            break;
+                        }
+                    }
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+                    else if (grouping_size && Traits::eq(*begin, thousands_sep)){
+                        if(found_grouping)
+                        {
+                            /* It is not he first time, when we find thousands separator,
+                             * so we need to chek, is the distance between two groupings
+                             * equal to grouping[last_grouping_pos] */
+
+                            if (length_since_last_delim != grouping[last_grouping_pos] )
+                            {
+                                if (!last_grouping_pos) return false;
+                                else
+                                {
+                                    -- last_grouping_pos;
+                                    if (length_since_last_delim != grouping[last_grouping_pos]) return false;
+                                }
+                            } else
+                                /* We are calling the grouping[0] twice, when grouping size is more than 1 */
+                                if (grouping_size>1u && last_grouping_pos+1<grouping_size) return false;
+
+                        } else {
+                            /* Delimiter at the begining ',000' */
+                            if (!length_since_last_delim) return false;
+
+                            found_grouping = true;
+                            if (length_since_last_delim > grouping[last_grouping_pos] ) return false;
+                        }
+
+                        length_since_last_delim = 0;
+                        ++ begin;
+
+                        /* Delimiter at the end '100,' */
+                        if (begin == end) return false;
+                        continue;
+                    }
+#endif
+                    else return false;
+                }
+
+                ++begin;
+            }
+
+            // Exponent found
+            if ( begin != end && (Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) ) {
+                ++ begin;
+                if ( begin == end ) return false;
+
+                bool exp_has_minus = false;
+                if(Traits::eq(*begin, minus)) {
+                    exp_has_minus = true;
+                    ++ begin;
+                    if ( begin == end ) return false;
+                } else if (Traits::eq(*begin, plus)) {
+                    ++ begin;
+                    if ( begin == end ) return false;
+                }
+
+                int exp_pow_of_10 = 0;
+                while ( begin != end )
+                {
+                    if ( *begin < czero
+                            || *begin >= czero + 10
+                            || exp_pow_of_10 * 10 < exp_pow_of_10) /* Overflows are checked lower more precisely*/
+                        return false;
+
+                    exp_pow_of_10 *= 10;
+                    exp_pow_of_10 += *begin - zero;
+                    ++ begin;
+                };
+
+                if ( exp_pow_of_10 ) {
+                    /* Overflows are checked lower */
+                    if ( exp_has_minus ) {
+                        pow_of_10 -= exp_pow_of_10;
+                    } else {
+                        pow_of_10 += exp_pow_of_10;
+                    }
+                }
+            }
+
+            /* We need a more accurate algorithm... We can not use current algorithm
+             * with long doubles (and with doubles if sizeof(double)==sizeof(long double)).
+             */
+            const wide_result_t result = std::pow(static_cast<wide_result_t>(10.0), pow_of_10) * mantissa;
+            value = static_cast<T>( has_minus ? (ndnboost::math::changesign)(result) : result);
+
+            if ( (ndnboost::math::isinf)(value) || (ndnboost::math::isnan)(value) ) return false;
+
+            return true;
+        }
+// Unsilence buggy MS warnings like C4244: '+=' : conversion from 'int' to 'unsigned short', possible loss of data 
+#if defined(_MSC_VER) && (_MSC_VER == 1400) 
+#  pragma warning(pop) 
+#endif 
+    }
+
+    namespace detail // parser_buf
+    {
+        //
+        // class parser_buf:
+        // acts as a stream buffer which wraps around a pair of pointers
+        //
+        // This class is copied (and slightly changed) from
+        // boost/regex/v4/cpp_regex_traits.hpp
+        // Thanks John Maddock for it! (previous version had some
+        // problems with libc++ and some other STL implementations)
+        template <class BufferType, class charT>
+        class parser_buf : public BufferType {
+           typedef BufferType base_type;
+           typedef typename base_type::int_type int_type;
+           typedef typename base_type::char_type char_type;
+           typedef typename base_type::pos_type pos_type;
+           typedef ::std::streamsize streamsize;
+           typedef typename base_type::off_type off_type;
+
+        public:
+           parser_buf() : base_type() { setbuf(0, 0); }
+           const charT* getnext() { return this->gptr(); }
+#ifndef BOOST_NO_USING_TEMPLATE
+            using base_type::pptr;
+            using base_type::pbase;
+#else
+            charT* pptr() const { return base_type::pptr(); }
+            charT* pbase() const { return base_type::pbase(); }
+#endif
+           base_type* setbuf(char_type* s, streamsize n) {
+               this->setg(s, s, s + n);
+               return this;
+           }
+
+           pos_type seekpos(pos_type sp, ::std::ios_base::openmode which) {
+               if(which & ::std::ios_base::out)
+                  return pos_type(off_type(-1));
+               off_type size = static_cast<off_type>(this->egptr() - this->eback());
+               charT* g = this->eback();
+               if(off_type(sp) <= size)
+               {
+                  this->setg(g, g + off_type(sp), g + size);
+               }
+               return pos_type(off_type(-1));
+            }
+
+           pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) {
+               typedef typename ndnboost::int_t<sizeof(way) * CHAR_BIT>::least cast_type;
+
+               if(which & ::std::ios_base::out)
+                  return pos_type(off_type(-1));
+               std::ptrdiff_t size = this->egptr() - this->eback();
+               std::ptrdiff_t pos = this->gptr() - this->eback();
+               charT* g = this->eback();
+               switch(static_cast<cast_type>(way))
+               {
+               case ::std::ios_base::beg:
+                  if((off < 0) || (off > size))
+                     return pos_type(off_type(-1));
+                  else
+                     this->setg(g, g + off, g + size);
+                  break;
+               case ::std::ios_base::end:
+                  if((off < 0) || (off > size))
+                     return pos_type(off_type(-1));
+                  else
+                     this->setg(g, g + size - off, g + size);
+                  break;
+               case ::std::ios_base::cur:
+               {
+                  std::ptrdiff_t newpos = static_cast<std::ptrdiff_t>(pos + off);
+                  if((newpos < 0) || (newpos > size))
+                     return pos_type(off_type(-1));
+                  else
+                     this->setg(g, g + newpos, g + size);
+                  break;
+               }
+               default: ;
+               }
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4244)
+#endif
+               return static_cast<pos_type>(this->gptr() - this->eback());
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+            }
+        private:
+           parser_buf& operator=(const parser_buf&);
+           parser_buf(const parser_buf&);
+        };
+    }
+
+    namespace detail
+    {
+        struct do_not_construct_out_stream_t{};
+    }
+
+    namespace detail // optimized stream wrapper
+    {
+        // String representation of Source has an upper limit.
+        template< class CharT // a result of widest_char transformation
+                , class Traits // usually char_traits<CharT>
+                , bool RequiresStringbuffer
+                >
+        class lexical_stream_limited_src
+        {
+
+#if defined(BOOST_NO_STRINGSTREAM)
+            typedef std::ostrstream                         out_stream_t;
+#elif defined(BOOST_NO_STD_LOCALE)
+            typedef std::ostringstream                      out_stream_t;
+            typedef parser_buf<std::streambuf, char>        buffer_t;
+#else
+            typedef std::basic_ostringstream<CharT, Traits>                 out_stream_t;
+            typedef parser_buf<std::basic_streambuf<CharT, Traits>, CharT>  buffer_t;
+#endif
+            typedef BOOST_DEDUCED_TYPENAME ndnboost::mpl::if_c<
+                RequiresStringbuffer,
+                out_stream_t,
+                do_not_construct_out_stream_t
+            >::type deduced_out_stream_t;
+
+            // A string representation of Source is written to [start, finish).
+            CharT* start;
+            CharT* finish;
+            deduced_out_stream_t out_stream;
+
+        public:
+            lexical_stream_limited_src(CharT* sta, CharT* fin) BOOST_NOEXCEPT
+              : start(sta)
+              , finish(fin)
+            {}
+
+        private:
+            // Undefined:
+            lexical_stream_limited_src(lexical_stream_limited_src const&);
+            void operator=(lexical_stream_limited_src const&);
+
+/************************************ HELPER FUNCTIONS FOR OPERATORS << ( ... ) ********************************/
+            bool shl_char(CharT ch) BOOST_NOEXCEPT
+            {
+                Traits::assign(*start, ch);
+                finish = start + 1;
+                return true;
+            }
+
+#ifndef BOOST_LCAST_NO_WCHAR_T
+            template <class T>
+            bool shl_char(T ch)
+            {
+                BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)) ,
+                    "ndnboost::lexical_cast does not support narrowing of char types."
+                    "Use ndnboost::locale instead" );
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+                std::locale loc;
+                CharT const w = BOOST_USE_FACET(std::ctype<CharT>, loc).widen(ch);
+#else
+                CharT const w = static_cast<CharT>(ch);
+#endif
+                Traits::assign(*start, w);
+                finish = start + 1;
+                return true;
+            }
+#endif
+
+            bool shl_char_array(CharT const* str) BOOST_NOEXCEPT
+            {
+                start = const_cast<CharT*>(str);
+                finish = start + Traits::length(str);
+                return true;
+            }
+
+            template <class T>
+            bool shl_char_array(T const* str)
+            {
+                BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)),
+                    "ndnboost::lexical_cast does not support narrowing of char types."
+                    "Use ndnboost::locale instead" );
+                return shl_input_streamable(str);
+            }
+            
+            bool shl_char_array_limited(CharT const* str, std::size_t max_size) BOOST_NOEXCEPT
+            {
+                start = const_cast<CharT*>(str);
+                finish = std::find(start, start + max_size, Traits::to_char_type(0));
+                return true;
+            }
+
+            template<typename InputStreamable>
+            bool shl_input_streamable(InputStreamable& input)
+            {
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE)
+                // If you have compilation error at this point, than your STL library
+                // does not support such conversions. Try updating it.
+                BOOST_STATIC_ASSERT((ndnboost::is_same<char, CharT>::value));
+#endif
+                bool const result = !(out_stream << input).fail();
+                const buffer_t* const p = static_cast<buffer_t*>(
+                    static_cast<std::basic_streambuf<CharT, Traits>*>(out_stream.rdbuf())
+                );
+                start = p->pbase();
+                finish = p->pptr();
+                return result;
+            }
+
+            template <class T>
+            inline bool shl_signed(T n)
+            {
+                start = lcast_put_unsigned<Traits>(lcast_to_unsigned(n), finish);
+                if(n < 0)
+                {
+                    --start;
+                    CharT const minus = lcast_char_constants<CharT>::minus;
+                    Traits::assign(*start, minus);
+                }
+                return true;
+            }
+
+            template <class T, class SomeCharT>
+            bool shl_real_type(const T& val, SomeCharT* begin, SomeCharT*& end)
+            {
+                if (put_inf_nan(begin, end, val)) return true;
+                lcast_set_precision(out_stream, &val);
+                return shl_input_streamable(val);
+            }
+
+            static bool shl_real_type(float val, char* begin, char*& end)
+            {   using namespace std;
+                if (put_inf_nan(begin, end, val)) return true;
+                const double val_as_double = val;
+                end = begin + 
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+                    sprintf_s(begin, end-begin,
+#else
+                    sprintf(begin, 
+#endif
+                    "%.*g", static_cast<int>(ndnboost::detail::lcast_get_precision<float>()), val_as_double);
+                return end > begin;
+            }
+
+            static bool shl_real_type(double val, char* begin, char*& end)
+            {   using namespace std;
+                if (put_inf_nan(begin, end, val)) return true;
+                end = begin + 
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+                    sprintf_s(begin, end-begin,
+#else
+                    sprintf(begin, 
+#endif
+                    "%.*g", static_cast<int>(ndnboost::detail::lcast_get_precision<double>()), val);
+                return end > begin;
+            }
+
+#ifndef __MINGW32__
+            static bool shl_real_type(long double val, char* begin, char*& end)
+            {   using namespace std;
+                if (put_inf_nan(begin, end, val)) return true;
+                end = begin + 
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+                    sprintf_s(begin, end-begin,
+#else
+                    sprintf(begin, 
+#endif
+                    "%.*Lg", static_cast<int>(ndnboost::detail::lcast_get_precision<long double>()), val );
+                return end > begin;
+            }
+#endif
+
+
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__)
+            static bool shl_real_type(float val, wchar_t* begin, wchar_t*& end)
+            {   using namespace std;
+                if (put_inf_nan(begin, end, val)) return true;
+                const double val_as_double = val;
+                end = begin + swprintf(begin, end-begin,
+                                       L"%.*g",
+                                       static_cast<int>(ndnboost::detail::lcast_get_precision<float >()),
+                                       val_as_double );
+                return end > begin;
+            }
+
+            static bool shl_real_type(double val, wchar_t* begin, wchar_t*& end)
+            {   using namespace std;
+                if (put_inf_nan(begin, end, val)) return true;
+                end = begin + swprintf(begin, end-begin,
+                                          L"%.*g", static_cast<int>(ndnboost::detail::lcast_get_precision<double >()), val );
+                return end > begin;
+            }
+
+            static bool shl_real_type(long double val, wchar_t* begin, wchar_t*& end)
+            {   using namespace std;
+                if (put_inf_nan(begin, end, val)) return true;
+                end = begin + swprintf(begin, end-begin,
+                                          L"%.*Lg", static_cast<int>(ndnboost::detail::lcast_get_precision<long double >()), val );
+                return end > begin;
+            }
+#endif
+
+/************************************ OPERATORS << ( ... ) ********************************/
+        public:
+            template<class Alloc>
+            bool operator<<(std::basic_string<CharT,Traits,Alloc> const& str) BOOST_NOEXCEPT
+            {
+                start = const_cast<CharT*>(str.data());
+                finish = start + str.length();
+                return true;
+            }
+
+            template<class Alloc>
+            bool operator<<(ndnboost::container::basic_string<CharT,Traits,Alloc> const& str) BOOST_NOEXCEPT
+            {
+                start = const_cast<CharT*>(str.data());
+                finish = start + str.length();
+                return true;
+            }
+
+            bool operator<<(bool value) BOOST_NOEXCEPT
+            {
+                CharT const czero = lcast_char_constants<CharT>::zero;
+                Traits::assign(*start, Traits::to_char_type(czero + value));
+                finish = start + 1;
+                return true;
+            }
+
+            bool operator<<(const iterator_range<CharT*>& rng) BOOST_NOEXCEPT
+            {
+                start = rng.begin();
+                finish = rng.end();
+                return true; 
+            }
+            
+            bool operator<<(const iterator_range<const CharT*>& rng) BOOST_NOEXCEPT
+            {
+                start = const_cast<CharT*>(rng.begin());
+                finish = const_cast<CharT*>(rng.end());
+                return true; 
+            }
+
+            bool operator<<(const iterator_range<const signed char*>& rng) BOOST_NOEXCEPT
+            {
+                return (*this) << iterator_range<char*>(
+                    const_cast<char*>(reinterpret_cast<const char*>(rng.begin())),
+                    const_cast<char*>(reinterpret_cast<const char*>(rng.end()))
+                );
+            }
+
+            bool operator<<(const iterator_range<const unsigned char*>& rng) BOOST_NOEXCEPT
+            {
+                return (*this) << iterator_range<char*>(
+                    const_cast<char*>(reinterpret_cast<const char*>(rng.begin())),
+                    const_cast<char*>(reinterpret_cast<const char*>(rng.end()))
+                );
+            }
+
+            bool operator<<(const iterator_range<signed char*>& rng) BOOST_NOEXCEPT
+            {
+                return (*this) << iterator_range<char*>(
+                    reinterpret_cast<char*>(rng.begin()),
+                    reinterpret_cast<char*>(rng.end())
+                );
+            }
+
+            bool operator<<(const iterator_range<unsigned char*>& rng) BOOST_NOEXCEPT
+            {
+                return (*this) << iterator_range<char*>(
+                    reinterpret_cast<char*>(rng.begin()),
+                    reinterpret_cast<char*>(rng.end())
+                );
+            }
+
+            bool operator<<(char ch)                    { return shl_char(ch); }
+            bool operator<<(unsigned char ch)           { return ((*this) << static_cast<char>(ch)); }
+            bool operator<<(signed char ch)             { return ((*this) << static_cast<char>(ch)); }
+#if !defined(BOOST_LCAST_NO_WCHAR_T)
+            bool operator<<(wchar_t const* str)         { return shl_char_array(str); }
+            bool operator<<(wchar_t * str)              { return shl_char_array(str); }
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
+            bool operator<<(wchar_t ch)                 { return shl_char(ch); }
+#endif
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+            bool operator<<(char16_t ch)                { return shl_char(ch); }
+            bool operator<<(char16_t * str)             { return shl_char_array(str); }
+            bool operator<<(char16_t const * str)       { return shl_char_array(str); }
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+            bool operator<<(char32_t ch)                { return shl_char(ch); }
+            bool operator<<(char32_t * str)             { return shl_char_array(str); }
+            bool operator<<(char32_t const * str)       { return shl_char_array(str); }
+#endif
+            bool operator<<(unsigned char const* ch)    { return ((*this) << reinterpret_cast<char const*>(ch)); }
+            bool operator<<(unsigned char * ch)         { return ((*this) << reinterpret_cast<char *>(ch)); }
+            bool operator<<(signed char const* ch)      { return ((*this) << reinterpret_cast<char const*>(ch)); }
+            bool operator<<(signed char * ch)           { return ((*this) << reinterpret_cast<char *>(ch)); }
+            bool operator<<(char const* str)            { return shl_char_array(str); }
+            bool operator<<(char* str)                  { return shl_char_array(str); }
+            bool operator<<(short n)                    { return shl_signed(n); }
+            bool operator<<(int n)                      { return shl_signed(n); }
+            bool operator<<(long n)                     { return shl_signed(n); }
+            bool operator<<(unsigned short n)           { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+            bool operator<<(unsigned int n)             { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+            bool operator<<(unsigned long n)            { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+
+#if defined(BOOST_HAS_LONG_LONG)
+            bool operator<<(ndnboost::ulong_long_type n)   { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+            bool operator<<(ndnboost::long_long_type n)    { return shl_signed(n); }
+#elif defined(BOOST_HAS_MS_INT64)
+            bool operator<<(unsigned __int64 n)         { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+            bool operator<<(         __int64 n)         { return shl_signed(n); }
+#endif
+
+#ifdef BOOST_LCAST_HAS_INT128
+        bool operator<<(const ndnboost::uint128_type& n)   { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+        bool operator<<(const ndnboost::int128_type& n)    { return shl_signed(n); }
+#endif
+
+            bool operator<<(float val)                  { return shl_real_type(val, start, finish); }
+            bool operator<<(double val)                 { return shl_real_type(val, start, finish); }
+            bool operator<<(long double val)            {
+#ifndef __MINGW32__
+                return shl_real_type(val, start, finish);
+#else
+                return shl_real_type(static_cast<double>(val), start, finish);
+#endif
+            }
+            
+            template <std::size_t N>
+            bool operator<<(ndnboost::array<CharT, N> const& input) BOOST_NOEXCEPT
+            { return shl_char_array_limited(input.begin(), N); }
+
+            template <std::size_t N>
+            bool operator<<(ndnboost::array<unsigned char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<ndnboost::array<char, N> const& >(input)); }
+
+            template <std::size_t N>
+            bool operator<<(ndnboost::array<signed char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<ndnboost::array<char, N> const& >(input)); }
+
+            template <std::size_t N>
+            bool operator<<(ndnboost::array<const CharT, N> const& input) BOOST_NOEXCEPT
+            { return shl_char_array_limited(input.begin(), N); }
+
+            template <std::size_t N>
+            bool operator<<(ndnboost::array<const unsigned char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<ndnboost::array<const char, N> const& >(input)); }
+
+            template <std::size_t N>
+            bool operator<<(ndnboost::array<const signed char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<ndnboost::array<const char, N> const& >(input)); }
+ 
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+            template <std::size_t N>
+            bool operator<<(std::array<CharT, N> const& input) BOOST_NOEXCEPT
+            { 
+                if (input.size()) return shl_char_array_limited(&input[0], N);
+                else return true; 
+            }
+
+            template <std::size_t N>
+            bool operator<<(std::array<unsigned char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<ndnboost::array<char, N> const& >(input)); }
+
+            template <std::size_t N>
+            bool operator<<(std::array<signed char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<ndnboost::array<char, N> const& >(input)); }
+
+            template <std::size_t N>
+            bool operator<<(std::array<const CharT, N> const& input) BOOST_NOEXCEPT
+            { 
+                if (input.size()) return shl_char_array_limited(&input[0], N);
+                else return true; 
+            }
+
+            template <std::size_t N>
+            bool operator<<(std::array<const unsigned char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<ndnboost::array<const char, N> const& >(input)); }
+
+            template <std::size_t N>
+            bool operator<<(std::array<const signed char, N> const& input) BOOST_NOEXCEPT
+            { return ((*this) << reinterpret_cast<ndnboost::array<const char, N> const& >(input)); }
+#endif
+            
+            template <class InStreamable>
+            bool operator<<(const InStreamable& input)  { return shl_input_streamable(input); }
+
+/************************************ HELPER FUNCTIONS FOR OPERATORS >> ( ... ) ********************************/
+        private:
+
+            template <typename Type>
+            bool shr_unsigned(Type& output)
+            {
+                if (start == finish) return false;
+                CharT const minus = lcast_char_constants<CharT>::minus;
+                CharT const plus = lcast_char_constants<CharT>::plus;
+                bool has_minus = false;
+
+                /* We won`t use `start' any more, so no need in decrementing it after */
+                if ( Traits::eq(minus,*start) )
+                {
+                    ++start;
+                    has_minus = true;
+                } else if ( Traits::eq( plus, *start ) )
+                {
+                    ++start;
+                }
+
+                bool const succeed = lcast_ret_unsigned<Traits>(output, start, finish);
+
+                if (has_minus) {
+                    output = static_cast<Type>(0u - output);
+                }
+
+                return succeed;
+            }
+
+            template <typename Type>
+            bool shr_signed(Type& output)
+            {
+                if (start == finish) return false;
+                CharT const minus = lcast_char_constants<CharT>::minus;
+                CharT const plus = lcast_char_constants<CharT>::plus;
+                typedef BOOST_DEDUCED_TYPENAME make_unsigned<Type>::type utype;
+                utype out_tmp =0;
+                bool has_minus = false;
+
+                /* We won`t use `start' any more, so no need in decrementing it after */
+                if ( Traits::eq(minus,*start) )
+                {
+                    ++start;
+                    has_minus = true;
+                } else if ( Traits::eq(plus, *start) )
+                {
+                    ++start;
+                }
+
+                bool succeed = lcast_ret_unsigned<Traits>(out_tmp, start, finish);
+                if (has_minus) {
+                    utype const comp_val = (static_cast<utype>(1) << std::numeric_limits<Type>::digits);
+                    succeed = succeed && out_tmp<=comp_val;
+                    output = static_cast<Type>(0u - out_tmp);
+                } else {
+                    utype const comp_val = static_cast<utype>((std::numeric_limits<Type>::max)());
+                    succeed = succeed && out_tmp<=comp_val;
+                    output = out_tmp;
+                }
+                return succeed;
+            }
+
+            template<typename InputStreamable>
+            bool shr_using_base_class(InputStreamable& output)
+            {
+                BOOST_STATIC_ASSERT_MSG(
+                    (!ndnboost::is_pointer<InputStreamable>::value),
+                    "ndnboost::lexical_cast can not convert to pointers"
+                );
+
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE)
+                BOOST_STATIC_ASSERT_MSG((ndnboost::is_same<char, CharT>::value),
+                    "ndnboost::lexical_cast can not convert, because your STL library does not "
+                    "support such conversions. Try updating it."
+                );
+#endif
+
+#if defined(BOOST_NO_STRINGSTREAM)
+                std::istrstream stream(start, finish - start);
+#else
+
+                buffer_t buf;
+                buf.setbuf(start, finish - start);
+#if defined(BOOST_NO_STD_LOCALE)
+                std::istream stream(&buf);
+#else
+                std::basic_istream<CharT, Traits> stream(&buf);
+#endif // BOOST_NO_STD_LOCALE
+#endif // BOOST_NO_STRINGSTREAM
+
+                stream.unsetf(std::ios::skipws);
+                lcast_set_precision(stream, static_cast<InputStreamable*>(0));
+
+                return stream >> output &&
+                    stream.get() ==
+#if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING)
+        // GCC 2.9x lacks std::char_traits<>::eof().
+        // We use BOOST_NO_STD_WSTRING to filter out STLport and libstdc++-v3
+        // configurations, which do provide std::char_traits<>::eof().
+
+                    EOF;
+#else
+                Traits::eof();
+#endif
+            }
+
+            template<class T>
+            inline bool shr_xchar(T& output)
+            {
+                BOOST_STATIC_ASSERT_MSG(( sizeof(CharT) == sizeof(T) ),
+                    "ndnboost::lexical_cast does not support narrowing of character types."
+                    "Use ndnboost::locale instead" );
+                bool const ok = (finish - start == 1);
+                if (ok) {
+                    CharT out;
+                    Traits::assign(out, *start);
+                    output = static_cast<T>(out);
+                }
+                return ok;
+            }
+
+/************************************ OPERATORS >> ( ... ) ********************************/
+        public:
+            bool operator>>(unsigned short& output)             { return shr_unsigned(output); }
+            bool operator>>(unsigned int& output)               { return shr_unsigned(output); }
+            bool operator>>(unsigned long int& output)          { return shr_unsigned(output); }
+            bool operator>>(short& output)                      { return shr_signed(output); }
+            bool operator>>(int& output)                        { return shr_signed(output); }
+            bool operator>>(long int& output)                   { return shr_signed(output); }
+#if defined(BOOST_HAS_LONG_LONG)
+            bool operator>>(ndnboost::ulong_long_type& output)     { return shr_unsigned(output); }
+            bool operator>>(ndnboost::long_long_type& output)      { return shr_signed(output); }
+#elif defined(BOOST_HAS_MS_INT64)
+            bool operator>>(unsigned __int64& output)           { return shr_unsigned(output); }
+            bool operator>>(__int64& output)                    { return shr_signed(output); }
+#endif
+
+#ifdef BOOST_LCAST_HAS_INT128
+            bool operator>>(ndnboost::uint128_type& output)        { return shr_unsigned(output); }
+            bool operator>>(ndnboost::int128_type& output)         { return shr_signed(output); }
+#endif
+
+            bool operator>>(char& output)                       { return shr_xchar(output); }
+            bool operator>>(unsigned char& output)              { return shr_xchar(output); }
+            bool operator>>(signed char& output)                { return shr_xchar(output); }
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+            bool operator>>(wchar_t& output)                    { return shr_xchar(output); }
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+            bool operator>>(char16_t& output)                   { return shr_xchar(output); }
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+            bool operator>>(char32_t& output)                   { return shr_xchar(output); }
+#endif
+            template<class Alloc>
+            bool operator>>(std::basic_string<CharT,Traits,Alloc>& str) { str.assign(start, finish); return true; }
+
+            template<class Alloc>
+            bool operator>>(ndnboost::container::basic_string<CharT,Traits,Alloc>& str) { str.assign(start, finish); return true; }
+
+            
+    private:
+            template <std::size_t N, class ArrayT>
+            bool shr_std_array(ArrayT& output) BOOST_NOEXCEPT
+            {
+                using namespace std;
+                const std::size_t size = finish - start;
+                if (size > N - 1) { // `-1` because we need to store \0 at the end 
+                    return false;
+                }
+
+                memcpy(&output[0], start, size * sizeof(CharT));
+                output[size] = Traits::to_char_type(0);
+                return true;
+            }
+
+    public:
+
+            template <std::size_t N>
+            bool operator>>(ndnboost::array<CharT, N>& output) BOOST_NOEXCEPT
+            { 
+                return shr_std_array<N>(output); 
+            }
+
+            template <std::size_t N>
+            bool operator>>(ndnboost::array<unsigned char, N>& output)   
+            { 
+                return ((*this) >> reinterpret_cast<ndnboost::array<char, N>& >(output)); 
+            }
+
+            template <std::size_t N>
+            bool operator>>(ndnboost::array<signed char, N>& output)   
+            { 
+                return ((*this) >> reinterpret_cast<ndnboost::array<char, N>& >(output)); 
+            }
+ 
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+            template <std::size_t N>
+            bool operator>>(std::array<CharT, N>& output) BOOST_NOEXCEPT
+            { 
+                return shr_std_array<N>(output); 
+            }
+
+            template <std::size_t N>
+            bool operator>>(std::array<unsigned char, N>& output)   
+            { 
+                return ((*this) >> reinterpret_cast<std::array<char, N>& >(output)); 
+            }
+
+            template <std::size_t N>
+            bool operator>>(std::array<signed char, N>& output)
+            { 
+                return ((*this) >> reinterpret_cast<std::array<char, N>& >(output)); 
+            }
+#endif
+
+
+            /*
+             * case "-0" || "0" || "+0" :   output = false; return true;
+             * case "1" || "+1":            output = true;  return true;
+             * default:                     return false;
+             */
+            bool operator>>(bool& output) BOOST_NOEXCEPT
+            {
+                CharT const zero = lcast_char_constants<CharT>::zero;
+                CharT const plus = lcast_char_constants<CharT>::plus;
+                CharT const minus = lcast_char_constants<CharT>::minus;
+
+                switch(finish-start)
+                {
+                    case 1:
+                        output = Traits::eq(start[0],  zero+1);
+                        return output || Traits::eq(start[0], zero );
+                    case 2:
+                        if ( Traits::eq( plus, *start) )
+                        {
+                            ++start;
+                            output = Traits::eq(start[0], zero +1);
+                            return output || Traits::eq(start[0], zero );
+                        } else
+                        {
+                            output = false;
+                            return Traits::eq( minus, *start)
+                                && Traits::eq( zero, start[1]);
+                        }
+                    default:
+                        output = false; // Suppress warning about uninitalized variable
+                        return false;
+                }
+            }
+
+            bool operator>>(float& output) { return lcast_ret_float<Traits>(output,start,finish); }
+
+        private:
+            // Not optimised converter
+            template <class T>
+            bool float_types_converter_internal(T& output, int /*tag*/) {
+                if (parse_inf_nan(start, finish, output)) return true;
+                bool return_value = shr_using_base_class(output);
+
+                /* Some compilers and libraries successfully
+                 * parse 'inf', 'INFINITY', '1.0E', '1.0E-'...
+                 * We are trying to provide a unified behaviour,
+                 * so we just forbid such conversions (as some
+                 * of the most popular compilers/libraries do)
+                 * */
+                CharT const minus = lcast_char_constants<CharT>::minus;
+                CharT const plus = lcast_char_constants<CharT>::plus;
+                CharT const capital_e = lcast_char_constants<CharT>::capital_e;
+                CharT const lowercase_e = lcast_char_constants<CharT>::lowercase_e;
+                if ( return_value &&
+                     (
+                        Traits::eq(*(finish-1), lowercase_e)                   // 1.0e
+                        || Traits::eq(*(finish-1), capital_e)                  // 1.0E
+                        || Traits::eq(*(finish-1), minus)                      // 1.0e- or 1.0E-
+                        || Traits::eq(*(finish-1), plus)                       // 1.0e+ or 1.0E+
+                     )
+                ) return false;
+
+                return return_value;
+            }
+
+            // Optimised converter
+            bool float_types_converter_internal(double& output,char /*tag*/) {
+                return lcast_ret_float<Traits>(output,start,finish);
+            }
+        public:
+
+            bool operator>>(double& output)
+            {
+                /*
+                 * Some compilers implement long double as double. In that case these types have
+                 * same size, same precision, same max and min values... And it means,
+                 * that current implementation of lcast_ret_float cannot be used for type
+                 * double, because it will give a big precision loss.
+                 * */
+                ndnboost::mpl::if_c<
+#if (defined(BOOST_HAS_LONG_LONG) || defined(BOOST_HAS_MS_INT64)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+                    ndnboost::type_traits::ice_eq< sizeof(double), sizeof(long double) >::value,
+#else
+                     1,
+#endif
+                    int,
+                    char
+                >::type tag = 0;
+
+                return float_types_converter_internal(output, tag);
+            }
+
+            bool operator>>(long double& output)
+            {
+                int tag = 0;
+                return float_types_converter_internal(output, tag);
+            }
+
+            // Generic istream-based algorithm.
+            // lcast_streambuf_for_target<InputStreamable>::value is true.
+            template<typename InputStreamable>
+            bool operator>>(InputStreamable& output) { return shr_using_base_class(output); }
+        };
+    }
+
+    namespace detail
+    {
+        template<typename T>
+        struct is_stdstring
+        {
+            BOOST_STATIC_CONSTANT(bool, value = false );
+        };
+
+        template<typename CharT, typename Traits, typename Alloc>
+        struct is_stdstring< std::basic_string<CharT, Traits, Alloc> >
+        {
+            BOOST_STATIC_CONSTANT(bool, value = true );
+        };
+
+        template<typename CharT, typename Traits, typename Alloc>
+        struct is_stdstring< ndnboost::container::basic_string<CharT, Traits, Alloc> >
+        {
+            BOOST_STATIC_CONSTANT(bool, value = true );
+        };
+
+        template<typename Target, typename Source>
+        struct is_arithmetic_and_not_xchars
+        {
+            BOOST_STATIC_CONSTANT(bool, value =
+               (
+                   ndnboost::type_traits::ice_and<
+                           ndnboost::is_arithmetic<Source>::value,
+                           ndnboost::is_arithmetic<Target>::value,
+                           ndnboost::type_traits::ice_not<
+                                detail::is_char_or_wchar<Target>::value
+                           >::value,
+                           ndnboost::type_traits::ice_not<
+                                detail::is_char_or_wchar<Source>::value
+                           >::value
+                   >::value
+               )
+            );
+        };
+
+        /*
+         * is_xchar_to_xchar<Target, Source>::value is true, when
+         * Target and Souce are the same char types, or when
+         * Target and Souce are char types of the same size.
+         */
+        template<typename Target, typename Source>
+        struct is_xchar_to_xchar
+        {
+            BOOST_STATIC_CONSTANT(bool, value =
+                (
+                    ndnboost::type_traits::ice_or<
+                        ndnboost::type_traits::ice_and<
+                             is_same<Source,Target>::value,
+                             is_char_or_wchar<Target>::value
+                        >::value,
+                        ndnboost::type_traits::ice_and<
+                             ndnboost::type_traits::ice_eq< sizeof(char),sizeof(Target)>::value,
+                             ndnboost::type_traits::ice_eq< sizeof(char),sizeof(Source)>::value,
+                             is_char_or_wchar<Target>::value,
+                             is_char_or_wchar<Source>::value
+                        >::value
+                    >::value
+                )
+            );
+        };
+
+        template<typename Target, typename Source>
+        struct is_char_array_to_stdstring
+        {
+            BOOST_STATIC_CONSTANT(bool, value = false );
+        };
+
+        template<typename CharT, typename Traits, typename Alloc>
+        struct is_char_array_to_stdstring< std::basic_string<CharT, Traits, Alloc>, CharT* >
+        {
+            BOOST_STATIC_CONSTANT(bool, value = true );
+        };
+
+        template<typename CharT, typename Traits, typename Alloc>
+        struct is_char_array_to_stdstring< std::basic_string<CharT, Traits, Alloc>, const CharT* >
+        {
+            BOOST_STATIC_CONSTANT(bool, value = true );
+        };
+
+        template<typename CharT, typename Traits, typename Alloc>
+        struct is_char_array_to_stdstring< ndnboost::container::basic_string<CharT, Traits, Alloc>, CharT* >
+        {
+            BOOST_STATIC_CONSTANT(bool, value = true );
+        };
+
+        template<typename CharT, typename Traits, typename Alloc>
+        struct is_char_array_to_stdstring< ndnboost::container::basic_string<CharT, Traits, Alloc>, const CharT* >
+        {
+            BOOST_STATIC_CONSTANT(bool, value = true );
+        };
+
+#if (defined _MSC_VER)
+# pragma warning( push )
+# pragma warning( disable : 4701 ) // possible use of ... before initialization
+# pragma warning( disable : 4702 ) // unreachable code
+# pragma warning( disable : 4267 ) // conversion from 'size_t' to 'unsigned int'
+#endif
+        template<typename Target, typename Source>
+        struct lexical_cast_do_cast
+        {
+            static inline Target lexical_cast_impl(const Source& arg)
+            {
+                typedef lexical_cast_stream_traits<Source, Target>  stream_trait;
+                
+                typedef detail::lexical_stream_limited_src<
+                    BOOST_DEDUCED_TYPENAME stream_trait::char_type, 
+                    BOOST_DEDUCED_TYPENAME stream_trait::traits, 
+                    stream_trait::requires_stringbuf 
+                > interpreter_type;
+
+                // Target type must be default constructible
+                Target result;               
+
+                BOOST_DEDUCED_TYPENAME stream_trait::char_type buf[stream_trait::len_t::value + 1];
+                stream_trait::len_t::check_coverage();
+
+                interpreter_type interpreter(buf, buf + stream_trait::len_t::value + 1);
+
+                // Disabling ADL, by directly specifying operators.
+                if(!(interpreter.operator <<(arg) && interpreter.operator >>(result)))
+                  BOOST_LCAST_THROW_BAD_CAST(Source, Target);
+
+                return result;
+            }
+        };
+#if (defined _MSC_VER)
+# pragma warning( pop )
+#endif
+
+        template <typename Source>
+        struct lexical_cast_copy
+        {
+            static inline const Source& lexical_cast_impl(const Source &arg) BOOST_NOEXCEPT
+            {
+                return arg;
+            }
+        };
+
+        template <class Source, class Target >
+        struct detect_precision_loss
+        {
+         typedef ndnboost::numeric::Trunc<Source> Rounder;
+         typedef Source source_type ;
+
+         typedef BOOST_DEDUCED_TYPENAME mpl::if_<
+            ndnboost::is_arithmetic<Source>, Source, Source const&
+          >::type argument_type ;
+
+         static source_type nearbyint ( argument_type s )
+         {
+            const source_type near_int = Rounder::nearbyint(s);
+            if (near_int) {
+                const source_type orig_div_round = s / near_int;
+                const source_type eps = std::numeric_limits<source_type>::epsilon();
+
+                if ((orig_div_round > 1 ? orig_div_round - 1 : 1 - orig_div_round) > eps)
+                    BOOST_LCAST_THROW_BAD_CAST(Source, Target);
+            }
+
+            return s ;
+         }
+
+         typedef typename Rounder::round_style round_style;
+        } ;
+
+        template <class Source, class Target >
+        struct nothrow_overflow_handler
+        {
+          void operator() ( ndnboost::numeric::range_check_result r )
+          {
+            if (r != ndnboost::numeric::cInRange)
+                BOOST_LCAST_THROW_BAD_CAST(Source, Target);
+          }
+        } ;
+
+        template <typename Target, typename Source>
+        struct lexical_cast_dynamic_num_not_ignoring_minus
+        {
+            static inline Target lexical_cast_impl(const Source &arg)
+            {
+                return ndnboost::numeric::converter<
+                        Target,
+                        Source,
+                        ndnboost::numeric::conversion_traits<Target,Source>,
+                        nothrow_overflow_handler<Source, Target>,
+                        detect_precision_loss<Source, Target>
+                >::convert(arg);
+            }
+        };
+
+        template <typename Target, typename Source>
+        struct lexical_cast_dynamic_num_ignoring_minus
+        {
+            static inline Target lexical_cast_impl(const Source &arg)
+            {
+                typedef BOOST_DEDUCED_TYPENAME ndnboost::mpl::eval_if_c<
+                        ndnboost::is_float<Source>::value,
+                        ndnboost::mpl::identity<Source>,
+                        ndnboost::make_unsigned<Source>
+                >::type usource_t;
+
+                typedef ndnboost::numeric::converter<
+                        Target,
+                        usource_t,
+                        ndnboost::numeric::conversion_traits<Target,usource_t>,
+                        nothrow_overflow_handler<usource_t, Target>,
+                        detect_precision_loss<usource_t, Target>
+                > converter_t;
+
+                return (
+                    arg < 0 ? static_cast<Target>(0u - converter_t::convert(0u - arg)) : converter_t::convert(arg)
+                );
+            }
+        };
+
+        /*
+         * lexical_cast_dynamic_num follows the rules:
+         * 1) If Source can be converted to Target without precision loss and
+         * without overflows, then assign Source to Target and return
+         *
+         * 2) If Source is less than 0 and Target is an unsigned integer,
+         * then negate Source, check the requirements of rule 1) and if
+         * successful, assign static_casted Source to Target and return
+         *
+         * 3) Otherwise throw a bad_lexical_cast exception
+         *
+         *
+         * Rule 2) required because ndnboost::lexical_cast has the behavior of
+         * stringstream, which uses the rules of scanf for conversions. And
+         * in the C99 standard for unsigned input value minus sign is
+         * optional, so if a negative number is read, no errors will arise
+         * and the result will be the two's complement.
+         */
+        template <typename Target, typename Source>
+        struct lexical_cast_dynamic_num
+        {
+            static inline Target lexical_cast_impl(const Source &arg)
+            {
+                typedef BOOST_DEDUCED_TYPENAME ndnboost::mpl::if_c<
+                    ndnboost::type_traits::ice_and<
+                        ndnboost::type_traits::ice_or<
+                            ndnboost::is_signed<Source>::value,
+                            ndnboost::is_float<Source>::value
+                        >::value,
+                        ndnboost::type_traits::ice_not<
+                            ndnboost::is_same<Source, bool>::value
+                        >::value,
+                        ndnboost::type_traits::ice_not<
+                            ndnboost::is_same<Target, bool>::value
+                        >::value,
+                        ndnboost::is_unsigned<Target>::value
+                    >::value,
+                    lexical_cast_dynamic_num_ignoring_minus<Target, Source>,
+                    lexical_cast_dynamic_num_not_ignoring_minus<Target, Source>
+                >::type caster_type;
+
+                return caster_type::lexical_cast_impl(arg);
+            }
+        };
+    }
+
+    template <typename Target, typename Source>
+    inline Target lexical_cast(const Source &arg)
+    {
+        typedef BOOST_DEDUCED_TYPENAME ndnboost::detail::array_to_pointer_decay<Source>::type src;
+
+        typedef BOOST_DEDUCED_TYPENAME ndnboost::type_traits::ice_or<
+                ndnboost::detail::is_xchar_to_xchar<Target, src >::value,
+                ndnboost::detail::is_char_array_to_stdstring<Target, src >::value,
+                ndnboost::type_traits::ice_and<
+                     ndnboost::is_same<Target, src >::value,
+                     ndnboost::detail::is_stdstring<Target >::value
+                >::value
+        > shall_we_copy_t;
+
+        typedef BOOST_DEDUCED_TYPENAME
+                ndnboost::detail::is_arithmetic_and_not_xchars<Target, src > shall_we_copy_with_dynamic_check_t;
+
+        typedef BOOST_DEDUCED_TYPENAME ndnboost::mpl::if_c<
+            shall_we_copy_t::value,
+            ndnboost::detail::lexical_cast_copy<src >,
+            BOOST_DEDUCED_TYPENAME ndnboost::mpl::if_c<
+                 shall_we_copy_with_dynamic_check_t::value,
+                 ndnboost::detail::lexical_cast_dynamic_num<Target, src >,
+                 ndnboost::detail::lexical_cast_do_cast<Target, src >
+            >::type
+        >::type caster_type;
+
+        return caster_type::lexical_cast_impl(arg);
+    }
+
+    template <typename Target>
+    inline Target lexical_cast(const char* chars, std::size_t count)
+     {
+        return ::ndnboost::lexical_cast<Target>(
+            ::ndnboost::iterator_range<const char*>(chars, chars + count)
+        );
+    }
+
+
+    template <typename Target>
+    inline Target lexical_cast(const unsigned char* chars, std::size_t count)
+    {
+         return ::ndnboost::lexical_cast<Target>(
+            ::ndnboost::iterator_range<const unsigned char*>(chars, chars + count)
+         );
+     }
+
+    template <typename Target>
+    inline Target lexical_cast(const signed char* chars, std::size_t count)
+    {
+        return ::ndnboost::lexical_cast<Target>(
+            ::ndnboost::iterator_range<const signed char*>(chars, chars + count)
+        );
+    }
+
+#ifndef BOOST_LCAST_NO_WCHAR_T
+    template <typename Target>
+    inline Target lexical_cast(const wchar_t* chars, std::size_t count)
+    {
+        return ::ndnboost::lexical_cast<Target>(
+            ::ndnboost::iterator_range<const wchar_t*>(chars, chars + count)
+        );
+    }
+#endif
+#ifndef BOOST_NO_CHAR16_T
+    template <typename Target>
+    inline Target lexical_cast(const char16_t* chars, std::size_t count)
+    {
+        return ::ndnboost::lexical_cast<Target>(
+            ::ndnboost::iterator_range<const char16_t*>(chars, chars + count)
+        );
+    }
+#endif
+#ifndef BOOST_NO_CHAR32_T
+    template <typename Target>
+    inline Target lexical_cast(const char32_t* chars, std::size_t count)
+    {
+        return ::ndnboost::lexical_cast<Target>(
+            ::ndnboost::iterator_range<const char32_t*>(chars, chars + count)
+        );
+    }
+#endif
+
+} // namespace ndnboost
+
+#else // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+namespace ndnboost {
+    namespace detail
+    {
+
+        // selectors for choosing stream character type
+        template<typename Type>
+        struct stream_char
+        {
+            typedef char type;
+        };
+
+#ifndef BOOST_LCAST_NO_WCHAR_T
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
+        template<>
+        struct stream_char<wchar_t>
+        {
+            typedef wchar_t type;
+        };
+#endif
+
+        template<>
+        struct stream_char<wchar_t *>
+        {
+            typedef wchar_t type;
+        };
+
+        template<>
+        struct stream_char<const wchar_t *>
+        {
+            typedef wchar_t type;
+        };
+
+        template<>
+        struct stream_char<std::wstring>
+        {
+            typedef wchar_t type;
+        };
+#endif
+
+        // stream wrapper for handling lexical conversions
+        template<typename Target, typename Source, typename Traits>
+        class lexical_stream
+        {
+        private:
+            typedef typename widest_char<
+                typename stream_char<Target>::type,
+                typename stream_char<Source>::type>::type char_type;
+
+            typedef Traits traits_type;
+
+        public:
+            lexical_stream(char_type* = 0, char_type* = 0)
+            {
+                stream.unsetf(std::ios::skipws);
+                lcast_set_precision(stream, static_cast<Source*>(0), static_cast<Target*>(0) );
+            }
+            ~lexical_stream()
+            {
+                #if defined(BOOST_NO_STRINGSTREAM)
+                stream.freeze(false);
+                #endif
+            }
+            bool operator<<(const Source &input)
+            {
+                return !(stream << input).fail();
+            }
+            template<typename InputStreamable>
+            bool operator>>(InputStreamable &output)
+            {
+                return !is_pointer<InputStreamable>::value &&
+                       stream >> output &&
+                       stream.get() ==
+#if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING)
+// GCC 2.9x lacks std::char_traits<>::eof().
+// We use BOOST_NO_STD_WSTRING to filter out STLport and libstdc++-v3
+// configurations, which do provide std::char_traits<>::eof().
+
+                           EOF;
+#else
+                           traits_type::eof();
+#endif
+            }
+
+            bool operator>>(std::string &output)
+            {
+                #if defined(BOOST_NO_STRINGSTREAM)
+                stream << '\0';
+                #endif
+                stream.str().swap(output);
+                return true;
+            }
+            #ifndef BOOST_LCAST_NO_WCHAR_T
+            bool operator>>(std::wstring &output)
+            {
+                stream.str().swap(output);
+                return true;
+            }
+            #endif
+
+        private:
+            #if defined(BOOST_NO_STRINGSTREAM)
+            std::strstream stream;
+            #elif defined(BOOST_NO_STD_LOCALE)
+            std::stringstream stream;
+            #else
+            std::basic_stringstream<char_type,traits_type> stream;
+            #endif
+        };
+    }
+
+    // call-by-value fallback version (deprecated)
+
+    template<typename Target, typename Source>
+    Target lexical_cast(Source arg)
+    {
+        typedef typename detail::widest_char< 
+            BOOST_DEDUCED_TYPENAME detail::stream_char<Target>::type 
+          , BOOST_DEDUCED_TYPENAME detail::stream_char<Source>::type 
+        >::type char_type; 
+
+        typedef std::char_traits<char_type> traits;
+        detail::lexical_stream<Target, Source, traits> interpreter;
+        Target result;
+
+        if(!(interpreter << arg && interpreter >> result))
+          BOOST_LCAST_THROW_BAD_CAST(Source, Target);
+        return result;
+    }
+
+} // namespace ndnboost
+
+#endif
+
+// Copyright Kevlin Henney, 2000-2005.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2013.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#undef BOOST_LCAST_THROW_BAD_CAST
+#undef BOOST_LCAST_NO_WCHAR_T
+#undef BOOST_LCAST_HAS_INT128
+
+#endif // BOOST_LEXICAL_CAST_INCLUDED
+
diff --git a/ndnboost/math/policies/policy.hpp b/ndnboost/math/policies/policy.hpp
new file mode 100644
index 0000000..1a4bb16
--- /dev/null
+++ b/ndnboost/math/policies/policy.hpp
@@ -0,0 +1,992 @@
+//  Copyright John Maddock 2007.
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_POLICY_HPP
+#define BOOST_MATH_POLICY_HPP
+
+#include <ndnboost/mpl/list.hpp>
+#include <ndnboost/mpl/contains.hpp>
+#include <ndnboost/mpl/if.hpp>
+#include <ndnboost/mpl/find_if.hpp>
+#include <ndnboost/mpl/remove_if.hpp>
+#include <ndnboost/mpl/vector.hpp>
+#include <ndnboost/mpl/push_back.hpp>
+#include <ndnboost/mpl/at.hpp>
+#include <ndnboost/mpl/size.hpp>
+#include <ndnboost/mpl/comparison.hpp>
+#include <ndnboost/type_traits/is_same.hpp>
+#include <ndnboost/static_assert.hpp>
+#include <ndnboost/assert.hpp>
+#include <ndnboost/math/tools/config.hpp>
+#include <limits>
+// Sadly we do need the .h versions of these to be sure of getting
+// FLT_MANT_DIG etc.
+#include <limits.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <math.h>
+
+namespace ndnboost{ namespace math{ 
+
+namespace tools{
+
+template <class T>
+int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T));
+template <class T>
+T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T));
+
+}
+
+namespace policies{
+
+//
+// Define macros for our default policies, if they're not defined already:
+//
+#ifndef BOOST_MATH_DOMAIN_ERROR_POLICY
+#define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_POLE_ERROR_POLICY
+#define BOOST_MATH_POLE_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_OVERFLOW_ERROR_POLICY
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_EVALUATION_ERROR_POLICY
+#define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_ROUNDING_ERROR_POLICY
+#define BOOST_MATH_ROUNDING_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_UNDERFLOW_ERROR_POLICY
+#define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error
+#endif
+#ifndef BOOST_MATH_DENORM_ERROR_POLICY
+#define BOOST_MATH_DENORM_ERROR_POLICY ignore_error
+#endif
+#ifndef BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY
+#define BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY ignore_error
+#endif
+#ifndef BOOST_MATH_DIGITS10_POLICY
+#define BOOST_MATH_DIGITS10_POLICY 0
+#endif
+#ifndef BOOST_MATH_PROMOTE_FLOAT_POLICY
+#define BOOST_MATH_PROMOTE_FLOAT_POLICY true
+#endif
+#ifndef BOOST_MATH_PROMOTE_DOUBLE_POLICY
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false
+#else
+#define BOOST_MATH_PROMOTE_DOUBLE_POLICY true
+#endif
+#endif
+#ifndef BOOST_MATH_DISCRETE_QUANTILE_POLICY
+#define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards
+#endif
+#ifndef BOOST_MATH_ASSERT_UNDEFINED_POLICY
+#define BOOST_MATH_ASSERT_UNDEFINED_POLICY true
+#endif
+#ifndef BOOST_MATH_MAX_SERIES_ITERATION_POLICY
+#define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
+#endif
+#ifndef BOOST_MATH_MAX_ROOT_ITERATION_POLICY
+#define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
+#endif
+
+#if !defined(__BORLANDC__) \
+   && !(defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ <= 2))
+#define BOOST_MATH_META_INT(type, name, Default)\
+   template <type N = Default> struct name : public ndnboost::mpl::int_<N>{};\
+   namespace detail{\
+   template <type N>\
+   char test_is_valid_arg(const name<N>*);\
+   char test_is_default_arg(const name<Default>*);\
+   template <class T> struct is_##name##_imp\
+   {\
+      template <type N> static char test(const name<N>*);\
+      static double test(...);\
+      BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast<T*>(0))) == 1);\
+   };\
+   }\
+   template <class T> struct is_##name : public ndnboost::mpl::bool_< ::ndnboost::math::policies::detail::is_##name##_imp<T>::value>{};
+
+#define BOOST_MATH_META_BOOL(name, Default)\
+   template <bool N = Default> struct name : public ndnboost::mpl::bool_<N>{};\
+   namespace detail{\
+   template <bool N>\
+   char test_is_valid_arg(const name<N>*);\
+   char test_is_default_arg(const name<Default>*);\
+   template <class T> struct is_##name##_imp\
+   {\
+      template <bool N> static char test(const name<N>*);\
+      static double test(...);\
+      BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast<T*>(0))) == 1);\
+   };\
+   }\
+   template <class T> struct is_##name : public ndnboost::mpl::bool_< ::ndnboost::math::policies::detail::is_##name##_imp<T>::value>{};
+#else
+#define BOOST_MATH_META_INT(Type, name, Default)\
+   template <Type N = Default> struct name : public ndnboost::mpl::int_<N>{};\
+   namespace detail{\
+   template <Type N>\
+   char test_is_valid_arg(const name<N>*);\
+   char test_is_default_arg(const name<Default>*);\
+   template <class T> struct is_##name##_tester\
+   {\
+      template <Type N> static char test(const name<N>&);\
+      static double test(...);\
+   };\
+   template <class T> struct is_##name##_imp\
+   {\
+      static T inst;\
+      BOOST_STATIC_CONSTANT(bool, value = sizeof( ::ndnboost::math::policies::detail::is_##name##_tester<T>::test(inst)) == 1);\
+   };\
+   }\
+   template <class T> struct is_##name : public ndnboost::mpl::bool_< ::ndnboost::math::policies::detail::is_##name##_imp<T>::value>\
+   {\
+      template <class U> struct apply{ typedef is_##name<U> type; };\
+   };
+
+#define BOOST_MATH_META_BOOL(name, Default)\
+   template <bool N = Default> struct name : public ndnboost::mpl::bool_<N>{};\
+   namespace detail{\
+   template <bool N>\
+   char test_is_valid_arg(const name<N>*);\
+   char test_is_default_arg(const name<Default>*);\
+   template <class T> struct is_##name##_tester\
+   {\
+      template <bool N> static char test(const name<N>&);\
+      static double test(...);\
+   };\
+   template <class T> struct is_##name##_imp\
+   {\
+      static T inst;\
+      BOOST_STATIC_CONSTANT(bool, value = sizeof( ::ndnboost::math::policies::detail::is_##name##_tester<T>::test(inst)) == 1);\
+   };\
+   }\
+   template <class T> struct is_##name : public ndnboost::mpl::bool_< ::ndnboost::math::policies::detail::is_##name##_imp<T>::value>\
+   {\
+      template <class U> struct apply{ typedef is_##name<U> type;  };\
+   };
+#endif
+//
+// Begin by defining policy types for error handling:
+//
+enum error_policy_type
+{
+   throw_on_error = 0,
+   errno_on_error = 1,
+   ignore_error = 2,
+   user_error = 3
+};
+
+BOOST_MATH_META_INT(error_policy_type, domain_error, BOOST_MATH_DOMAIN_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, pole_error, BOOST_MATH_POLE_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, overflow_error, BOOST_MATH_OVERFLOW_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, underflow_error, BOOST_MATH_UNDERFLOW_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, denorm_error, BOOST_MATH_DENORM_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, evaluation_error, BOOST_MATH_EVALUATION_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, rounding_error, BOOST_MATH_ROUNDING_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, indeterminate_result_error, BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY)
+
+//
+// Policy types for internal promotion:
+//
+BOOST_MATH_META_BOOL(promote_float, BOOST_MATH_PROMOTE_FLOAT_POLICY)
+BOOST_MATH_META_BOOL(promote_double, BOOST_MATH_PROMOTE_DOUBLE_POLICY)
+BOOST_MATH_META_BOOL(assert_undefined, BOOST_MATH_ASSERT_UNDEFINED_POLICY)
+//
+// Policy types for discrete quantiles:
+//
+enum discrete_quantile_policy_type
+{
+   real,
+   integer_round_outwards,
+   integer_round_inwards,
+   integer_round_down,
+   integer_round_up,
+   integer_round_nearest
+};
+
+BOOST_MATH_META_INT(discrete_quantile_policy_type, discrete_quantile, BOOST_MATH_DISCRETE_QUANTILE_POLICY)
+//
+// Precision:
+//
+BOOST_MATH_META_INT(int, digits10, BOOST_MATH_DIGITS10_POLICY)
+BOOST_MATH_META_INT(int, digits2, 0)
+//
+// Iterations:
+//
+BOOST_MATH_META_INT(unsigned long, max_series_iterations, BOOST_MATH_MAX_SERIES_ITERATION_POLICY)
+BOOST_MATH_META_INT(unsigned long, max_root_iterations, BOOST_MATH_MAX_ROOT_ITERATION_POLICY)
+//
+// Define the names for each possible policy:
+//
+#define BOOST_MATH_PARAMETER(name)\
+   BOOST_PARAMETER_TEMPLATE_KEYWORD(name##_name)\
+   BOOST_PARAMETER_NAME(name##_name)
+
+struct default_policy{};
+
+namespace detail{
+//
+// Trait to work out bits precision from digits10 and digits2:
+//
+template <class Digits10, class Digits2>
+struct precision
+{
+   //
+   // Now work out the precision:
+   //
+   typedef typename mpl::if_c<
+      (Digits10::value == 0),
+      digits2<0>,
+      digits2<((Digits10::value + 1) * 1000L) / 301L>
+   >::type digits2_type;
+public:
+#ifdef __BORLANDC__
+   typedef typename mpl::if_c<
+      (Digits2::value > ::ndnboost::math::policies::detail::precision<Digits10,Digits2>::digits2_type::value),
+      Digits2, digits2_type>::type type;
+#else
+   typedef typename mpl::if_c<
+      (Digits2::value > digits2_type::value),
+      Digits2, digits2_type>::type type;
+#endif
+};
+
+template <class A, class B, bool b>
+struct select_result
+{
+   typedef A type;
+};
+template <class A, class B>
+struct select_result<A, B, false>
+{
+   typedef typename mpl::deref<B>::type type;
+};
+
+template <class Seq, class Pred, class DefaultType>
+struct find_arg
+{
+private:
+   typedef typename mpl::find_if<Seq, Pred>::type iter;
+   typedef typename mpl::end<Seq>::type end_type;
+public:
+   typedef typename select_result<
+      DefaultType, iter,
+      ::ndnboost::is_same<iter, end_type>::value>::type type;
+};
+
+double test_is_valid_arg(...);
+double test_is_default_arg(...);
+char test_is_valid_arg(const default_policy*);
+char test_is_default_arg(const default_policy*);
+
+template <class T>
+struct is_valid_policy_imp 
+{
+   BOOST_STATIC_CONSTANT(bool, value = sizeof(::ndnboost::math::policies::detail::test_is_valid_arg(static_cast<T*>(0))) == 1);
+};
+
+template <class T>
+struct is_default_policy_imp
+{
+   BOOST_STATIC_CONSTANT(bool, value = sizeof(::ndnboost::math::policies::detail::test_is_default_arg(static_cast<T*>(0))) == 1);
+};
+
+template <class T> struct is_valid_policy 
+: public mpl::bool_< 
+   ::ndnboost::math::policies::detail::is_valid_policy_imp<T>::value>
+{};
+
+template <class T> struct is_default_policy 
+: public mpl::bool_< 
+   ::ndnboost::math::policies::detail::is_default_policy_imp<T>::value>
+{
+   template <class U>
+   struct apply
+   {
+      typedef is_default_policy<U> type;
+   };
+};
+
+template <class Seq, class T, int N>
+struct append_N
+{
+   typedef typename mpl::push_back<Seq, T>::type new_seq;
+   typedef typename append_N<new_seq, T, N-1>::type type;
+};
+
+template <class Seq, class T>
+struct append_N<Seq, T, 0>
+{
+   typedef Seq type;
+};
+
+//
+// Traits class to work out what template parameters our default
+// policy<> class will have when modified for forwarding:
+//
+template <bool f, bool d>
+struct default_args
+{
+   typedef promote_float<false> arg1;
+   typedef promote_double<false> arg2;
+};
+
+template <>
+struct default_args<false, false>
+{
+   typedef default_policy arg1;
+   typedef default_policy arg2;
+};
+
+template <>
+struct default_args<true, false>
+{
+   typedef promote_float<false> arg1;
+   typedef default_policy arg2;
+};
+
+template <>
+struct default_args<false, true>
+{
+   typedef promote_double<false> arg1;
+   typedef default_policy arg2;
+};
+
+typedef default_args<BOOST_MATH_PROMOTE_FLOAT_POLICY, BOOST_MATH_PROMOTE_DOUBLE_POLICY>::arg1 forwarding_arg1;
+typedef default_args<BOOST_MATH_PROMOTE_FLOAT_POLICY, BOOST_MATH_PROMOTE_DOUBLE_POLICY>::arg2 forwarding_arg2;
+
+} // detail
+//
+// Now define the policy type with enough arguments to handle all
+// the policies:
+//
+template <class A1 = default_policy, 
+          class A2 = default_policy, 
+          class A3 = default_policy,
+          class A4 = default_policy,
+          class A5 = default_policy,
+          class A6 = default_policy,
+          class A7 = default_policy,
+          class A8 = default_policy,
+          class A9 = default_policy,
+          class A10 = default_policy,
+          class A11 = default_policy,
+          class A12 = default_policy,
+          class A13 = default_policy>
+struct policy
+{
+private:
+   //
+   // Validate all our arguments:
+   //
+   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A1>::value);
+   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A2>::value);
+   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A3>::value);
+   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A4>::value);
+   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A5>::value);
+   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A6>::value);
+   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A7>::value);
+   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A8>::value);
+   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A9>::value);
+   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A10>::value);
+   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A11>::value);
+   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A12>::value);
+   BOOST_STATIC_ASSERT(::ndnboost::math::policies::detail::is_valid_policy<A13>::value);
+   //
+   // Typelist of the arguments:
+   //
+   typedef mpl::list<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13> arg_list;
+
+public:
+   typedef typename detail::find_arg<arg_list, is_domain_error<mpl::_1>, domain_error<> >::type domain_error_type;
+   typedef typename detail::find_arg<arg_list, is_pole_error<mpl::_1>, pole_error<> >::type pole_error_type;
+   typedef typename detail::find_arg<arg_list, is_overflow_error<mpl::_1>, overflow_error<> >::type overflow_error_type;
+   typedef typename detail::find_arg<arg_list, is_underflow_error<mpl::_1>, underflow_error<> >::type underflow_error_type;
+   typedef typename detail::find_arg<arg_list, is_denorm_error<mpl::_1>, denorm_error<> >::type denorm_error_type;
+   typedef typename detail::find_arg<arg_list, is_evaluation_error<mpl::_1>, evaluation_error<> >::type evaluation_error_type;
+   typedef typename detail::find_arg<arg_list, is_rounding_error<mpl::_1>, rounding_error<> >::type rounding_error_type;
+   typedef typename detail::find_arg<arg_list, is_indeterminate_result_error<mpl::_1>, indeterminate_result_error<> >::type indeterminate_result_error_type;
+private:
+   //
+   // Now work out the precision:
+   //
+   typedef typename detail::find_arg<arg_list, is_digits10<mpl::_1>, digits10<> >::type digits10_type;
+   typedef typename detail::find_arg<arg_list, is_digits2<mpl::_1>, digits2<> >::type bits_precision_type;
+public:
+   typedef typename detail::precision<digits10_type, bits_precision_type>::type precision_type;
+   //
+   // Internal promotion:
+   //
+   typedef typename detail::find_arg<arg_list, is_promote_float<mpl::_1>, promote_float<> >::type promote_float_type;
+   typedef typename detail::find_arg<arg_list, is_promote_double<mpl::_1>, promote_double<> >::type promote_double_type;
+   //
+   // Discrete quantiles:
+   //
+   typedef typename detail::find_arg<arg_list, is_discrete_quantile<mpl::_1>, discrete_quantile<> >::type discrete_quantile_type;
+   //
+   // Mathematically undefined properties:
+   //
+   typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, assert_undefined<> >::type assert_undefined_type;
+   //
+   // Max iterations:
+   //
+   typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, max_series_iterations<> >::type max_series_iterations_type;
+   typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, max_root_iterations<> >::type max_root_iterations_type;
+};
+//
+// These full specializations are defined to reduce the amount of
+// template instantiations that have to take place when using the default
+// policies, they have quite a large impact on compile times:
+//
+template <>
+struct policy<default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>
+{
+public:
+   typedef domain_error<> domain_error_type;
+   typedef pole_error<> pole_error_type;
+   typedef overflow_error<> overflow_error_type;
+   typedef underflow_error<> underflow_error_type;
+   typedef denorm_error<> denorm_error_type;
+   typedef evaluation_error<> evaluation_error_type;
+   typedef rounding_error<> rounding_error_type;
+   typedef indeterminate_result_error<> indeterminate_result_error_type;
+#if BOOST_MATH_DIGITS10_POLICY == 0
+   typedef digits2<> precision_type;
+#else
+   typedef detail::precision<digits10<>, digits2<> >::type precision_type;
+#endif
+   typedef promote_float<> promote_float_type;
+   typedef promote_double<> promote_double_type;
+   typedef discrete_quantile<> discrete_quantile_type;
+   typedef assert_undefined<> assert_undefined_type;
+   typedef max_series_iterations<> max_series_iterations_type;
+   typedef max_root_iterations<> max_root_iterations_type;
+};
+
+template <>
+struct policy<detail::forwarding_arg1, detail::forwarding_arg2, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>
+{
+public:
+   typedef domain_error<> domain_error_type;
+   typedef pole_error<> pole_error_type;
+   typedef overflow_error<> overflow_error_type;
+   typedef underflow_error<> underflow_error_type;
+   typedef denorm_error<> denorm_error_type;
+   typedef evaluation_error<> evaluation_error_type;
+   typedef rounding_error<> rounding_error_type;
+   typedef indeterminate_result_error<> indeterminate_result_error_type;
+#if BOOST_MATH_DIGITS10_POLICY == 0
+   typedef digits2<> precision_type;
+#else
+   typedef detail::precision<digits10<>, digits2<> >::type precision_type;
+#endif
+   typedef promote_float<false> promote_float_type;
+   typedef promote_double<false> promote_double_type;
+   typedef discrete_quantile<> discrete_quantile_type;
+   typedef assert_undefined<> assert_undefined_type;
+   typedef max_series_iterations<> max_series_iterations_type;
+   typedef max_root_iterations<> max_root_iterations_type;
+};
+
+template <class Policy, 
+          class A1 = default_policy, 
+          class A2 = default_policy, 
+          class A3 = default_policy,
+          class A4 = default_policy,
+          class A5 = default_policy,
+          class A6 = default_policy,
+          class A7 = default_policy,
+          class A8 = default_policy,
+          class A9 = default_policy,
+          class A10 = default_policy,
+          class A11 = default_policy,
+          class A12 = default_policy,
+          class A13 = default_policy>
+struct normalise
+{
+private:
+   typedef mpl::list<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13> arg_list;
+   typedef typename detail::find_arg<arg_list, is_domain_error<mpl::_1>, typename Policy::domain_error_type >::type domain_error_type;
+   typedef typename detail::find_arg<arg_list, is_pole_error<mpl::_1>, typename Policy::pole_error_type >::type pole_error_type;
+   typedef typename detail::find_arg<arg_list, is_overflow_error<mpl::_1>, typename Policy::overflow_error_type >::type overflow_error_type;
+   typedef typename detail::find_arg<arg_list, is_underflow_error<mpl::_1>, typename Policy::underflow_error_type >::type underflow_error_type;
+   typedef typename detail::find_arg<arg_list, is_denorm_error<mpl::_1>, typename Policy::denorm_error_type >::type denorm_error_type;
+   typedef typename detail::find_arg<arg_list, is_evaluation_error<mpl::_1>, typename Policy::evaluation_error_type >::type evaluation_error_type;
+   typedef typename detail::find_arg<arg_list, is_rounding_error<mpl::_1>, typename Policy::rounding_error_type >::type rounding_error_type;
+   typedef typename detail::find_arg<arg_list, is_indeterminate_result_error<mpl::_1>, typename Policy::indeterminate_result_error_type >::type indeterminate_result_error_type;
+   //
+   // Now work out the precision:
+   //
+   typedef typename detail::find_arg<arg_list, is_digits10<mpl::_1>, digits10<> >::type digits10_type;
+   typedef typename detail::find_arg<arg_list, is_digits2<mpl::_1>, typename Policy::precision_type >::type bits_precision_type;
+   typedef typename detail::precision<digits10_type, bits_precision_type>::type precision_type;
+   //
+   // Internal promotion:
+   //
+   typedef typename detail::find_arg<arg_list, is_promote_float<mpl::_1>, typename Policy::promote_float_type >::type promote_float_type;
+   typedef typename detail::find_arg<arg_list, is_promote_double<mpl::_1>, typename Policy::promote_double_type >::type promote_double_type;
+   //
+   // Discrete quantiles:
+   //
+   typedef typename detail::find_arg<arg_list, is_discrete_quantile<mpl::_1>, typename Policy::discrete_quantile_type >::type discrete_quantile_type;
+   //
+   // Mathematically undefined properties:
+   //
+   typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, typename Policy::assert_undefined_type >::type assert_undefined_type;
+   //
+   // Max iterations:
+   //
+   typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, typename Policy::max_series_iterations_type>::type max_series_iterations_type;
+   typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, typename Policy::max_root_iterations_type>::type max_root_iterations_type;
+   //
+   // Define a typelist of the policies:
+   //
+   typedef mpl::vector<
+      domain_error_type,
+      pole_error_type,
+      overflow_error_type,
+      underflow_error_type,
+      denorm_error_type,
+      evaluation_error_type,
+      rounding_error_type,
+      indeterminate_result_error_type,
+      precision_type,
+      promote_float_type,
+      promote_double_type,
+      discrete_quantile_type,
+      assert_undefined_type,
+      max_series_iterations_type,
+      max_root_iterations_type> result_list;
+   //
+   // Remove all the policies that are the same as the default:
+   //
+   typedef typename mpl::remove_if<result_list, detail::is_default_policy<mpl::_> >::type reduced_list;
+   //
+   // Pad out the list with defaults:
+   //
+   typedef typename detail::append_N<reduced_list, default_policy, (14 - ::ndnboost::mpl::size<reduced_list>::value)>::type result_type;
+public:
+   typedef policy<
+      typename mpl::at<result_type, mpl::int_<0> >::type,
+      typename mpl::at<result_type, mpl::int_<1> >::type,
+      typename mpl::at<result_type, mpl::int_<2> >::type,
+      typename mpl::at<result_type, mpl::int_<3> >::type,
+      typename mpl::at<result_type, mpl::int_<4> >::type,
+      typename mpl::at<result_type, mpl::int_<5> >::type,
+      typename mpl::at<result_type, mpl::int_<6> >::type,
+      typename mpl::at<result_type, mpl::int_<7> >::type,
+      typename mpl::at<result_type, mpl::int_<8> >::type,
+      typename mpl::at<result_type, mpl::int_<9> >::type,
+      typename mpl::at<result_type, mpl::int_<10> >::type,
+      typename mpl::at<result_type, mpl::int_<11> >::type,
+      typename mpl::at<result_type, mpl::int_<12> >::type > type;
+};
+//
+// Full specialisation to speed up compilation of the common case:
+//
+template <>
+struct normalise<policy<>, 
+          promote_float<false>, 
+          promote_double<false>, 
+          discrete_quantile<>,
+          assert_undefined<>,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy>
+{
+   typedef policy<detail::forwarding_arg1, detail::forwarding_arg2> type;
+};
+
+template <>
+struct normalise<policy<detail::forwarding_arg1, detail::forwarding_arg2>,
+          promote_float<false>,
+          promote_double<false>,
+          discrete_quantile<>,
+          assert_undefined<>,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy>
+{
+   typedef policy<detail::forwarding_arg1, detail::forwarding_arg2> type;
+};
+
+inline policy<> make_policy()
+{ return policy<>(); }
+
+template <class A1>
+inline typename normalise<policy<>, A1>::type make_policy(const A1&)
+{ 
+   typedef typename normalise<policy<>, A1>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2>
+inline typename normalise<policy<>, A1, A2>::type make_policy(const A1&, const A2&)
+{ 
+   typedef typename normalise<policy<>, A1, A2>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3>
+inline typename normalise<policy<>, A1, A2, A3>::type make_policy(const A1&, const A2&, const A3&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4>
+inline typename normalise<policy<>, A1, A2, A3, A4>::type make_policy(const A1&, const A2&, const A3&, const A4&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&, const A11&)
+{
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type result_type;
+   return result_type();
+}
+
+//
+// Traits class to handle internal promotion:
+//
+template <class Real, class Policy>
+struct evaluation
+{
+   typedef Real type;
+};
+
+template <class Policy>
+struct evaluation<float, Policy>
+{
+   typedef typename mpl::if_<typename Policy::promote_float_type, double, float>::type type;
+};
+
+template <class Policy>
+struct evaluation<double, Policy>
+{
+   typedef typename mpl::if_<typename Policy::promote_double_type, long double, double>::type type;
+};
+
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+
+template <class Real>
+struct basic_digits : public mpl::int_<0>{ };
+template <>
+struct basic_digits<float> : public mpl::int_<FLT_MANT_DIG>{ };
+template <>
+struct basic_digits<double> : public mpl::int_<DBL_MANT_DIG>{ };
+template <>
+struct basic_digits<long double> : public mpl::int_<LDBL_MANT_DIG>{ };
+
+template <class Real, class Policy>
+struct precision
+{
+   BOOST_STATIC_ASSERT( ::std::numeric_limits<Real>::radix == 2);
+   typedef typename Policy::precision_type precision_type;
+   typedef basic_digits<Real> digits_t;
+   typedef typename mpl::if_<
+      mpl::equal_to<digits_t, mpl::int_<0> >,
+      // Possibly unknown precision:
+      precision_type,
+      typename mpl::if_<
+         mpl::or_<mpl::less_equal<digits_t, precision_type>, mpl::less_equal<precision_type, mpl::int_<0> > >,
+         // Default case, full precision for RealType:
+         digits2< ::std::numeric_limits<Real>::digits>,
+         // User customised precision:
+         precision_type
+      >::type
+   >::type type;
+};
+
+template <class Policy>
+struct precision<float, Policy>
+{
+   typedef digits2<FLT_MANT_DIG> type;
+};
+template <class Policy>
+struct precision<double, Policy>
+{
+   typedef digits2<DBL_MANT_DIG> type;
+};
+template <class Policy>
+struct precision<long double, Policy>
+{
+   typedef digits2<LDBL_MANT_DIG> type;
+};
+
+#else
+
+template <class Real, class Policy>
+struct precision
+{
+   BOOST_STATIC_ASSERT((::std::numeric_limits<Real>::radix == 2) || ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0)));
+#ifndef __BORLANDC__
+   typedef typename Policy::precision_type precision_type;
+   typedef typename mpl::if_c<
+      ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0)),
+      // Possibly unknown precision:
+      precision_type,
+      typename mpl::if_c<
+         ((::std::numeric_limits<Real>::digits <= precision_type::value) 
+         || (Policy::precision_type::value <= 0)),
+         // Default case, full precision for RealType:
+         digits2< ::std::numeric_limits<Real>::digits>,
+         // User customised precision:
+         precision_type
+      >::type
+   >::type type;
+#else
+   typedef typename Policy::precision_type precision_type;
+   typedef mpl::int_< ::std::numeric_limits<Real>::digits> digits_t;
+   typedef mpl::bool_< ::std::numeric_limits<Real>::is_specialized> spec_t;
+   typedef typename mpl::if_<
+      mpl::or_<mpl::equal_to<spec_t, mpl::false_>, mpl::equal_to<digits_t, mpl::int_<0> > >,
+      // Possibly unknown precision:
+      precision_type,
+      typename mpl::if_<
+         mpl::or_<mpl::less_equal<digits_t, precision_type>, mpl::less_equal<precision_type, mpl::int_<0> > >,
+         // Default case, full precision for RealType:
+         digits2< ::std::numeric_limits<Real>::digits>,
+         // User customised precision:
+         precision_type
+      >::type
+   >::type type;
+#endif
+};
+
+#endif
+
+#ifdef BOOST_MATH_USE_FLOAT128
+
+template <class Policy>
+struct precision<__float128, Policy>
+{
+   typedef mpl::int_<113> type;
+};
+
+#endif
+
+namespace detail{
+
+template <class T, class Policy>
+inline int digits_imp(mpl::true_ const&)
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+#else
+   BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+#endif
+   typedef typename ndnboost::math::policies::precision<T, Policy>::type p_t;
+   return p_t::value;
+}
+
+template <class T, class Policy>
+inline int digits_imp(mpl::false_ const&)
+{
+   return tools::digits<T>();
+}
+
+} // namespace detail
+
+template <class T, class Policy>
+inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
+{
+   typedef mpl::bool_< std::numeric_limits<T>::is_specialized > tag_type;
+   return detail::digits_imp<T, Policy>(tag_type());
+}
+
+template <class Policy>
+inline unsigned long get_max_series_iterations()
+{
+   typedef typename Policy::max_series_iterations_type iter_type;
+   return iter_type::value;
+}
+
+template <class Policy>
+inline unsigned long get_max_root_iterations()
+{
+   typedef typename Policy::max_root_iterations_type iter_type;
+   return iter_type::value;
+}
+
+namespace detail{
+
+template <class T, class Digits, class Small, class Default>
+struct series_factor_calc
+{
+   static T get()
+   {
+      return ldexp(T(1.0), 1 - Digits::value);
+   }
+};
+
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::true_, mpl::true_>
+{
+   static T get()
+   {
+      return ndnboost::math::tools::epsilon<T>();
+   }
+};
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::true_, mpl::false_>
+{
+   static T get()
+   {
+      static const ndnboost::uintmax_t v = static_cast<ndnboost::uintmax_t>(1u) << (Digits::value - 1);
+      return 1 / static_cast<T>(v);
+   }
+};
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::false_, mpl::true_>
+{
+   static T get()
+   {
+      return ndnboost::math::tools::epsilon<T>();
+   }
+};
+
+template <class T, class Policy>
+inline T get_epsilon_imp(mpl::true_ const&)
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+   BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::radix == 2);
+#else
+   BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+   BOOST_ASSERT(::std::numeric_limits<T>::radix == 2);
+#endif
+   typedef typename ndnboost::math::policies::precision<T, Policy>::type p_t;
+   typedef mpl::bool_<p_t::value <= std::numeric_limits<ndnboost::uintmax_t>::digits> is_small_int;
+   typedef mpl::bool_<p_t::value >= std::numeric_limits<T>::digits> is_default_value;
+   return series_factor_calc<T, p_t, is_small_int, is_default_value>::get();
+}
+
+template <class T, class Policy>
+inline T get_epsilon_imp(mpl::false_ const&)
+{
+   return tools::epsilon<T>();
+}
+
+} // namespace detail
+
+template <class T, class Policy>
+inline T get_epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
+{
+   typedef mpl::bool_< (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::radix == 2)) > tag_type;
+   return detail::get_epsilon_imp<T, Policy>(tag_type());
+}
+
+namespace detail{
+
+template <class A1, 
+          class A2, 
+          class A3,
+          class A4,
+          class A5,
+          class A6,
+          class A7,
+          class A8,
+          class A9,
+          class A10,
+          class A11>
+char test_is_policy(const policy<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11>*);
+double test_is_policy(...);
+
+template <class P>
+struct is_policy_imp
+{
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(::ndnboost::math::policies::detail::test_is_policy(static_cast<P*>(0))) == 1));
+};
+
+}
+
+template <class P>
+struct is_policy : public mpl::bool_< ::ndnboost::math::policies::detail::is_policy_imp<P>::value> {};
+
+//
+// Helper traits class for distribution error handling:
+//
+template <class Policy>
+struct constructor_error_check
+{
+   typedef typename Policy::domain_error_type domain_error_type;
+   typedef typename mpl::if_c<
+      (domain_error_type::value == throw_on_error) || (domain_error_type::value == user_error),
+      mpl::true_,
+      mpl::false_>::type type;
+};
+
+template <class Policy>
+struct method_error_check
+{
+   typedef typename Policy::domain_error_type domain_error_type;
+   typedef typename mpl::if_c<
+      (domain_error_type::value == throw_on_error) && (domain_error_type::value != user_error),
+      mpl::false_,
+      mpl::true_>::type type;
+};
+
+}}} // namespaces
+
+#endif // BOOST_MATH_POLICY_HPP
+
+
+
diff --git a/ndnboost/math/special_functions/detail/fp_traits.hpp b/ndnboost/math/special_functions/detail/fp_traits.hpp
new file mode 100644
index 0000000..e1c8d78
--- /dev/null
+++ b/ndnboost/math/special_functions/detail/fp_traits.hpp
@@ -0,0 +1,570 @@
+// fp_traits.hpp
+
+#ifndef BOOST_MATH_FP_TRAITS_HPP
+#define BOOST_MATH_FP_TRAITS_HPP
+
+// Copyright (c) 2006 Johan Rade
+
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+/*
+To support old compilers, care has been taken to avoid partial template
+specialization and meta function forwarding.
+With these techniques, the code could be simplified.
+*/
+
+#if defined(__vms) && defined(__DECCXX) && !__IEEE_FLOAT
+// The VAX floating point formats are used (for float and double)
+#   define BOOST_FPCLASSIFY_VAX_FORMAT
+#endif
+
+#include <cstring>
+
+#include <ndnboost/assert.hpp>
+#include <ndnboost/cstdint.hpp>
+#include <ndnboost/detail/endian.hpp>
+#include <ndnboost/static_assert.hpp>
+#include <ndnboost/type_traits/is_floating_point.hpp>
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+  namespace std{ using ::memcpy; }
+#endif
+
+#ifndef FP_NORMAL
+
+#define FP_ZERO        0
+#define FP_NORMAL      1
+#define FP_INFINITE    2
+#define FP_NAN         3
+#define FP_SUBNORMAL   4
+
+#else
+
+#define BOOST_HAS_FPCLASSIFY
+
+#ifndef fpclassify
+#  if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
+         && defined(_GLIBCXX_USE_C99_MATH) \
+         && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) \
+         && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0))
+#     ifdef _STLP_VENDOR_CSTD
+#        if _STLPORT_VERSION >= 0x520
+#           define BOOST_FPCLASSIFY_PREFIX ::__std_alias:: 
+#        else
+#           define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD:: 
+#        endif
+#     else
+#        define BOOST_FPCLASSIFY_PREFIX ::std::
+#     endif
+#  else
+#     undef BOOST_HAS_FPCLASSIFY
+#     define BOOST_FPCLASSIFY_PREFIX
+#  endif
+#elif (defined(__HP_aCC) && !defined(__hppa))
+// aCC 6 appears to do "#define fpclassify fpclassify" which messes us up a bit!
+#  define BOOST_FPCLASSIFY_PREFIX ::
+#else
+#  define BOOST_FPCLASSIFY_PREFIX
+#endif
+
+#ifdef __MINGW32__
+#  undef BOOST_HAS_FPCLASSIFY
+#endif
+
+#endif
+
+
+//------------------------------------------------------------------------------
+
+namespace ndnboost {
+namespace math {
+namespace detail {
+
+//------------------------------------------------------------------------------
+
+/* 
+The following classes are used to tag the different methods that are used
+for floating point classification
+*/
+
+struct native_tag {};
+template <bool has_limits>
+struct generic_tag {};
+struct ieee_tag {};
+struct ieee_copy_all_bits_tag : public ieee_tag {};
+struct ieee_copy_leading_bits_tag : public ieee_tag {};
+
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+//
+// These helper functions are used only when numeric_limits<>
+// members are not compile time constants:
+//
+inline bool is_generic_tag_false(const generic_tag<false>*)
+{
+   return true;
+}
+inline bool is_generic_tag_false(const void*)
+{
+   return false;
+}
+#endif
+
+//------------------------------------------------------------------------------
+
+/*
+Most processors support three different floating point precisions:
+single precision (32 bits), double precision (64 bits)
+and extended double precision (80 - 128 bits, depending on the processor)
+
+Note that the C++ type long double can be implemented
+both as double precision and extended double precision.
+*/
+
+struct unknown_precision{};
+struct single_precision {};
+struct double_precision {};
+struct extended_double_precision {};
+
+// native_tag version --------------------------------------------------------------
+
+template<class T> struct fp_traits_native
+{
+    typedef native_tag method;
+};
+
+// generic_tag version -------------------------------------------------------------
+
+template<class T, class U> struct fp_traits_non_native
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   typedef generic_tag<std::numeric_limits<T>::is_specialized> method;
+#else
+   typedef generic_tag<false> method;
+#endif
+};
+
+// ieee_tag versions ---------------------------------------------------------------
+
+/*
+These specializations of fp_traits_non_native contain information needed
+to "parse" the binary representation of a floating point number.
+
+Typedef members:
+
+  bits -- the target type when copying the leading bytes of a floating
+      point number. It is a typedef for uint32_t or uint64_t.
+
+  method -- tells us whether all bytes are copied or not.
+      It is a typedef for ieee_copy_all_bits_tag or ieee_copy_leading_bits_tag.
+
+Static data members:
+
+  sign, exponent, flag, significand -- bit masks that give the meaning of the
+  bits in the leading bytes.
+
+Static function members:
+
+  get_bits(), set_bits() -- provide access to the leading bytes.
+
+*/
+
+// ieee_tag version, float (32 bits) -----------------------------------------------
+
+#ifndef BOOST_FPCLASSIFY_VAX_FORMAT
+
+template<> struct fp_traits_non_native<float, single_precision>
+{
+    typedef ieee_copy_all_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7f800000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x007fffff);
+
+    typedef uint32_t bits;
+    static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); }
+    static void set_bits(float& x, uint32_t a) { std::memcpy(&x, &a, 4); }
+};
+
+// ieee_tag version, double (64 bits) ----------------------------------------------
+
+#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) \
+   || defined(__BORLANDC__) || defined(__CODEGEAR__)
+
+template<> struct fp_traits_non_native<double, double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+    }
+
+    static void set_bits(double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+    }
+
+private:
+
+#if defined(BOOST_BIG_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(BOOST_LITTLE_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 4);
+#else
+    BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+//..............................................................................
+
+#else
+
+template<> struct fp_traits_non_native<double, double_precision>
+{
+    typedef ieee_copy_all_bits_tag method;
+
+    static const uint64_t sign     = ((uint64_t)0x80000000u) << 32;
+    static const uint64_t exponent = ((uint64_t)0x7ff00000) << 32;
+    static const uint64_t flag     = 0;
+    static const uint64_t significand
+        = (((uint64_t)0x000fffff) << 32) + ((uint64_t)0xffffffffu);
+
+    typedef uint64_t bits;
+    static void get_bits(double x, uint64_t& a) { std::memcpy(&a, &x, 8); }
+    static void set_bits(double& x, uint64_t a) { std::memcpy(&x, &a, 8); }
+};
+
+#endif
+
+#endif  // #ifndef BOOST_FPCLASSIFY_VAX_FORMAT
+
+// long double (64 bits) -------------------------------------------------------
+
+#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)\
+   || defined(__BORLANDC__) || defined(__CODEGEAR__)
+
+template<> struct fp_traits_non_native<long double, double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+    }
+
+private:
+
+#if defined(BOOST_BIG_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(BOOST_LITTLE_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 4);
+#else
+    BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+//..............................................................................
+
+#else
+
+template<> struct fp_traits_non_native<long double, double_precision>
+{
+    typedef ieee_copy_all_bits_tag method;
+
+    static const uint64_t sign     = (uint64_t)0x80000000u << 32;
+    static const uint64_t exponent = (uint64_t)0x7ff00000 << 32;
+    static const uint64_t flag     = 0;
+    static const uint64_t significand
+        = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffffu;
+
+    typedef uint64_t bits;
+    static void get_bits(long double x, uint64_t& a) { std::memcpy(&a, &x, 8); }
+    static void set_bits(long double& x, uint64_t a) { std::memcpy(&x, &a, 8); }
+};
+
+#endif
+
+
+// long double (>64 bits), x86 and x64 -----------------------------------------
+
+#if defined(__i386) || defined(__i386__) || defined(_M_IX86) \
+    || defined(__amd64) || defined(__amd64__)  || defined(_M_AMD64) \
+    || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64)
+
+// Intel extended double precision format (80 bits)
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00008000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + 6, 4);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + 6, &a, 4);
+    }
+};
+
+
+// long double (>64 bits), Itanium ---------------------------------------------
+
+#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
+
+// The floating point format is unknown at compile time
+// No template specialization is provided.
+// The generic_tag definition is used.
+
+// The Itanium supports both
+// the Intel extended double precision format (80 bits) and
+// the IEEE extended double precision format with 15 exponent bits (128 bits).
+
+
+// long double (>64 bits), PowerPC ---------------------------------------------
+
+#elif defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) \
+    || defined(__ppc) || defined(__ppc__) || defined(__PPC__)
+
+// PowerPC extended double precision format (128 bits)
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+    }
+
+private:
+
+#if defined(BOOST_BIG_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(BOOST_LITTLE_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 12);
+#else
+    BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+
+// long double (>64 bits), Motorola 68K ----------------------------------------
+
+#elif defined(__m68k) || defined(__m68k__) \
+    || defined(__mc68000) || defined(__mc68000__) \
+
+// Motorola extended double precision format (96 bits)
+
+// It is the same format as the Intel extended double precision format,
+// except that 1) it is big-endian, 2) the 3rd and 4th byte are padding, and
+// 3) the flag bit is not set for infinity
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00008000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
+
+    // copy 1st, 2nd, 5th and 6th byte. 3rd and 4th byte are padding.
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, &x, 2);
+        std::memcpy(reinterpret_cast<unsigned char*>(&a) + 2,
+               reinterpret_cast<const unsigned char*>(&x) + 4, 2);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(&x, &a, 2);
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + 4,
+               reinterpret_cast<const unsigned char*>(&a) + 2, 2);
+    }
+};
+
+
+// long double (>64 bits), All other processors --------------------------------
+
+#else
+
+// IEEE extended double precision format with 15 exponent bits (128 bits)
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x0000ffff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+    }
+
+private:
+
+#if defined(BOOST_BIG_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(BOOST_LITTLE_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 12);
+#else
+    BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+#endif
+
+//------------------------------------------------------------------------------
+
+// size_to_precision is a type switch for converting a C++ floating point type
+// to the corresponding precision type.
+
+template<int n, bool fp> struct size_to_precision
+{
+   typedef unknown_precision type;
+};
+
+template<> struct size_to_precision<4, true>
+{
+    typedef single_precision type;
+};
+
+template<> struct size_to_precision<8, true>
+{
+    typedef double_precision type;
+};
+
+template<> struct size_to_precision<10, true>
+{
+    typedef extended_double_precision type;
+};
+
+template<> struct size_to_precision<12, true>
+{
+    typedef extended_double_precision type;
+};
+
+template<> struct size_to_precision<16, true>
+{
+    typedef extended_double_precision type;
+};
+
+//------------------------------------------------------------------------------
+//
+// Figure out whether to use native classification functions based on
+// whether T is a built in floating point type or not:
+//
+template <class T>
+struct select_native
+{
+    typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::ndnboost::is_floating_point<T>::value>::type precision;
+    typedef fp_traits_non_native<T, precision> type;
+};
+template<>
+struct select_native<float>
+{
+    typedef fp_traits_native<float> type;
+};
+template<>
+struct select_native<double>
+{
+    typedef fp_traits_native<double> type;
+};
+template<>
+struct select_native<long double>
+{
+    typedef fp_traits_native<long double> type;
+};
+
+//------------------------------------------------------------------------------
+
+// fp_traits is a type switch that selects the right fp_traits_non_native
+
+#if (defined(BOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \
+   && !defined(__hpux) \
+   && !defined(__DECCXX)\
+   && !defined(__osf__) \
+   && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\
+   && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
+#  define BOOST_MATH_USE_STD_FPCLASSIFY
+#endif
+
+template<class T> struct fp_traits
+{
+    typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::ndnboost::is_floating_point<T>::value>::type precision;
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
+    typedef typename select_native<T>::type type;
+#else
+    typedef fp_traits_non_native<T, precision> type;
+#endif
+    typedef fp_traits_non_native<T, precision> sign_change_type;
+};
+
+//------------------------------------------------------------------------------
+
+}   // namespace detail
+}   // namespace math
+}   // namespace ndnboost
+
+#endif
diff --git a/ndnboost/math/special_functions/detail/round_fwd.hpp b/ndnboost/math/special_functions/detail/round_fwd.hpp
new file mode 100644
index 0000000..62d9390
--- /dev/null
+++ b/ndnboost/math/special_functions/detail/round_fwd.hpp
@@ -0,0 +1,93 @@
+// Copyright John Maddock 2008.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_SPECIAL_ROUND_FWD_HPP
+#define BOOST_MATH_SPECIAL_ROUND_FWD_HPP
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/math/tools/promotion.hpp>
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+namespace ndnboost
+{
+   namespace math
+   { 
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol);
+   template <class T>
+   typename tools::promote_args<T>::type trunc(const T& v);
+   template <class T, class Policy>
+   int itrunc(const T& v, const Policy& pol);
+   template <class T>
+   int itrunc(const T& v);
+   template <class T, class Policy>
+   long ltrunc(const T& v, const Policy& pol);
+   template <class T>
+   long ltrunc(const T& v);
+#ifdef BOOST_HAS_LONG_LONG
+   template <class T, class Policy>
+   ndnboost::long_long_type lltrunc(const T& v, const Policy& pol);
+   template <class T>
+   ndnboost::long_long_type lltrunc(const T& v);
+#endif
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type round(const T& v, const Policy& pol);
+   template <class T>
+   typename tools::promote_args<T>::type round(const T& v);
+   template <class T, class Policy>
+   int iround(const T& v, const Policy& pol);
+   template <class T>
+   int iround(const T& v);
+   template <class T, class Policy>
+   long lround(const T& v, const Policy& pol);
+   template <class T>
+   long lround(const T& v);
+#ifdef BOOST_HAS_LONG_LONG
+   template <class T, class Policy>
+   ndnboost::long_long_type llround(const T& v, const Policy& pol);
+   template <class T>
+   ndnboost::long_long_type llround(const T& v);
+#endif
+   template <class T, class Policy>
+   T modf(const T& v, T* ipart, const Policy& pol);
+   template <class T>
+   T modf(const T& v, T* ipart);
+   template <class T, class Policy>
+   T modf(const T& v, int* ipart, const Policy& pol);
+   template <class T>
+   T modf(const T& v, int* ipart);
+   template <class T, class Policy>
+   T modf(const T& v, long* ipart, const Policy& pol);
+   template <class T>
+   T modf(const T& v, long* ipart);
+#ifdef BOOST_HAS_LONG_LONG
+   template <class T, class Policy>
+   T modf(const T& v, ndnboost::long_long_type* ipart, const Policy& pol);
+   template <class T>
+   T modf(const T& v, ndnboost::long_long_type* ipart);
+#endif
+
+   }
+}
+
+#undef BOOST_MATH_STD_USING
+#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE\
+   using ndnboost::math::round;\
+   using ndnboost::math::iround;\
+   using ndnboost::math::lround;\
+   using ndnboost::math::trunc;\
+   using ndnboost::math::itrunc;\
+   using ndnboost::math::ltrunc;\
+   using ndnboost::math::modf;
+
+
+#endif // BOOST_MATH_SPECIAL_ROUND_FWD_HPP
+
diff --git a/ndnboost/math/special_functions/fpclassify.hpp b/ndnboost/math/special_functions/fpclassify.hpp
new file mode 100644
index 0000000..0eeea57
--- /dev/null
+++ b/ndnboost/math/special_functions/fpclassify.hpp
@@ -0,0 +1,606 @@
+//  Copyright John Maddock 2005-2008.
+//  Copyright (c) 2006-2008 Johan Rade
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_FPCLASSIFY_HPP
+#define BOOST_MATH_FPCLASSIFY_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <math.h>
+#include <ndnboost/config/no_tr1/cmath.hpp>
+#include <ndnboost/limits.hpp>
+#include <ndnboost/math/tools/real_cast.hpp>
+#include <ndnboost/type_traits/is_floating_point.hpp>
+#include <ndnboost/math/special_functions/math_fwd.hpp>
+#include <ndnboost/math/special_functions/detail/fp_traits.hpp>
+/*!
+  \file fpclassify.hpp
+  \brief Classify floating-point value as normal, subnormal, zero, infinite, or NaN.
+  \version 1.0
+  \author John Maddock
+ */
+
+/*
+
+1. If the platform is C99 compliant, then the native floating point
+classification functions are used.  However, note that we must only
+define the functions which call std::fpclassify etc if that function
+really does exist: otherwise a compiler may reject the code even though
+the template is never instantiated.
+
+2. If the platform is not C99 compliant, and the binary format for
+a floating point type (float, double or long double) can be determined
+at compile time, then the following algorithm is used:
+
+        If all exponent bits, the flag bit (if there is one),
+        and all significand bits are 0, then the number is zero.
+
+        If all exponent bits and the flag bit (if there is one) are 0,
+        and at least one significand bit is 1, then the number is subnormal.
+
+        If all exponent bits are 1 and all significand bits are 0,
+        then the number is infinity.
+
+        If all exponent bits are 1 and at least one significand bit is 1,
+        then the number is a not-a-number.
+
+        Otherwise the number is normal.
+
+        This algorithm works for the IEEE 754 representation,
+        and also for several non IEEE 754 formats.
+
+    Most formats have the structure
+        sign bit + exponent bits + significand bits.
+
+    A few have the structure
+        sign bit + exponent bits + flag bit + significand bits.
+    The flag bit is 0 for zero and subnormal numbers,
+        and 1 for normal numbers and NaN.
+        It is 0 (Motorola 68K) or 1 (Intel) for infinity.
+
+    To get the bits, the four or eight most significant bytes are copied
+    into an uint32_t or uint64_t and bit masks are applied.
+    This covers all the exponent bits and the flag bit (if there is one),
+    but not always all the significand bits.
+    Some of the functions below have two implementations,
+    depending on whether all the significand bits are copied or not.
+
+3. If the platform is not C99 compliant, and the binary format for
+a floating point type (float, double or long double) can not be determined
+at compile time, then comparison with std::numeric_limits values
+is used.
+
+*/
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#include <float.h>
+#endif
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+  namespace std{ using ::abs; using ::fabs; }
+#endif
+
+namespace ndnboost{
+
+//
+// This must not be located in any namespace under ndnboost::math
+// otherwise we can get into an infinite loop if isnan is
+// a #define for "isnan" !
+//
+namespace math_detail{
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4800)
+#endif
+
+template <class T>
+inline bool is_nan_helper(T t, const ndnboost::true_type&)
+{
+#ifdef isnan
+   return isnan(t);
+#elif defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) || !defined(BOOST_HAS_FPCLASSIFY)
+   (void)t;
+   return false;
+#else // BOOST_HAS_FPCLASSIFY
+   return (BOOST_FPCLASSIFY_PREFIX fpclassify(t) == (int)FP_NAN);
+#endif
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+template <class T>
+inline bool is_nan_helper(T, const ndnboost::false_type&)
+{
+   return false;
+}
+
+}
+
+namespace math{
+
+namespace detail{
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+template <class T>
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const native_tag&)
+{
+   return (std::fpclassify)(t);
+}
+#endif
+
+template <class T>
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag<true>&)
+{
+   BOOST_MATH_INSTRUMENT_VARIABLE(t);
+
+   // whenever possible check for Nan's first:
+#if defined(BOOST_HAS_FPCLASSIFY)  && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
+   if(::ndnboost::math_detail::is_nan_helper(t, ::ndnboost::is_floating_point<T>()))
+      return FP_NAN;
+#elif defined(isnan)
+   if(ndnboost::math_detail::is_nan_helper(t, ::ndnboost::is_floating_point<T>()))
+      return FP_NAN;
+#elif defined(_MSC_VER) || defined(__BORLANDC__)
+   if(::_isnan(ndnboost::math::tools::real_cast<double>(t)))
+      return FP_NAN;
+#endif
+   // std::fabs broken on a few systems especially for long long!!!!
+   T at = (t < T(0)) ? -t : t;
+
+   // Use a process of exclusion to figure out
+   // what kind of type we have, this relies on
+   // IEEE conforming reals that will treat
+   // Nan's as unordered.  Some compilers
+   // don't do this once optimisations are
+   // turned on, hence the check for nan's above.
+   if(at <= (std::numeric_limits<T>::max)())
+   {
+      if(at >= (std::numeric_limits<T>::min)())
+         return FP_NORMAL;
+      return (at != 0) ? FP_SUBNORMAL : FP_ZERO;
+   }
+   else if(at > (std::numeric_limits<T>::max)())
+      return FP_INFINITE;
+   return FP_NAN;
+}
+
+template <class T>
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag<false>&)
+{
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   if(std::numeric_limits<T>::is_specialized)
+      return fpclassify_imp(t, generic_tag<true>());
+#endif
+   //
+   // An unknown type with no numeric_limits support,
+   // so what are we supposed to do we do here?
+   //
+   BOOST_MATH_INSTRUMENT_VARIABLE(t);
+
+   return t == 0 ? FP_ZERO : FP_NORMAL;
+}
+
+template<class T>
+int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag)
+{
+   typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+   BOOST_MATH_INSTRUMENT_VARIABLE(x);
+
+   BOOST_DEDUCED_TYPENAME traits::bits a;
+   traits::get_bits(x,a);
+   BOOST_MATH_INSTRUMENT_VARIABLE(a);
+   a &= traits::exponent | traits::flag | traits::significand;
+   BOOST_MATH_INSTRUMENT_VARIABLE((traits::exponent | traits::flag | traits::significand));
+   BOOST_MATH_INSTRUMENT_VARIABLE(a);
+
+   if(a <= traits::significand) {
+      if(a == 0)
+         return FP_ZERO;
+      else
+         return FP_SUBNORMAL;
+   }
+
+   if(a < traits::exponent) return FP_NORMAL;
+
+   a &= traits::significand;
+   if(a == 0) return FP_INFINITE;
+
+   return FP_NAN;
+}
+
+template<class T>
+int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag)
+{
+   typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+   BOOST_MATH_INSTRUMENT_VARIABLE(x);
+
+   BOOST_DEDUCED_TYPENAME traits::bits a;
+   traits::get_bits(x,a);
+   a &= traits::exponent | traits::flag | traits::significand;
+
+   if(a <= traits::significand) {
+      if(x == 0)
+         return FP_ZERO;
+      else
+         return FP_SUBNORMAL;
+   }
+
+   if(a < traits::exponent) return FP_NORMAL;
+
+   a &= traits::significand;
+   traits::set_bits(x,a);
+   if(x == 0) return FP_INFINITE;
+
+   return FP_NAN;
+}
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && (defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS))
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+   return ndnboost::math::detail::fpclassify_imp(t, generic_tag<true>());
+}
+#endif
+
+}  // namespace detail
+
+template <class T>
+inline int fpclassify BOOST_NO_MACRO_EXPAND(T t)
+{
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   typedef typename tools::promote_args<T>::type value_type;
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   if(std::numeric_limits<T>::is_specialized && detail::is_generic_tag_false(static_cast<method*>(0)))
+      return detail::fpclassify_imp(static_cast<value_type>(t), detail::generic_tag<true>());
+   return detail::fpclassify_imp(static_cast<value_type>(t), method());
+#else
+   return detail::fpclassify_imp(static_cast<value_type>(t), method());
+#endif
+}
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+template <>
+inline int fpclassify<long double> BOOST_NO_MACRO_EXPAND(long double t)
+{
+   typedef detail::fp_traits<long double>::type traits;
+   typedef traits::method method;
+   typedef long double value_type;
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   if(std::numeric_limits<long double>::is_specialized && detail::is_generic_tag_false(static_cast<method*>(0)))
+      return detail::fpclassify_imp(static_cast<value_type>(t), detail::generic_tag<true>());
+   return detail::fpclassify_imp(static_cast<value_type>(t), method());
+#else
+   return detail::fpclassify_imp(static_cast<value_type>(t), method());
+#endif
+}
+#endif
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T>
+    inline bool isfinite_impl(T x, native_tag const&)
+    {
+        return (std::isfinite)(x);
+    }
+#endif
+
+    template<class T>
+    inline bool isfinite_impl(T x, generic_tag<true> const&)
+    {
+        return x >= -(std::numeric_limits<T>::max)()
+            && x <= (std::numeric_limits<T>::max)();
+    }
+
+    template<class T>
+    inline bool isfinite_impl(T x, generic_tag<false> const&)
+    {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+      if(std::numeric_limits<T>::is_specialized)
+         return isfinite_impl(x, generic_tag<true>());
+#endif
+       (void)x; // warning supression.
+       return true;
+    }
+
+    template<class T>
+    inline bool isfinite_impl(T x, ieee_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent;
+        return a != traits::exponent;
+    }
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+inline bool isfinite_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+   return ndnboost::math::detail::isfinite_impl(t, generic_tag<true>());
+}
+#endif
+
+}
+
+template<class T>
+inline bool (isfinite)(T x)
+{ //!< \brief return true if floating-point type t is finite.
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   // typedef typename ndnboost::is_floating_point<T>::type fp_tag;
+   typedef typename tools::promote_args<T>::type value_type;
+   return detail::isfinite_impl(static_cast<value_type>(x), method());
+}
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+template<>
+inline bool (isfinite)(long double x)
+{ //!< \brief return true if floating-point type t is finite.
+   typedef detail::fp_traits<long double>::type traits;
+   typedef traits::method method;
+   typedef ndnboost::is_floating_point<long double>::type fp_tag;
+   typedef long double value_type;
+   return detail::isfinite_impl(static_cast<value_type>(x), method());
+}
+#endif
+
+//------------------------------------------------------------------------------
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T>
+    inline bool isnormal_impl(T x, native_tag const&)
+    {
+        return (std::isnormal)(x);
+    }
+#endif
+
+    template<class T>
+    inline bool isnormal_impl(T x, generic_tag<true> const&)
+    {
+        if(x < 0) x = -x;
+        return x >= (std::numeric_limits<T>::min)()
+            && x <= (std::numeric_limits<T>::max)();
+    }
+
+    template<class T>
+    inline bool isnormal_impl(T x, generic_tag<false> const&)
+    {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+      if(std::numeric_limits<T>::is_specialized)
+         return isnormal_impl(x, generic_tag<true>());
+#endif
+       return !(x == 0);
+    }
+
+    template<class T>
+    inline bool isnormal_impl(T x, ieee_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent | traits::flag;
+        return (a != 0) && (a < traits::exponent);
+    }
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+inline bool isnormal_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+   return ndnboost::math::detail::isnormal_impl(t, generic_tag<true>());
+}
+#endif
+
+}
+
+template<class T>
+inline bool (isnormal)(T x)
+{
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   //typedef typename ndnboost::is_floating_point<T>::type fp_tag;
+   typedef typename tools::promote_args<T>::type value_type;
+   return detail::isnormal_impl(static_cast<value_type>(x), method());
+}
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+template<>
+inline bool (isnormal)(long double x)
+{
+   typedef detail::fp_traits<long double>::type traits;
+   typedef traits::method method;
+   typedef ndnboost::is_floating_point<long double>::type fp_tag;
+   typedef long double value_type;
+   return detail::isnormal_impl(static_cast<value_type>(x), method());
+}
+#endif
+
+//------------------------------------------------------------------------------
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T>
+    inline bool isinf_impl(T x, native_tag const&)
+    {
+        return (std::isinf)(x);
+    }
+#endif
+
+    template<class T>
+    inline bool isinf_impl(T x, generic_tag<true> const&)
+    {
+        (void)x; // in case the compiler thinks that x is unused because std::numeric_limits<T>::has_infinity is false
+        return std::numeric_limits<T>::has_infinity
+            && ( x == std::numeric_limits<T>::infinity()
+                 || x == -std::numeric_limits<T>::infinity());
+    }
+
+    template<class T>
+    inline bool isinf_impl(T x, generic_tag<false> const&)
+    {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+      if(std::numeric_limits<T>::is_specialized)
+         return isinf_impl(x, generic_tag<true>());
+#endif
+        (void)x; // warning supression.
+        return false;
+    }
+
+    template<class T>
+    inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent | traits::significand;
+        return a == traits::exponent;
+    }
+
+    template<class T>
+    inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent | traits::significand;
+        if(a != traits::exponent)
+            return false;
+
+        traits::set_bits(x,0);
+        return x == 0;
+    }
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+inline bool isinf_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+   return ndnboost::math::detail::isinf_impl(t, generic_tag<true>());
+}
+#endif
+
+}   // namespace detail
+
+template<class T>
+inline bool (isinf)(T x)
+{
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   // typedef typename ndnboost::is_floating_point<T>::type fp_tag;
+   typedef typename tools::promote_args<T>::type value_type;
+   return detail::isinf_impl(static_cast<value_type>(x), method());
+}
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+template<>
+inline bool (isinf)(long double x)
+{
+   typedef detail::fp_traits<long double>::type traits;
+   typedef traits::method method;
+   typedef ndnboost::is_floating_point<long double>::type fp_tag;
+   typedef long double value_type;
+   return detail::isinf_impl(static_cast<value_type>(x), method());
+}
+#endif
+
+//------------------------------------------------------------------------------
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T>
+    inline bool isnan_impl(T x, native_tag const&)
+    {
+        return (std::isnan)(x);
+    }
+#endif
+
+    template<class T>
+    inline bool isnan_impl(T x, generic_tag<true> const&)
+    {
+        return std::numeric_limits<T>::has_infinity
+            ? !(x <= std::numeric_limits<T>::infinity())
+            : x != x;
+    }
+
+    template<class T>
+    inline bool isnan_impl(T x, generic_tag<false> const&)
+    {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+      if(std::numeric_limits<T>::is_specialized)
+         return isnan_impl(x, generic_tag<true>());
+#endif
+        (void)x; // warning supression
+        return false;
+    }
+
+    template<class T>
+    inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent | traits::significand;
+        return a > traits::exponent;
+    }
+
+    template<class T>
+    inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+
+        a &= traits::exponent | traits::significand;
+        if(a < traits::exponent)
+            return false;
+
+        a &= traits::significand;
+        traits::set_bits(x,a);
+        return x != 0;
+    }
+
+}   // namespace detail
+
+template<class T>
+inline bool (isnan)(T x)
+{ //!< \brief return true if floating-point type t is NaN (Not A Number).
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   // typedef typename ndnboost::is_floating_point<T>::type fp_tag;
+   return detail::isnan_impl(x, method());
+}
+
+#ifdef isnan
+template <> inline bool isnan BOOST_NO_MACRO_EXPAND<float>(float t){ return ::ndnboost::math_detail::is_nan_helper(t, ndnboost::true_type()); }
+template <> inline bool isnan BOOST_NO_MACRO_EXPAND<double>(double t){ return ::ndnboost::math_detail::is_nan_helper(t, ndnboost::true_type()); }
+template <> inline bool isnan BOOST_NO_MACRO_EXPAND<long double>(long double t){ return ::ndnboost::math_detail::is_nan_helper(t, ndnboost::true_type()); }
+#elif defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+template<>
+inline bool (isnan)(long double x)
+{ //!< \brief return true if floating-point type t is NaN (Not A Number).
+   typedef detail::fp_traits<long double>::type traits;
+   typedef traits::method method;
+   typedef ndnboost::is_floating_point<long double>::type fp_tag;
+   return detail::isnan_impl(x, method());
+}
+#endif
+
+} // namespace math
+} // namespace ndnboost
+
+#endif // BOOST_MATH_FPCLASSIFY_HPP
+
diff --git a/ndnboost/math/special_functions/math_fwd.hpp b/ndnboost/math/special_functions/math_fwd.hpp
new file mode 100644
index 0000000..aeb7b4c
--- /dev/null
+++ b/ndnboost/math/special_functions/math_fwd.hpp
@@ -0,0 +1,1408 @@
+// math_fwd.hpp
+
+// TODO revise completely for new distribution classes.
+
+// Copyright Paul A. Bristow 2006.
+// Copyright John Maddock 2006.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// Omnibus list of forward declarations of math special functions.
+
+// IT = Integer type.
+// RT = Real type (built-in floating-point types, float, double, long double) & User Defined Types
+// AT = Integer or Real type
+
+#ifndef BOOST_MATH_SPECIAL_MATH_FWD_HPP
+#define BOOST_MATH_SPECIAL_MATH_FWD_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <ndnboost/math/special_functions/detail/round_fwd.hpp>
+#include <ndnboost/math/tools/promotion.hpp> // for argument promotion.
+#include <ndnboost/math/policies/policy.hpp>
+#include <ndnboost/mpl/comparison.hpp>
+#include <ndnboost/config/no_tr1/complex.hpp>
+
+#define BOOST_NO_MACRO_EXPAND /**/
+
+namespace ndnboost
+{
+   namespace math
+   { // Math functions (in roughly alphabetic order).
+
+   // Beta functions.
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type
+         beta(RT1 a, RT2 b); // Beta function (2 arguments).
+
+   template <class RT1, class RT2, class A>
+   typename tools::promote_args<RT1, RT2, A>::type
+         beta(RT1 a, RT2 b, A x); // Beta function (3 arguments).
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         beta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Beta function (3 arguments).
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         betac(RT1 a, RT2 b, RT3 x);
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         betac(RT1 a, RT2 b, RT3 x, const Policy& pol);
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibeta(RT1 a, RT2 b, RT3 x); // Incomplete beta function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibetac(RT1 a, RT2 b, RT3 x); // Incomplete beta complement function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta complement function.
+
+   template <class T1, class T2, class T3, class T4>
+   typename tools::promote_args<T1, T2, T3, T4>::type
+         ibeta_inv(T1 a, T2 b, T3 p, T4* py);
+
+   template <class T1, class T2, class T3, class T4, class Policy>
+   typename tools::promote_args<T1, T2, T3, T4>::type
+         ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol);
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibeta_inv(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibeta_inva(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibeta_invb(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
+
+   template <class T1, class T2, class T3, class T4>
+   typename tools::promote_args<T1, T2, T3, T4>::type
+         ibetac_inv(T1 a, T2 b, T3 q, T4* py);
+
+   template <class T1, class T2, class T3, class T4, class Policy>
+   typename tools::promote_args<T1, T2, T3, T4>::type
+         ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol);
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibetac_inv(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibetac_inva(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibetac_invb(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibeta_derivative(RT1 a, RT2 b, RT3 x);  // derivative of incomplete beta
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type
+         ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol);  // derivative of incomplete beta
+
+   // erf & erfc error functions.
+   template <class RT> // Error function.
+   typename tools::promote_args<RT>::type erf(RT z);
+   template <class RT, class Policy> // Error function.
+   typename tools::promote_args<RT>::type erf(RT z, const Policy&);
+
+   template <class RT>// Error function complement.
+   typename tools::promote_args<RT>::type erfc(RT z);
+   template <class RT, class Policy>// Error function complement.
+   typename tools::promote_args<RT>::type erfc(RT z, const Policy&);
+
+   template <class RT>// Error function inverse.
+   typename tools::promote_args<RT>::type erf_inv(RT z);
+   template <class RT, class Policy>// Error function inverse.
+   typename tools::promote_args<RT>::type erf_inv(RT z, const Policy& pol);
+
+   template <class RT>// Error function complement inverse.
+   typename tools::promote_args<RT>::type erfc_inv(RT z);
+   template <class RT, class Policy>// Error function complement inverse.
+   typename tools::promote_args<RT>::type erfc_inv(RT z, const Policy& pol);
+
+   // Polynomials:
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type
+         legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1);
+
+   template <class T>
+   typename tools::promote_args<T>::type
+         legendre_p(int l, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type
+         legendre_p(int l, T x, const Policy& pol);
+
+   template <class T>
+   typename tools::promote_args<T>::type
+         legendre_q(unsigned l, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type
+         legendre_q(unsigned l, T x, const Policy& pol);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type
+         legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1);
+
+   template <class T>
+   typename tools::promote_args<T>::type
+         legendre_p(int l, int m, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type
+         legendre_p(int l, int m, T x, const Policy& pol);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type
+         laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type
+      laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1);
+
+   template <class T>
+   typename tools::promote_args<T>::type
+      laguerre(unsigned n, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type
+      laguerre(unsigned n, unsigned m, T x, const Policy& pol);
+
+   template <class T1, class T2>
+   struct laguerre_result
+   {
+      typedef typename mpl::if_<
+         policies::is_policy<T2>,
+         typename tools::promote_args<T1>::type,
+         typename tools::promote_args<T2>::type
+      >::type type;
+   };
+
+   template <class T1, class T2>
+   typename laguerre_result<T1, T2>::type
+      laguerre(unsigned n, T1 m, T2 x);
+
+   template <class T>
+   typename tools::promote_args<T>::type
+      hermite(unsigned n, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type
+      hermite(unsigned n, T x, const Policy& pol);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type
+      hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
+
+   template <class T1, class T2>
+   std::complex<typename tools::promote_args<T1, T2>::type>
+         spherical_harmonic(unsigned n, int m, T1 theta, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   std::complex<typename tools::promote_args<T1, T2>::type>
+      spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type
+         spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type
+      spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type
+         spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type
+      spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+
+   // Elliptic integrals:
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type
+         ellint_rf(T1 x, T2 y, T3 z);
+
+   template <class T1, class T2, class T3, class Policy>
+   typename tools::promote_args<T1, T2, T3>::type
+         ellint_rf(T1 x, T2 y, T3 z, const Policy& pol);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type
+         ellint_rd(T1 x, T2 y, T3 z);
+
+   template <class T1, class T2, class T3, class Policy>
+   typename tools::promote_args<T1, T2, T3>::type
+         ellint_rd(T1 x, T2 y, T3 z, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type
+         ellint_rc(T1 x, T2 y);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type
+         ellint_rc(T1 x, T2 y, const Policy& pol);
+
+   template <class T1, class T2, class T3, class T4>
+   typename tools::promote_args<T1, T2, T3, T4>::type
+         ellint_rj(T1 x, T2 y, T3 z, T4 p);
+
+   template <class T1, class T2, class T3, class T4, class Policy>
+   typename tools::promote_args<T1, T2, T3, T4>::type
+         ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol);
+
+   template <typename T>
+   typename tools::promote_args<T>::type ellint_2(T k);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi, const Policy& pol);
+
+   template <typename T>
+   typename tools::promote_args<T>::type ellint_1(T k);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi, const Policy& pol);
+
+   namespace detail{
+
+   template <class T, class U, class V>
+   struct ellint_3_result
+   {
+      typedef typename mpl::if_<
+         policies::is_policy<V>,
+         typename tools::promote_args<T, U>::type,
+         typename tools::promote_args<T, U, V>::type
+      >::type type;
+   };
+
+   } // namespace detail
+
+
+   template <class T1, class T2, class T3>
+   typename detail::ellint_3_result<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi);
+
+   template <class T1, class T2, class T3, class Policy>
+   typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v);
+
+   // Factorial functions.
+   // Note: not for integral types, at present.
+   template <class RT>
+   struct max_factorial;
+   template <class RT>
+   RT factorial(unsigned int);
+   template <class RT, class Policy>
+   RT factorial(unsigned int, const Policy& pol);
+   template <class RT>
+   RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT));
+   template <class RT>
+   RT double_factorial(unsigned i);
+   template <class RT, class Policy>
+   RT double_factorial(unsigned i, const Policy& pol);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n, const Policy& pol);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type rising_factorial(RT x, int n);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type rising_factorial(RT x, int n, const Policy& pol);
+
+   // Gamma functions.
+   template <class RT>
+   typename tools::promote_args<RT>::type tgamma(RT z);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type tgamma1pm1(RT z);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type tgamma1pm1(RT z, const Policy& pol);
+
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z);
+
+   template <class RT1, class RT2, class Policy>
+   typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z, const Policy& pol);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type lgamma(RT z, int* sign);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type lgamma(RT z, int* sign, const Policy& pol);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type lgamma(RT x);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type lgamma(RT x, const Policy& pol);
+
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z);
+
+   template <class RT1, class RT2, class Policy>
+   typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z, const Policy&);
+
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z);
+
+   template <class RT1, class RT2, class Policy>
+   typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z, const Policy&);
+
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z);
+
+   template <class RT1, class RT2, class Policy>
+   typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x, const Policy&);
+
+   // gamma inverse.
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q, const Policy&);
+
+   // digamma:
+   template <class T>
+   typename tools::promote_args<T>::type digamma(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type digamma(T x, const Policy&);
+
+   // Hypotenuse function sqrt(x ^ 2 + y ^ 2).
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type
+         hypot(T1 x, T2 y);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type
+         hypot(T1 x, T2 y, const Policy&);
+
+   // cbrt - cube root.
+   template <class RT>
+   typename tools::promote_args<RT>::type cbrt(RT z);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type cbrt(RT z, const Policy&);
+
+   // log1p is log(x + 1)
+   template <class T>
+   typename tools::promote_args<T>::type log1p(T);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type log1p(T, const Policy&);
+
+   // log1pmx is log(x + 1) - x
+   template <class T>
+   typename tools::promote_args<T>::type log1pmx(T);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type log1pmx(T, const Policy&);
+
+   // Exp (x) minus 1 functions.
+   template <class T>
+   typename tools::promote_args<T>::type expm1(T);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type expm1(T, const Policy&);
+
+   // Power - 1
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type
+         powm1(const T1 a, const T2 z);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type
+         powm1(const T1 a, const T2 z, const Policy&);
+
+   // sqrt(1+x) - 1
+   template <class T>
+   typename tools::promote_args<T>::type sqrt1pm1(const T& val);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type sqrt1pm1(const T& val, const Policy&);
+
+   // sinus cardinals:
+   template <class T>
+   typename tools::promote_args<T>::type sinc_pi(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type sinc_pi(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type sinhc_pi(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type sinhc_pi(T x, const Policy&);
+
+   // inverse hyperbolics:
+   template<typename T>
+   typename tools::promote_args<T>::type asinh(T x);
+
+   template<typename T, class Policy>
+   typename tools::promote_args<T>::type asinh(T x, const Policy&);
+
+   template<typename T>
+   typename tools::promote_args<T>::type acosh(T x);
+
+   template<typename T, class Policy>
+   typename tools::promote_args<T>::type acosh(T x, const Policy&);
+
+   template<typename T>
+   typename tools::promote_args<T>::type atanh(T x);
+
+   template<typename T, class Policy>
+   typename tools::promote_args<T>::type atanh(T x, const Policy&);
+
+   namespace detail{
+
+      typedef mpl::int_<0> bessel_no_int_tag;      // No integer optimisation possible.
+      typedef mpl::int_<1> bessel_maybe_int_tag;   // Maybe integer optimisation.
+      typedef mpl::int_<2> bessel_int_tag;         // Definite integer optimistaion.
+
+      template <class T1, class T2, class Policy>
+      struct bessel_traits
+      {
+         typedef typename tools::promote_args<
+            T1, T2
+         >::type result_type;
+
+         typedef typename policies::precision<result_type, Policy>::type precision_type;
+
+         typedef typename mpl::if_<
+            mpl::or_<
+               mpl::less_equal<precision_type, mpl::int_<0> >,
+               mpl::greater<precision_type, mpl::int_<64> > >,
+            bessel_no_int_tag,
+            typename mpl::if_<
+               is_integral<T1>,
+               bessel_int_tag,
+               bessel_maybe_int_tag
+            >::type
+         >::type optimisation_tag;
+      };
+   } // detail
+
+   // Bessel functions:
+   template <class T1, class T2, class Policy>
+   typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j(T1 v, T2 x);
+
+   template <class T, class Policy>
+   typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel(unsigned v, T x, const Policy& pol);
+
+   template <class T>
+   typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel(unsigned v, T x);
+
+   template <class T1, class T2, class Policy>
+   typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i(T1 v, T2 x);
+
+   template <class T1, class T2, class Policy>
+   typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k(T1 v, T2 x);
+
+   template <class T1, class T2, class Policy>
+   typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann(T1 v, T2 x);
+
+   template <class T, class Policy>
+   typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann(unsigned v, T x, const Policy& pol);
+
+   template <class T>
+   typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x);
+
+   template <class T, class Policy>
+   typename detail::bessel_traits<T, T, Policy>::result_type cyl_bessel_j_zero(T v, int m, const Policy& pol);
+
+   template <class T>
+   typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_bessel_j_zero(T v, int m);
+
+   template <class T, class OutputIterator>
+   OutputIterator cyl_bessel_j_zero(T v,
+                          int start_index,
+                          unsigned number_of_zeros,
+                          OutputIterator out_it);
+
+   template <class T, class OutputIterator, class Policy>
+   OutputIterator cyl_bessel_j_zero(T v,
+                          int start_index,
+                          unsigned number_of_zeros,
+                          OutputIterator out_it,
+                          const Policy&);
+
+   template <class T, class Policy>
+   typename detail::bessel_traits<T, T, Policy>::result_type cyl_neumann_zero(T v, int m, const Policy& pol);
+
+   template <class T>
+   typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_neumann_zero(T v, int m);
+
+   template <class T, class OutputIterator>
+   OutputIterator cyl_neumann_zero(T v,
+                         int start_index,
+                         unsigned number_of_zeros,
+                         OutputIterator out_it);
+
+   template <class T, class OutputIterator, class Policy>
+   OutputIterator cyl_neumann_zero(T v,
+                         int start_index,
+                         unsigned number_of_zeros,
+                         OutputIterator out_it,
+                         const Policy&);
+
+   template <class T1, class T2>
+   std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_1(T1 v, T2 x);
+
+   template <class T1, class T2, class Policy>
+   std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2, class Policy>
+   std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_2(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_2(T1 v, T2 x);
+
+   template <class T1, class T2, class Policy>
+   std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_1(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_1(T1 v, T2 x);
+
+   template <class T1, class T2, class Policy>
+   std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_2(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_2(T1 v, T2 x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type airy_ai(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type airy_ai(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type airy_bi(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type airy_bi(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type airy_ai_prime(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type airy_ai_prime(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type airy_bi_prime(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type airy_bi_prime(T x);
+
+   template <class T>
+   T airy_ai_zero(unsigned m);
+   template <class T, class Policy>
+   T airy_ai_zero(unsigned m, const Policy&);
+
+   template <class OutputIterator>
+   OutputIterator airy_ai_zero(
+                     unsigned start_index,
+                     unsigned number_of_zeros,
+                     OutputIterator out_it);
+   template <class OutputIterator, class Policy>
+   OutputIterator airy_ai_zero(
+                     unsigned start_index,
+                     unsigned number_of_zeros,
+                     OutputIterator out_it,
+                     const Policy&);
+
+   template <class T>
+   T airy_bi_zero(unsigned m);
+   template <class T, class Policy>
+   T airy_bi_zero(unsigned m, const Policy&);
+
+   template <class OutputIterator>
+   OutputIterator airy_bi_zero(
+                     unsigned start_index,
+                     unsigned number_of_zeros,
+                     OutputIterator out_it);
+   template <class OutputIterator, class Policy>
+   OutputIterator airy_bi_zero(
+                     unsigned start_index,
+                     unsigned number_of_zeros,
+                     OutputIterator out_it,
+                     const Policy&);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type sin_pi(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type sin_pi(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type cos_pi(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type cos_pi(T x);
+
+   template <class T>
+   int fpclassify BOOST_NO_MACRO_EXPAND(T t);
+
+   template <class T>
+   bool isfinite BOOST_NO_MACRO_EXPAND(T z);
+
+   template <class T>
+   bool isinf BOOST_NO_MACRO_EXPAND(T t);
+
+   template <class T>
+   bool isnan BOOST_NO_MACRO_EXPAND(T t);
+
+   template <class T>
+   bool isnormal BOOST_NO_MACRO_EXPAND(T t);
+
+   template<class T>
+   int signbit BOOST_NO_MACRO_EXPAND(T x);
+
+   template <class T>
+   int sign BOOST_NO_MACRO_EXPAND(const T& z);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y);
+
+   template <class T>
+   typename tools::promote_args<T>::type changesign BOOST_NO_MACRO_EXPAND(const T& z);
+
+   // Exponential integrals:
+   namespace detail{
+
+   template <class T, class U>
+   struct expint_result
+   {
+      typedef typename mpl::if_<
+         policies::is_policy<U>,
+         typename tools::promote_args<T>::type,
+         typename tools::promote_args<U>::type
+      >::type type;
+   };
+
+   } // namespace detail
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type expint(unsigned n, T z, const Policy&);
+
+   template <class T, class U>
+   typename detail::expint_result<T, U>::type expint(T const z, U const u);
+
+   template <class T>
+   typename tools::promote_args<T>::type expint(T z);
+
+   // Zeta:
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type zeta(T s, const Policy&);
+
+   // Owen's T function:
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a);
+
+   // Jacobi Functions:
+   template <class T, class U, class V, class Policy>
+   typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn, V* pdn, const Policy&);
+
+   template <class T, class U, class V>
+   typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn = 0, V* pdn = 0);
+
+   template <class U, class T, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta, const Policy& pol);
+
+   template <class U, class T>
+   typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta);
+
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta, const Policy& pol);
+
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta);
+
+
+   template <class T>
+   typename tools::promote_args<T>::type zeta(T s);
+
+   // pow:
+   template <int N, typename T, class Policy>
+   typename tools::promote_args<T>::type pow(T base, const Policy& policy);
+
+   template <int N, typename T>
+   typename tools::promote_args<T>::type pow(T base);
+
+   // next:
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type nextafter(const T&, const U&, const Policy&);
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type nextafter(const T&, const U&);
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type float_next(const T&, const Policy&);
+   template <class T>
+   typename tools::promote_args<T>::type float_next(const T&);
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type float_prior(const T&, const Policy&);
+   template <class T>
+   typename tools::promote_args<T>::type float_prior(const T&);
+   template <class T, class U, class Policy>
+   typename tools::promote_args<T, U>::type float_distance(const T&, const U&, const Policy&);
+   template <class T, class U>
+   typename tools::promote_args<T, U>::type float_distance(const T&, const U&);
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type float_advance(T val, int distance, const Policy& pol);
+   template <class T>
+   typename tools::promote_args<T>::type float_advance(const T& val, int distance);
+
+    } // namespace math
+} // namespace ndnboost
+
+#ifdef BOOST_HAS_LONG_LONG
+#define BOOST_MATH_DETAIL_LL_FUNC(Policy)\
+   \
+   template <class T>\
+   inline T modf(const T& v, ndnboost::long_long_type* ipart){ using ndnboost::math::modf; return modf(v, ipart, Policy()); }\
+   \
+   template <class T>\
+   inline ndnboost::long_long_type lltrunc(const T& v){ using ndnboost::math::lltrunc; return lltrunc(v, Policy()); }\
+   \
+   template <class T>\
+   inline ndnboost::long_long_type llround(const T& v){ using ndnboost::math::llround; return llround(v, Policy()); }\
+
+#else
+#define BOOST_MATH_DETAIL_LL_FUNC(Policy)
+#endif
+
+#define BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\
+   \
+   BOOST_MATH_DETAIL_LL_FUNC(Policy)\
+   \
+   template <class RT1, class RT2>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2>::type \
+   beta(RT1 a, RT2 b) { return ::ndnboost::math::beta(a, b, Policy()); }\
+\
+   template <class RT1, class RT2, class A>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2, A>::type \
+   beta(RT1 a, RT2 b, A x){ return ::ndnboost::math::beta(a, b, x, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   betac(RT1 a, RT2 b, RT3 x) { return ::ndnboost::math::betac(a, b, x, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta(RT1 a, RT2 b, RT3 x){ return ::ndnboost::math::ibeta(a, b, x, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibetac(RT1 a, RT2 b, RT3 x){ return ::ndnboost::math::ibetac(a, b, x, Policy()); }\
+\
+   template <class T1, class T2, class T3, class T4>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2, T3, T4>::type  \
+   ibeta_inv(T1 a, T2 b, T3 p, T4* py){ return ::ndnboost::math::ibeta_inv(a, b, p, py, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta_inv(RT1 a, RT2 b, RT3 p){ return ::ndnboost::math::ibeta_inv(a, b, p, Policy()); }\
+\
+   template <class T1, class T2, class T3, class T4>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2, T3, T4>::type \
+   ibetac_inv(T1 a, T2 b, T3 q, T4* py){ return ::ndnboost::math::ibetac_inv(a, b, q, py, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta_inva(RT1 a, RT2 b, RT3 p){ return ::ndnboost::math::ibeta_inva(a, b, p, Policy()); }\
+\
+   template <class T1, class T2, class T3>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2, T3>::type \
+   ibetac_inva(T1 a, T2 b, T3 q){ return ::ndnboost::math::ibetac_inva(a, b, q, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta_invb(RT1 a, RT2 b, RT3 p){ return ::ndnboost::math::ibeta_invb(a, b, p, Policy()); }\
+\
+   template <class T1, class T2, class T3>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2, T3>::type \
+   ibetac_invb(T1 a, T2 b, T3 q){ return ::ndnboost::math::ibetac_invb(a, b, q, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibetac_inv(RT1 a, RT2 b, RT3 q){ return ::ndnboost::math::ibetac_inv(a, b, q, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta_derivative(RT1 a, RT2 b, RT3 x){ return ::ndnboost::math::ibeta_derivative(a, b, x, Policy()); }\
+\
+   template <class RT>\
+   inline typename ndnboost::math::tools::promote_args<RT>::type erf(RT z) { return ::ndnboost::math::erf(z, Policy()); }\
+\
+   template <class RT>\
+   inline typename ndnboost::math::tools::promote_args<RT>::type erfc(RT z){ return ::ndnboost::math::erfc(z, Policy()); }\
+\
+   template <class RT>\
+   inline typename ndnboost::math::tools::promote_args<RT>::type erf_inv(RT z) { return ::ndnboost::math::erf_inv(z, Policy()); }\
+\
+   template <class RT>\
+   inline typename ndnboost::math::tools::promote_args<RT>::type erfc_inv(RT z){ return ::ndnboost::math::erfc_inv(z, Policy()); }\
+\
+   using ndnboost::math::legendre_next;\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type \
+   legendre_p(int l, T x){ return ::ndnboost::math::legendre_p(l, x, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type \
+   legendre_q(unsigned l, T x){ return ::ndnboost::math::legendre_q(l, x, Policy()); }\
+\
+   using ::ndnboost::math::legendre_next;\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type \
+   legendre_p(int l, int m, T x){ return ::ndnboost::math::legendre_p(l, m, x, Policy()); }\
+\
+   using ::ndnboost::math::laguerre_next;\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type \
+   laguerre(unsigned n, T x){ return ::ndnboost::math::laguerre(n, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::laguerre_result<T1, T2>::type \
+   laguerre(unsigned n, T1 m, T2 x) { return ::ndnboost::math::laguerre(n, m, x, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type \
+   hermite(unsigned n, T x){ return ::ndnboost::math::hermite(n, x, Policy()); }\
+\
+   using ndnboost::math::hermite_next;\
+\
+   template <class T1, class T2>\
+   inline std::complex<typename ndnboost::math::tools::promote_args<T1, T2>::type> \
+   spherical_harmonic(unsigned n, int m, T1 theta, T2 phi){ return ndnboost::math::spherical_harmonic(n, m, theta, phi, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type \
+   spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi){ return ::ndnboost::math::spherical_harmonic_r(n, m, theta, phi, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type \
+   spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi){ return ndnboost::math::spherical_harmonic_i(n, m, theta, phi, Policy()); }\
+\
+   template <class T1, class T2, class Policy>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type \
+      spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);\
+\
+   template <class T1, class T2, class T3>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2, T3>::type \
+   ellint_rf(T1 x, T2 y, T3 z){ return ::ndnboost::math::ellint_rf(x, y, z, Policy()); }\
+\
+   template <class T1, class T2, class T3>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2, T3>::type \
+   ellint_rd(T1 x, T2 y, T3 z){ return ::ndnboost::math::ellint_rd(x, y, z, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type \
+   ellint_rc(T1 x, T2 y){ return ::ndnboost::math::ellint_rc(x, y, Policy()); }\
+\
+   template <class T1, class T2, class T3, class T4>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2, T3, T4>::type \
+   ellint_rj(T1 x, T2 y, T3 z, T4 p){ return ndnboost::math::ellint_rj(x, y, z, p, Policy()); }\
+\
+   template <typename T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type ellint_2(T k){ return ndnboost::math::ellint_2(k, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi){ return ndnboost::math::ellint_2(k, phi, Policy()); }\
+\
+   template <typename T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type ellint_1(T k){ return ndnboost::math::ellint_1(k, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi){ return ndnboost::math::ellint_1(k, phi, Policy()); }\
+\
+   template <class T1, class T2, class T3>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi){ return ndnboost::math::ellint_3(k, v, phi, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v){ return ndnboost::math::ellint_3(k, v, Policy()); }\
+\
+   using ndnboost::math::max_factorial;\
+   template <class RT>\
+   inline RT factorial(unsigned int i) { return ndnboost::math::factorial<RT>(i, Policy()); }\
+   using ndnboost::math::unchecked_factorial;\
+   template <class RT>\
+   inline RT double_factorial(unsigned i){ return ndnboost::math::double_factorial<RT>(i, Policy()); }\
+   template <class RT>\
+   inline typename ndnboost::math::tools::promote_args<RT>::type falling_factorial(RT x, unsigned n){ return ndnboost::math::falling_factorial(x, n, Policy()); }\
+   template <class RT>\
+   inline typename ndnboost::math::tools::promote_args<RT>::type rising_factorial(RT x, unsigned n){ return ndnboost::math::rising_factorial(x, n, Policy()); }\
+\
+   template <class RT>\
+   inline typename ndnboost::math::tools::promote_args<RT>::type tgamma(RT z){ return ndnboost::math::tgamma(z, Policy()); }\
+\
+   template <class RT>\
+   inline typename ndnboost::math::tools::promote_args<RT>::type tgamma1pm1(RT z){ return ndnboost::math::tgamma1pm1(z, Policy()); }\
+\
+   template <class RT1, class RT2>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z){ return ndnboost::math::tgamma(a, z, Policy()); }\
+\
+   template <class RT>\
+   inline typename ndnboost::math::tools::promote_args<RT>::type lgamma(RT z, int* sign){ return ndnboost::math::lgamma(z, sign, Policy()); }\
+\
+   template <class RT>\
+   inline typename ndnboost::math::tools::promote_args<RT>::type lgamma(RT x){ return ndnboost::math::lgamma(x, Policy()); }\
+\
+   template <class RT1, class RT2>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z){ return ndnboost::math::tgamma_lower(a, z, Policy()); }\
+\
+   template <class RT1, class RT2>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z){ return ndnboost::math::gamma_q(a, z, Policy()); }\
+\
+   template <class RT1, class RT2>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z){ return ndnboost::math::gamma_p(a, z, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta){ return ndnboost::math::tgamma_delta_ratio(z, delta, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b) { return ndnboost::math::tgamma_ratio(a, b, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x){ return ndnboost::math::gamma_p_derivative(a, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p){ return ndnboost::math::gamma_p_inv(a, p, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p){ return ndnboost::math::gamma_p_inva(a, p, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q){ return ndnboost::math::gamma_q_inv(a, q, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q){ return ndnboost::math::gamma_q_inva(a, q, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type digamma(T x){ return ndnboost::math::digamma(x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type \
+   hypot(T1 x, T2 y){ return ndnboost::math::hypot(x, y, Policy()); }\
+\
+   template <class RT>\
+   inline typename ndnboost::math::tools::promote_args<RT>::type cbrt(RT z){ return ndnboost::math::cbrt(z, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type log1p(T x){ return ndnboost::math::log1p(x, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type log1pmx(T x){ return ndnboost::math::log1pmx(x, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type expm1(T x){ return ndnboost::math::expm1(x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::tools::promote_args<T1, T2>::type \
+   powm1(const T1 a, const T2 z){ return ndnboost::math::powm1(a, z, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type sqrt1pm1(const T& val){ return ndnboost::math::sqrt1pm1(val, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type sinc_pi(T x){ return ndnboost::math::sinc_pi(x, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type sinhc_pi(T x){ return ndnboost::math::sinhc_pi(x, Policy()); }\
+\
+   template<typename T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type asinh(const T x){ return ndnboost::math::asinh(x, Policy()); }\
+\
+   template<typename T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type acosh(const T x){ return ndnboost::math::acosh(x, Policy()); }\
+\
+   template<typename T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type atanh(const T x){ return ndnboost::math::atanh(x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j(T1 v, T2 x)\
+   { return ndnboost::math::cyl_bessel_j(v, x, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel(unsigned v, T x)\
+   { return ndnboost::math::sph_bessel(v, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+   cyl_bessel_i(T1 v, T2 x) { return ndnboost::math::cyl_bessel_i(v, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+   cyl_bessel_k(T1 v, T2 x) { return ndnboost::math::cyl_bessel_k(v, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename ndnboost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+   cyl_neumann(T1 v, T2 x){ return ndnboost::math::cyl_neumann(v, x, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::detail::bessel_traits<T, T, Policy >::result_type \
+   sph_neumann(unsigned v, T x){ return ndnboost::math::sph_neumann(v, x, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_bessel_j_zero(T v, int m)\
+   { return ndnboost::math::cyl_bessel_j_zero(v, m, Policy()); }\
+\
+template <class OutputIterator, class T>\
+   inline void cyl_bessel_j_zero(T v,\
+                                 int start_index,\
+                                 unsigned number_of_zeros,\
+                                 OutputIterator out_it)\
+   { ndnboost::math::cyl_bessel_j_zero(v, start_index, number_of_zeros, out_it, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_neumann_zero(T v, int m)\
+   { return ndnboost::math::cyl_neumann_zero(v, m, Policy()); }\
+\
+template <class OutputIterator, class T>\
+   inline void cyl_neumann_zero(T v,\
+                                int start_index,\
+                                unsigned number_of_zeros,\
+                                OutputIterator out_it)\
+   { ndnboost::math::cyl_neumann_zero(v, start_index, number_of_zeros, out_it, Policy()); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type sin_pi(T x){ return ndnboost::math::sin_pi(x); }\
+\
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type cos_pi(T x){ return ndnboost::math::cos_pi(x); }\
+\
+   using ndnboost::math::fpclassify;\
+   using ndnboost::math::isfinite;\
+   using ndnboost::math::isinf;\
+   using ndnboost::math::isnan;\
+   using ndnboost::math::isnormal;\
+   using ndnboost::math::signbit;\
+   using ndnboost::math::sign;\
+   using ndnboost::math::copysign;\
+   using ndnboost::math::changesign;\
+   \
+   template <class T, class U>\
+   inline typename ndnboost::math::tools::promote_args<T,U>::type expint(T const& z, U const& u)\
+   { return ndnboost::math::expint(z, u, Policy()); }\
+   \
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type expint(T z){ return ndnboost::math::expint(z, Policy()); }\
+   \
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type zeta(T s){ return ndnboost::math::zeta(s, Policy()); }\
+   \
+   template <class T>\
+   inline T round(const T& v){ using ndnboost::math::round; return round(v, Policy()); }\
+   \
+   template <class T>\
+   inline int iround(const T& v){ using ndnboost::math::iround; return iround(v, Policy()); }\
+   \
+   template <class T>\
+   inline long lround(const T& v){ using ndnboost::math::lround; return lround(v, Policy()); }\
+   \
+   template <class T>\
+   inline T trunc(const T& v){ using ndnboost::math::trunc; return trunc(v, Policy()); }\
+   \
+   template <class T>\
+   inline int itrunc(const T& v){ using ndnboost::math::itrunc; return itrunc(v, Policy()); }\
+   \
+   template <class T>\
+   inline long ltrunc(const T& v){ using ndnboost::math::ltrunc; return ltrunc(v, Policy()); }\
+   \
+   template <class T>\
+   inline T modf(const T& v, T* ipart){ using ndnboost::math::modf; return modf(v, ipart, Policy()); }\
+   \
+   template <class T>\
+   inline T modf(const T& v, int* ipart){ using ndnboost::math::modf; return modf(v, ipart, Policy()); }\
+   \
+   template <class T>\
+   inline T modf(const T& v, long* ipart){ using ndnboost::math::modf; return modf(v, ipart, Policy()); }\
+   \
+   template <int N, class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type pow(T v){ return ndnboost::math::pow<N>(v, Policy()); }\
+   \
+   template <class T> T nextafter(const T& a, const T& b){ return ndnboost::math::nextafter(a, b, Policy()); }\
+   template <class T> T float_next(const T& a){ return ndnboost::math::float_next(a, Policy()); }\
+   template <class T> T float_prior(const T& a){ return ndnboost::math::float_prior(a, Policy()); }\
+   template <class T> T float_distance(const T& a, const T& b){ return ndnboost::math::float_distance(a, b, Policy()); }\
+   \
+   template <class RT1, class RT2>\
+   inline typename ndnboost::math::tools::promote_args<RT1, RT2>::type owens_t(RT1 a, RT2 z){ return ndnboost::math::owens_t(a, z, Policy()); }\
+   \
+   template <class T1, class T2>\
+   inline std::complex<typename ndnboost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_1(T1 v, T2 x)\
+   {  return ndnboost::math::cyl_hankel_1(v, x, Policy()); }\
+   \
+   template <class T1, class T2>\
+   inline std::complex<typename ndnboost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_2(T1 v, T2 x)\
+   { return ndnboost::math::cyl_hankel_2(v, x, Policy()); }\
+   \
+   template <class T1, class T2>\
+   inline std::complex<typename ndnboost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_1(T1 v, T2 x)\
+   { return ndnboost::math::sph_hankel_1(v, x, Policy()); }\
+   \
+   template <class T1, class T2>\
+   inline std::complex<typename ndnboost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_2(T1 v, T2 x)\
+   { return ndnboost::math::sph_hankel_2(v, x, Policy()); }\
+   \
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn)\
+   { return ndnboost::math::jacobi_elliptic(k, theta, pcn, pdn, Policy()); }\
+   \
+   template <class U, class T>\
+   inline typename ndnboost::math::tools::promote_args<T, U>::type jacobi_sn(U k, T theta)\
+   { return ndnboost::math::jacobi_sn(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename ndnboost::math::tools::promote_args<T, U>::type jacobi_cn(T k, U theta)\
+   { return ndnboost::math::jacobi_cn(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename ndnboost::math::tools::promote_args<T, U>::type jacobi_dn(T k, U theta)\
+   { return ndnboost::math::jacobi_dn(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename ndnboost::math::tools::promote_args<T, U>::type jacobi_cd(T k, U theta)\
+   { return ndnboost::math::jacobi_cd(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename ndnboost::math::tools::promote_args<T, U>::type jacobi_dc(T k, U theta)\
+   { return ndnboost::math::jacobi_dc(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename ndnboost::math::tools::promote_args<T, U>::type jacobi_ns(T k, U theta)\
+   { return ndnboost::math::jacobi_ns(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename ndnboost::math::tools::promote_args<T, U>::type jacobi_sd(T k, U theta)\
+   { return ndnboost::math::jacobi_sd(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename ndnboost::math::tools::promote_args<T, U>::type jacobi_ds(T k, U theta)\
+   { return ndnboost::math::jacobi_ds(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename ndnboost::math::tools::promote_args<T, U>::type jacobi_nc(T k, U theta)\
+   { return ndnboost::math::jacobi_nc(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename ndnboost::math::tools::promote_args<T, U>::type jacobi_nd(T k, U theta)\
+   { return ndnboost::math::jacobi_nd(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename ndnboost::math::tools::promote_args<T, U>::type jacobi_sc(T k, U theta)\
+   { return ndnboost::math::jacobi_sc(k, theta, Policy()); }\
+   \
+   template <class T, class U>\
+   inline typename ndnboost::math::tools::promote_args<T, U>::type jacobi_cs(T k, U theta)\
+   { return ndnboost::math::jacobi_cs(k, theta, Policy()); }\
+   \
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type airy_ai(T x)\
+   {  return ndnboost::math::airy_ai(x, Policy());  }\
+   \
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type airy_bi(T x)\
+   {  return ndnboost::math::airy_bi(x, Policy());  }\
+   \
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type airy_ai_prime(T x)\
+   {  return ndnboost::math::airy_ai_prime(x, Policy());  }\
+   \
+   template <class T>\
+   inline typename ndnboost::math::tools::promote_args<T>::type airy_bi_prime(T x)\
+   {  return ndnboost::math::airy_bi_prime(x, Policy());  }\
+   \
+   template <class T>\
+   inline T airy_ai_zero(int m)\
+   { return ndnboost::math::airy_ai_zero<T>(m, Policy()); }\
+   template <class T, class OutputIterator>\
+   OutputIterator airy_ai_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\
+   { return ndnboost::math::airy_ai_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
+   \
+   template <class T>\
+   inline T airy_bi_zero(int m)\
+   { return ndnboost::math::airy_bi_zero<T>(m, Policy()); }\
+   template <class T, class OutputIterator>\
+   OutputIterator airy_bi_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\
+   { return ndnboost::math::airy_bi_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
+   \
+
+
+
+
+
+#endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP
+
+
diff --git a/ndnboost/math/special_functions/sign.hpp b/ndnboost/math/special_functions/sign.hpp
new file mode 100644
index 0000000..fecacfb
--- /dev/null
+++ b/ndnboost/math/special_functions/sign.hpp
@@ -0,0 +1,150 @@
+//  (C) Copyright John Maddock 2006.
+//  (C) Copyright Johan Rade 2006.
+//  (C) Copyright Paul A. Bristow 2011 (added changesign).
+
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_SIGN_HPP
+#define BOOST_MATH_TOOLS_SIGN_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <ndnboost/math/tools/config.hpp>
+#include <ndnboost/math/special_functions/math_fwd.hpp>
+#include <ndnboost/math/special_functions/detail/fp_traits.hpp>
+
+namespace ndnboost{ namespace math{ 
+
+namespace detail {
+
+  // signbit
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T> 
+    inline int signbit_impl(T x, native_tag const&)
+    {
+        return (std::signbit)(x);
+    }
+#endif
+
+    template<class T> 
+    inline int signbit_impl(T x, generic_tag<true> const&)
+    {
+        return x < 0;
+    }
+
+    template<class T> 
+    inline int signbit_impl(T x, generic_tag<false> const&)
+    {
+        return x < 0;
+    }
+
+    template<class T> 
+    inline int signbit_impl(T x, ieee_copy_all_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        return a & traits::sign ? 1 : 0;
+    }
+
+    template<class T> 
+    inline int signbit_impl(T x, ieee_copy_leading_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+
+        return a & traits::sign ? 1 : 0;
+    }
+
+    // Changesign
+
+    template<class T>
+    inline T (changesign_impl)(T x, generic_tag<true> const&)
+    {
+        return -x;
+    }
+
+    template<class T>
+    inline T (changesign_impl)(T x, generic_tag<false> const&)
+    {
+        return -x;
+    }
+
+
+    template<class T>
+    inline T changesign_impl(T x, ieee_copy_all_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::sign_change_type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a ^= traits::sign;
+        traits::set_bits(x,a);
+        return x;
+    }
+
+    template<class T>
+    inline T (changesign_impl)(T x, ieee_copy_leading_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::sign_change_type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a ^= traits::sign;
+        traits::set_bits(x,a);
+        return x;
+    }
+
+
+}   // namespace detail
+
+template<class T> int (signbit)(T x)
+{ 
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   // typedef typename ndnboost::is_floating_point<T>::type fp_tag;
+   typedef typename tools::promote_args<T>::type result_type;
+   return detail::signbit_impl(static_cast<result_type>(x), method());
+}
+
+template <class T>
+inline int sign BOOST_NO_MACRO_EXPAND(const T& z)
+{
+   return (z == 0) ? 0 : (ndnboost::math::signbit)(z) ? -1 : 1;
+}
+
+template <class T> typename tools::promote_args<T>::type (changesign)(const T& x)
+{ //!< \brief return unchanged binary pattern of x, except for change of sign bit. 
+   typedef typename detail::fp_traits<T>::sign_change_type traits;
+   typedef typename traits::method method;
+   // typedef typename ndnboost::is_floating_point<T>::type fp_tag;
+   typedef typename tools::promote_args<T>::type result_type;
+
+   return detail::changesign_impl(static_cast<result_type>(x), method());
+}
+
+template <class T, class U>
+inline typename tools::promote_args<T, U>::type 
+   copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y)
+{
+   BOOST_MATH_STD_USING
+   typedef typename tools::promote_args<T, U>::type result_type;
+   return (ndnboost::math::signbit)(static_cast<result_type>(x)) != (ndnboost::math::signbit)(static_cast<result_type>(y)) 
+      ? (ndnboost::math::changesign)(static_cast<result_type>(x)) : static_cast<result_type>(x);
+}
+
+} // namespace math
+} // namespace ndnboost
+
+
+#endif // BOOST_MATH_TOOLS_SIGN_HPP
+
+
diff --git a/ndnboost/math/tools/config.hpp b/ndnboost/math/tools/config.hpp
new file mode 100644
index 0000000..8a2178c
--- /dev/null
+++ b/ndnboost/math/tools/config.hpp
@@ -0,0 +1,352 @@
+//  Copyright (c) 2006-7 John Maddock
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_CONFIG_HPP
+#define BOOST_MATH_TOOLS_CONFIG_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/cstdint.hpp> // for ndnboost::uintmax_t
+#include <ndnboost/detail/workaround.hpp>
+#include <algorithm>  // for min and max
+#include <ndnboost/config/no_tr1/cmath.hpp>
+#include <climits>
+#include <cfloat>
+#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
+#  include <math.h>
+#endif
+
+#include <ndnboost/math/tools/user.hpp>
+
+#if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \
+   || (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \
+   && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+//
+// Borland post 5.8.2 uses Dinkumware's std C lib which
+// doesn't have true long double precision.  Earlier
+// versions are problematic too:
+//
+#  define BOOST_MATH_NO_REAL_CONCEPT_TESTS
+#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#  define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
+#  include <float.h>
+#endif
+#ifdef __IBMCPP__
+//
+// For reasons I don't unserstand, the tests with IMB's compiler all
+// pass at long double precision, but fail with real_concept, those tests
+// are disabled for now.  (JM 2012).
+#  define BOOST_MATH_NO_REAL_CONCEPT_TESTS
+#endif
+#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+//
+// Darwin's rather strange "double double" is rather hard to
+// support, it should be possible given enough effort though...
+//
+#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+//
+// Intel compiler prior to version 10 has sporadic problems
+// calling the long double overloads of the std lib math functions:
+// calling ::powl is OK, but std::pow(long double, long double) 
+// may segfault depending upon the value of the arguments passed 
+// and the specific Linux distribution.
+//
+// We'll be conservative and disable long double support for this compiler.
+//
+// Comment out this #define and try building the tests to determine whether
+// your Intel compiler version has this issue or not.
+//
+#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if defined(unix) && defined(__INTEL_COMPILER)
+//
+// Intel compiler has sporadic issues compiling std::fpclassify depending on
+// the exact OS version used.  Use our own code for this as we know it works
+// well on Intel processors:
+//
+#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
+#endif
+
+#if defined(BOOST_MSVC) && !defined(_WIN32_WCE)
+   // Better safe than sorry, our tests don't support hardware exceptions:
+#  define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
+#endif
+
+#ifdef __IBMCPP__
+#  define BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS
+#endif
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901))
+#  define BOOST_MATH_USE_C99
+#endif
+
+#if (defined(__hpux) && !defined(__hppa))
+#  define BOOST_MATH_USE_C99
+#endif
+
+#if defined(__GNUC__) && defined(_GLIBCXX_USE_C99)
+#  define BOOST_MATH_USE_C99
+#endif
+
+#if defined(_LIBCPP_VERSION) && !defined(_MSC_VER)
+#  define BOOST_MATH_USE_C99
+#endif
+
+#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \
+  || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \
+  || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))\
+  || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+#  define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY
+#endif
+
+#if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
+
+#  include "ndnboost/type.hpp"
+#  include "ndnboost/non_type.hpp"
+
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)         ndnboost::type<t>* = 0
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)    ndnboost::type<t>*
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)  ndnboost::non_type<t, v>* = 0
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  ndnboost::non_type<t, v>*
+
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)         \
+             , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)    \
+             , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)  \
+             , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  \
+             , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+#else
+
+// no workaround needed: expand to nothing
+
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+
+#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
+
+#if (defined(__SUNPRO_CC) || defined(__hppa) || defined(__GNUC__)) && !defined(BOOST_MATH_SMALL_CONSTANT)
+// Sun's compiler emits a hard error if a constant underflows,
+// as does aCC on PA-RISC, while gcc issues a large number of warnings:
+#  define BOOST_MATH_SMALL_CONSTANT(x) 0
+#else
+#  define BOOST_MATH_SMALL_CONSTANT(x) x
+#endif
+
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
+//
+// Define if constants too large for a float cause "bad"
+// values to be stored in the data, rather than infinity
+// or a suitably large value.
+//
+#  define BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
+#endif
+//
+// Tune performance options for specific compilers:
+//
+#ifdef BOOST_MSVC
+#  define BOOST_MATH_POLY_METHOD 2
+#elif defined(BOOST_INTEL)
+#  define BOOST_MATH_POLY_METHOD 2
+#  define BOOST_MATH_RATIONAL_METHOD 2
+#elif defined(__GNUC__)
+#  define BOOST_MATH_POLY_METHOD 3
+#  define BOOST_MATH_RATIONAL_METHOD 3
+#  define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+#  define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
+#endif
+
+#if defined(BOOST_NO_LONG_LONG) && !defined(BOOST_MATH_INT_TABLE_TYPE)
+#  define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+#  define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
+#endif
+
+//
+// The maximum order of polynomial that will be evaluated 
+// via an unrolled specialisation:
+//
+#ifndef BOOST_MATH_MAX_POLY_ORDER
+#  define BOOST_MATH_MAX_POLY_ORDER 17
+#endif 
+//
+// Set the method used to evaluate polynomials and rationals:
+//
+#ifndef BOOST_MATH_POLY_METHOD
+#  define BOOST_MATH_POLY_METHOD 1
+#endif 
+#ifndef BOOST_MATH_RATIONAL_METHOD
+#  define BOOST_MATH_RATIONAL_METHOD 0
+#endif 
+//
+// decide whether to store constants as integers or reals:
+//
+#ifndef BOOST_MATH_INT_TABLE_TYPE
+#  define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
+#endif
+#ifndef BOOST_MATH_INT_VALUE_SUFFIX
+#  define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF
+#endif
+//
+// Test whether to support __float128:
+//
+#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__)
+//
+// Only enable this when the compiler really is GCC as clang and probably 
+// intel too don't support __float128 yet :-(
+//
+#  define BOOST_MATH_USE_FLOAT128
+#endif
+//
+// Check for WinCE with no iostream support:
+//
+#if defined(_WIN32_WCE) && !defined(__SGI_STL_PORT)
+#  define BOOST_MATH_NO_LEXICAL_CAST
+#endif
+
+//
+// Helper macro for controlling the FP behaviour:
+//
+#ifndef BOOST_MATH_CONTROL_FP
+#  define BOOST_MATH_CONTROL_FP
+#endif
+//
+// Helper macro for using statements:
+//
+#define BOOST_MATH_STD_USING_CORE \
+   using std::abs;\
+   using std::acos;\
+   using std::cos;\
+   using std::fmod;\
+   using std::modf;\
+   using std::tan;\
+   using std::asin;\
+   using std::cosh;\
+   using std::frexp;\
+   using std::pow;\
+   using std::tanh;\
+   using std::atan;\
+   using std::exp;\
+   using std::ldexp;\
+   using std::sin;\
+   using std::atan2;\
+   using std::fabs;\
+   using std::log;\
+   using std::sinh;\
+   using std::ceil;\
+   using std::floor;\
+   using std::log10;\
+   using std::sqrt;
+
+#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE
+
+namespace ndnboost{ namespace math{
+namespace tools
+{
+
+template <class T>
+inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c)
+{
+   return (std::max)((std::max)(a, b), c);
+}
+
+template <class T>
+inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d)
+{
+   return (std::max)((std::max)(a, b), (std::max)(c, d));
+}
+
+} // namespace tools
+
+template <class T>
+void suppress_unused_variable_warning(const T&)
+{
+}
+
+}} // namespace ndnboost namespace math
+
+#if ((defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H)
+
+   #include <ndnboost/detail/fenv.hpp>
+
+#  ifdef FE_ALL_EXCEPT
+
+namespace ndnboost{ namespace math{
+   namespace detail
+   {
+   struct fpu_guard
+   {
+      fpu_guard()
+      {
+         fegetexceptflag(&m_flags, FE_ALL_EXCEPT);
+         feclearexcept(FE_ALL_EXCEPT);
+      }
+      ~fpu_guard()
+      {
+         fesetexceptflag(&m_flags, FE_ALL_EXCEPT);
+      }
+   private:
+      fexcept_t m_flags;
+   };
+
+   } // namespace detail
+   }} // namespaces
+
+#    define BOOST_FPU_EXCEPTION_GUARD ndnboost::math::detail::fpu_guard local_guard_object;
+#    define BOOST_MATH_INSTRUMENT_FPU do{ fexcept_t cpu_flags; fegetexceptflag(&cpu_flags, FE_ALL_EXCEPT); BOOST_MATH_INSTRUMENT_VARIABLE(cpu_flags); } while(0); 
+
+#  else
+
+#    define BOOST_FPU_EXCEPTION_GUARD
+#    define BOOST_MATH_INSTRUMENT_FPU
+
+#  endif
+
+#else // All other platforms.
+#  define BOOST_FPU_EXCEPTION_GUARD
+#  define BOOST_MATH_INSTRUMENT_FPU
+#endif
+
+#ifdef BOOST_MATH_INSTRUMENT
+
+#  include <iostream>
+#  include <iomanip>
+#  include <typeinfo>
+
+#  define BOOST_MATH_INSTRUMENT_CODE(x) \
+      std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl;
+#  define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name)
+
+#else
+
+#  define BOOST_MATH_INSTRUMENT_CODE(x)
+#  define BOOST_MATH_INSTRUMENT_VARIABLE(name)
+
+#endif
+
+#endif // BOOST_MATH_TOOLS_CONFIG_HPP
+
+
+
+
+
diff --git a/ndnboost/math/tools/promotion.hpp b/ndnboost/math/tools/promotion.hpp
new file mode 100644
index 0000000..aab6d34
--- /dev/null
+++ b/ndnboost/math/tools/promotion.hpp
@@ -0,0 +1,150 @@
+// boost\math\tools\promotion.hpp
+
+// Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2006.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// Promote arguments functions to allow math functions to have arguments
+// provided as integer OR real (floating-point, built-in or UDT)
+// (called ArithmeticType in functions that use promotion)
+// that help to reduce the risk of creating multiple instantiations.
+// Allows creation of an inline wrapper that forwards to a foo(RT, RT) function,
+// so you never get to instantiate any mixed foo(RT, IT) functions.
+
+#ifndef BOOST_MATH_PROMOTION_HPP
+#define BOOST_MATH_PROMOTION_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+// Boost type traits:
+#include <ndnboost/math/tools/config.hpp>
+#include <ndnboost/type_traits/is_floating_point.hpp> // for ndnboost::is_floating_point;
+#include <ndnboost/type_traits/is_integral.hpp> // for ndnboost::is_integral
+#include <ndnboost/type_traits/is_convertible.hpp> // for ndnboost::is_convertible
+#include <ndnboost/type_traits/is_same.hpp>// for ndnboost::is_same
+#include <ndnboost/type_traits/remove_cv.hpp>// for ndnboost::remove_cv
+// Boost Template meta programming:
+#include <ndnboost/mpl/if.hpp> // for ndnboost::mpl::if_c.
+#include <ndnboost/mpl/and.hpp> // for ndnboost::mpl::if_c.
+#include <ndnboost/mpl/or.hpp> // for ndnboost::mpl::if_c.
+#include <ndnboost/mpl/not.hpp> // for ndnboost::mpl::if_c.
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#include <ndnboost/static_assert.hpp>
+#endif
+
+namespace ndnboost
+{
+  namespace math
+  {
+    namespace tools
+    {
+      // If either T1 or T2 is an integer type,
+      // pretend it was a double (for the purposes of further analysis).
+      // Then pick the wider of the two floating-point types
+      // as the actual signature to forward to.
+      // For example:
+      // foo(int, short) -> double foo(double, double);
+      // foo(int, float) -> double foo(double, double);
+      // Note: NOT float foo(float, float)
+      // foo(int, double) -> foo(double, double);
+      // foo(double, float) -> double foo(double, double);
+      // foo(double, float) -> double foo(double, double);
+      // foo(any-int-or-float-type, long double) -> foo(long double, long double);
+      // but ONLY float foo(float, float) is unchanged.
+      // So the only way to get an entirely float version is to call foo(1.F, 2.F),
+      // But since most (all?) the math functions convert to double internally,
+      // probably there would not be the hoped-for gain by using float here.
+
+      // This follows the C-compatible conversion rules of pow, etc
+      // where pow(int, float) is converted to pow(double, double).
+
+      template <class T>
+      struct promote_arg
+      { // If T is integral type, then promote to double.
+        typedef typename mpl::if_<is_integral<T>, double, T>::type type;
+      };
+      // These full specialisations reduce mpl::if_ usage and speed up
+      // compilation:
+      template <> struct promote_arg<float> { typedef float type; };
+      template <> struct promote_arg<double>{ typedef double type; };
+      template <> struct promote_arg<long double> { typedef long double type; };
+      template <> struct promote_arg<int> {  typedef double type; };
+
+      template <class T1, class T2>
+      struct promote_args_2
+      { // Promote, if necessary, & pick the wider of the two floating-point types.
+        // for both parameter types, if integral promote to double.
+        typedef typename promote_arg<T1>::type T1P; // T1 perhaps promoted.
+        typedef typename promote_arg<T2>::type T2P; // T2 perhaps promoted.
+
+        typedef typename mpl::if_<
+          typename mpl::and_<is_floating_point<T1P>, is_floating_point<T2P> >::type, // both T1P and T2P are floating-point?
+          typename mpl::if_< typename mpl::or_<is_same<long double, T1P>, is_same<long double, T2P> >::type, // either long double?
+            long double, // then result type is long double.
+            typename mpl::if_< typename mpl::or_<is_same<double, T1P>, is_same<double, T2P> >::type, // either double?
+            double, // result type is double.
+          float // else result type is float.
+          >::type
+          >::type,
+          // else one or the other is a user-defined type:
+          typename mpl::if_< typename mpl::and_<mpl::not_<is_floating_point<T2P> >, ::ndnboost::is_convertible<T1P, T2P> >, T2P, T1P>::type>::type type;
+      }; // promote_arg2
+      // These full specialisations reduce mpl::if_ usage and speed up
+      // compilation:
+      template <> struct promote_args_2<float, float> { typedef float type; };
+      template <> struct promote_args_2<double, double>{ typedef double type; };
+      template <> struct promote_args_2<long double, long double> { typedef long double type; };
+      template <> struct promote_args_2<int, int> {  typedef double type; };
+      template <> struct promote_args_2<int, float> {  typedef double type; };
+      template <> struct promote_args_2<float, int> {  typedef double type; };
+      template <> struct promote_args_2<int, double> {  typedef double type; };
+      template <> struct promote_args_2<double, int> {  typedef double type; };
+      template <> struct promote_args_2<int, long double> {  typedef long double type; };
+      template <> struct promote_args_2<long double, int> {  typedef long double type; };
+      template <> struct promote_args_2<float, double> {  typedef double type; };
+      template <> struct promote_args_2<double, float> {  typedef double type; };
+      template <> struct promote_args_2<float, long double> {  typedef long double type; };
+      template <> struct promote_args_2<long double, float> {  typedef long double type; };
+      template <> struct promote_args_2<double, long double> {  typedef long double type; };
+      template <> struct promote_args_2<long double, double> {  typedef long double type; };
+
+      template <class T1, class T2=float, class T3=float, class T4=float, class T5=float, class T6=float>
+      struct promote_args
+      {
+         typedef typename promote_args_2<
+            typename remove_cv<T1>::type,
+            typename promote_args_2<
+               typename remove_cv<T2>::type,
+               typename promote_args_2<
+                  typename remove_cv<T3>::type,
+                  typename promote_args_2<
+                     typename remove_cv<T4>::type,
+                     typename promote_args_2<
+                        typename remove_cv<T5>::type, typename remove_cv<T6>::type
+                     >::type
+                  >::type
+               >::type
+            >::type
+         >::type type;
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+         //
+         // Guard against use of long double if it's not supported:
+         //
+         BOOST_STATIC_ASSERT((0 == ::ndnboost::is_same<type, long double>::value));
+#endif
+      };
+
+    } // namespace tools
+  } // namespace math
+} // namespace ndnboost
+
+#endif // BOOST_MATH_PROMOTION_HPP
+
diff --git a/ndnboost/math/tools/real_cast.hpp b/ndnboost/math/tools/real_cast.hpp
new file mode 100644
index 0000000..108dcbf
--- /dev/null
+++ b/ndnboost/math/tools/real_cast.hpp
@@ -0,0 +1,29 @@
+//  Copyright John Maddock 2006.
+//  Use, modification and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_REAL_CAST_HPP
+#define BOOST_MATH_TOOLS_REAL_CAST_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+namespace ndnboost{ namespace math
+{
+  namespace tools
+  {
+    template <class To, class T>
+    inline To real_cast(T t)
+    {
+       return static_cast<To>(t);
+    }
+  } // namespace tools
+} // namespace math
+} // namespace ndnboost
+
+#endif // BOOST_MATH_TOOLS_REAL_CAST_HPP
+
+
+
diff --git a/ndnboost/math/tools/user.hpp b/ndnboost/math/tools/user.hpp
new file mode 100644
index 0000000..c1bdaf7
--- /dev/null
+++ b/ndnboost/math/tools/user.hpp
@@ -0,0 +1,97 @@
+// Copyright John Maddock 2007.
+// Copyright Paul A. Bristow 2007.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_USER_HPP
+#define BOOST_MATH_TOOLS_USER_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+// This file can be modified by the user to change the default policies.
+// See "Changing the Policy Defaults" in documentation.
+
+// define this if the platform has no long double functions,
+// or if the long double versions have only double precision:
+//
+// #define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+//
+// Performance tuning options:
+//
+// #define BOOST_MATH_POLY_METHOD 3
+// #define BOOST_MATH_RATIONAL_METHOD 3
+//
+// The maximum order of polynomial that will be evaluated
+// via an unrolled specialisation:
+//
+// #define BOOST_MATH_MAX_POLY_ORDER 17
+//
+// decide whether to store constants as integers or reals:
+//
+// #define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
+
+//
+// Default policies follow:
+//
+// Domain errors:
+//
+// #define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
+//
+// Pole errors:
+//
+// #define BOOST_MATH_POLE_ERROR_POLICY throw_on_error
+//
+// Overflow Errors:
+//
+// #define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error
+//
+// Internal Evaluation Errors:
+//
+// #define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error
+//
+// Underfow:
+//
+// #define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error
+//
+// Denorms:
+//
+// #define BOOST_MATH_DENORM_ERROR_POLICY ignore_error
+//
+// Max digits to use for internal calculations:
+//
+// #define BOOST_MATH_DIGITS10_POLICY 0
+//
+// Promote floats to doubles internally?
+//
+// #define BOOST_MATH_PROMOTE_FLOAT_POLICY true
+//
+// Promote doubles to long double internally:
+//
+// #define BOOST_MATH_PROMOTE_DOUBLE_POLICY true
+//
+// What do discrete quantiles return?
+//
+// #define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards
+//
+// If a function is mathematically undefined
+// (for example the Cauchy distribution has no mean),
+// then do we stop the code from compiling?
+//
+// #define BOOST_MATH_ASSERT_UNDEFINED_POLICY true
+//
+// Maximum series iterstions permitted:
+//
+// #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
+//
+// Maximum root finding steps permitted:
+//
+// define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
+
+#endif // BOOST_MATH_TOOLS_USER_HPP
+
+
diff --git a/ndnboost/mpl/aux_/front_impl.hpp b/ndnboost/mpl/aux_/front_impl.hpp
deleted file mode 100644
index a912eb3..0000000
--- a/ndnboost/mpl/aux_/front_impl.hpp
+++ /dev/null
@@ -1,41 +0,0 @@
-
-#ifndef BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
-#define BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
-
-// Copyright Aleksey Gurtovoy 2000-2004
-//
-// Distributed under the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at 
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/mpl for documentation.
-
-// $Id: front_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
-// $Revision: 49267 $
-
-#include <ndnboost/mpl/front_fwd.hpp>
-#include <ndnboost/mpl/begin_end.hpp>
-#include <ndnboost/mpl/deref.hpp>
-#include <ndnboost/mpl/aux_/traits_lambda_spec.hpp>
-
-namespace ndnboost { namespace mpl {
-
-// default implementation; conrete sequences might override it by 
-// specializing either the 'front_impl' or the primary 'front' template
-
-template< typename Tag >
-struct front_impl
-{
-    template< typename Sequence > struct apply
-    {
-        typedef typename begin<Sequence>::type iter_;
-        typedef typename deref<iter_>::type type;
-    };
-};
-
-BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,front_impl)
-
-}}
-
-#endif // BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
diff --git a/ndnboost/mpl/aux_/joint_iter.hpp b/ndnboost/mpl/aux_/joint_iter.hpp
deleted file mode 100644
index 8adcdf6..0000000
--- a/ndnboost/mpl/aux_/joint_iter.hpp
+++ /dev/null
@@ -1,120 +0,0 @@
-
-#ifndef BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
-#define BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
-
-// Copyright Aleksey Gurtovoy 2000-2004
-//
-// Distributed under the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at 
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/mpl for documentation.
-
-// $Id: joint_iter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
-// $Revision: 49267 $
-
-#include <ndnboost/mpl/next_prior.hpp>
-#include <ndnboost/mpl/deref.hpp>
-#include <ndnboost/mpl/iterator_tags.hpp>
-#include <ndnboost/mpl/aux_/lambda_spec.hpp>
-#include <ndnboost/mpl/aux_/config/ctps.hpp>
-
-#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-#   include <ndnboost/type_traits/is_same.hpp>
-#endif
-
-namespace ndnboost { namespace mpl {
-
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-template<
-      typename Iterator1
-    , typename LastIterator1
-    , typename Iterator2
-    >
-struct joint_iter
-{
-    typedef Iterator1 base;
-    typedef forward_iterator_tag category;
-};
-
-template<
-      typename LastIterator1
-    , typename Iterator2
-    >
-struct joint_iter<LastIterator1,LastIterator1,Iterator2>
-{
-    typedef Iterator2 base;
-    typedef forward_iterator_tag category;
-};
-
-
-template< typename I1, typename L1, typename I2 >
-struct deref< joint_iter<I1,L1,I2> >
-{
-    typedef typename joint_iter<I1,L1,I2>::base base_;
-    typedef typename deref<base_>::type type;
-};
-
-template< typename I1, typename L1, typename I2 >
-struct next< joint_iter<I1,L1,I2> >
-{
-    typedef joint_iter< typename mpl::next<I1>::type,L1,I2 > type;
-};
-
-template< typename L1, typename I2 >
-struct next< joint_iter<L1,L1,I2> >
-{
-    typedef joint_iter< L1,L1,typename mpl::next<I2>::type > type;
-};
-
-#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
-template<
-      typename Iterator1
-    , typename LastIterator1
-    , typename Iterator2
-    >
-struct joint_iter;
-
-template< bool > struct joint_iter_impl
-{
-    template< typename I1, typename L1, typename I2 > struct result_
-    {
-        typedef I1 base;
-        typedef forward_iterator_tag category;
-        typedef joint_iter< typename mpl::next<I1>::type,L1,I2 > next;
-        typedef typename deref<I1>::type type;
-    };
-};
-
-template<> struct joint_iter_impl<true>
-{
-    template< typename I1, typename L1, typename I2 > struct result_
-    {
-        typedef I2 base;
-        typedef forward_iterator_tag category;
-        typedef joint_iter< L1,L1,typename mpl::next<I2>::type > next;
-        typedef typename deref<I2>::type type;
-    };
-};
-
-template<
-      typename Iterator1
-    , typename LastIterator1
-    , typename Iterator2
-    >
-struct joint_iter
-    : joint_iter_impl< is_same<Iterator1,LastIterator1>::value >
-        ::template result_<Iterator1,LastIterator1,Iterator2>
-{
-};
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
-BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, joint_iter)
-
-}}
-
-#endif // BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
diff --git a/ndnboost/mpl/aux_/pop_front_impl.hpp b/ndnboost/mpl/aux_/pop_front_impl.hpp
deleted file mode 100644
index a4ad7ce..0000000
--- a/ndnboost/mpl/aux_/pop_front_impl.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-
-#ifndef BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED
-#define BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED
-
-// Copyright Aleksey Gurtovoy 2000-2004
-//
-// Distributed under the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at 
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/mpl for documentation.
-
-// $Id: pop_front_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
-// $Revision: 49267 $
-
-#include <ndnboost/mpl/pop_front_fwd.hpp>
-#include <ndnboost/mpl/aux_/traits_lambda_spec.hpp>
-#include <ndnboost/mpl/aux_/config/workaround.hpp>
-#include <ndnboost/mpl/aux_/config/msvc.hpp>
-
-namespace ndnboost { namespace mpl {
-
-// no default implementation; the definition is needed to make MSVC happy
-
-template< typename Tag >
-struct pop_front_impl
-{
-    template< typename Sequence > struct apply
-    // conservatively placed, but maybe should go outside surrounding
-    // braces.
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) 
-    {
-        typedef int type;
-    }
-#endif
-    ;
-};
-
-BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, pop_front_impl)
-
-}}
-
-#endif // BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED
diff --git a/ndnboost/mpl/aux_/unwrap.hpp b/ndnboost/mpl/aux_/unwrap.hpp
new file mode 100644
index 0000000..2b755b9
--- /dev/null
+++ b/ndnboost/mpl/aux_/unwrap.hpp
@@ -0,0 +1,47 @@
+
+#ifndef BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED
+#define BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED
+
+// Copyright Peter Dimov and Multi Media Ltd 2001, 2002
+// Copyright David Abrahams 2001
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: unwrap.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/ref.hpp>
+
+namespace ndnboost { namespace mpl { namespace aux {
+
+template< typename F >
+inline
+F& unwrap(F& f, long)
+{
+    return f;
+}
+
+template< typename F >
+inline
+F&
+unwrap(reference_wrapper<F>& f, int)
+{
+    return f;
+}
+
+template< typename F >
+inline
+F&
+unwrap(reference_wrapper<F> const& f, int)
+{
+    return f;
+}
+
+}}}
+
+#endif // BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED
diff --git a/ndnboost/mpl/begin.hpp b/ndnboost/mpl/begin.hpp
deleted file mode 100644
index 81a2cd0..0000000
--- a/ndnboost/mpl/begin.hpp
+++ /dev/null
@@ -1,19 +0,0 @@
-
-#ifndef BOOST_MPL_BEGIN_HPP_INCLUDED
-#define BOOST_MPL_BEGIN_HPP_INCLUDED
-
-// Copyright Aleksey Gurtovoy 2004
-//
-// Distributed under the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at 
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/mpl for documentation.
-
-// $Id: begin.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
-// $Revision: 49267 $
-
-#include <ndnboost/mpl/begin_end.hpp>
-
-#endif // BOOST_MPL_BEGIN_HPP_INCLUDED
diff --git a/ndnboost/mpl/bitand.hpp b/ndnboost/mpl/bitand.hpp
deleted file mode 100644
index 1358edb..0000000
--- a/ndnboost/mpl/bitand.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-
-#ifndef BOOST_MPL_BITAND_HPP_INCLUDED
-#define BOOST_MPL_BITAND_HPP_INCLUDED
-
-// Copyright Aleksey Gurtovoy 2000-2009
-// Copyright Jaap Suter 2003
-//
-// Distributed under the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at 
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/mpl for documentation.
-
-// $Id: bitand.hpp 63520 2010-07-02 08:59:55Z agurtovoy $
-// $Date: 2010-07-02 01:59:55 -0700 (Fri, 02 Jul 2010) $
-// $Revision: 63520 $
-
-// agurt, 23/jan/10: workaround a conflict with <iso646.h> header's 
-// macros, see http://tinyurl.com/ycwdxco; 'defined(bitand)'
-// has to be checked in a separate condition, otherwise GCC complains 
-// about 'bitand' being an alternative token
-#if defined(_MSC_VER) 
-#ifndef __GCCXML__
-#if defined(bitand)
-#   pragma push_macro("bitand")
-#   undef bitand
-#   define bitand(x)
-#endif
-#endif
-#endif
-
-#define AUX778076_OP_NAME   bitand_
-#define AUX778076_OP_PREFIX bitand
-#define AUX778076_OP_TOKEN  &
-#include <ndnboost/mpl/aux_/arithmetic_op.hpp>
-
-#if defined(_MSC_VER)
-#ifndef __GCCXML__
-#if defined(bitand)
-#   pragma pop_macro("bitand")
-#endif
-#endif
-#endif
-
-#endif // BOOST_MPL_BITAND_HPP_INCLUDED
diff --git a/ndnboost/mpl/bitxor.hpp b/ndnboost/mpl/bitxor.hpp
deleted file mode 100644
index cae9992..0000000
--- a/ndnboost/mpl/bitxor.hpp
+++ /dev/null
@@ -1,23 +0,0 @@
-
-#ifndef BOOST_MPL_BITXOR_HPP_INCLUDED
-#define BOOST_MPL_BITXOR_HPP_INCLUDED
-
-// Copyright Aleksey Gurtovoy 2000-2004
-// Copyright Jaap Suter 2003
-//
-// Distributed under the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at 
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/mpl for documentation.
-
-// $Id: bitxor.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
-// $Revision: 49267 $
-
-#define AUX778076_OP_NAME   bitxor_
-#define AUX778076_OP_PREFIX bitxor
-#define AUX778076_OP_TOKEN  ^
-#include <ndnboost/mpl/aux_/arithmetic_op.hpp>
-
-#endif // BOOST_MPL_BITXOR_HPP_INCLUDED
diff --git a/ndnboost/mpl/comparison.hpp b/ndnboost/mpl/comparison.hpp
new file mode 100644
index 0000000..617ea5f
--- /dev/null
+++ b/ndnboost/mpl/comparison.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_COMPARISON_HPP_INCLUDED
+#define BOOST_MPL_COMPARISON_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: comparison.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/equal_to.hpp>
+#include <ndnboost/mpl/not_equal_to.hpp>
+#include <ndnboost/mpl/less.hpp>
+#include <ndnboost/mpl/greater.hpp>
+#include <ndnboost/mpl/less_equal.hpp>
+#include <ndnboost/mpl/greater_equal.hpp>
+
+#endif // BOOST_MPL_COMPARISON_HPP_INCLUDED
diff --git a/ndnboost/mpl/for_each.hpp b/ndnboost/mpl/for_each.hpp
new file mode 100644
index 0000000..a98dc5b
--- /dev/null
+++ b/ndnboost/mpl/for_each.hpp
@@ -0,0 +1,116 @@
+
+#ifndef BOOST_MPL_FOR_EACH_HPP_INCLUDED
+#define BOOST_MPL_FOR_EACH_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2008
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: for_each.hpp 55648 2009-08-18 05:16:53Z agurtovoy $
+// $Date: 2009-08-17 22:16:53 -0700 (Mon, 17 Aug 2009) $
+// $Revision: 55648 $
+
+#include <ndnboost/mpl/is_sequence.hpp>
+#include <ndnboost/mpl/begin_end.hpp>
+#include <ndnboost/mpl/apply.hpp>
+#include <ndnboost/mpl/bool.hpp>
+#include <ndnboost/mpl/next_prior.hpp>
+#include <ndnboost/mpl/deref.hpp>
+#include <ndnboost/mpl/identity.hpp>
+#include <ndnboost/mpl/assert.hpp>
+#include <ndnboost/mpl/aux_/unwrap.hpp>
+
+#include <ndnboost/type_traits/is_same.hpp>
+#include <ndnboost/utility/value_init.hpp>
+
+namespace ndnboost { namespace mpl {
+
+namespace aux {
+
+template< bool done = true >
+struct for_each_impl
+{
+    template<
+          typename Iterator
+        , typename LastIterator
+        , typename TransformFunc
+        , typename F
+        >
+    static void execute(
+          Iterator*
+        , LastIterator*
+        , TransformFunc*
+        , F
+        )
+    {
+    }
+};
+
+template<>
+struct for_each_impl<false>
+{
+    template<
+          typename Iterator
+        , typename LastIterator
+        , typename TransformFunc
+        , typename F
+        >
+    static void execute(
+          Iterator*
+        , LastIterator*
+        , TransformFunc* 
+        , F f
+        )
+    {
+        typedef typename deref<Iterator>::type item;
+        typedef typename apply1<TransformFunc,item>::type arg;
+    
+        // dwa 2002/9/10 -- make sure not to invoke undefined behavior
+        // when we pass arg.
+        value_initialized<arg> x;
+        aux::unwrap(f, 0)(ndnboost::get(x));
+        
+        typedef typename mpl::next<Iterator>::type iter;
+        for_each_impl<ndnboost::is_same<iter,LastIterator>::value>
+            ::execute( static_cast<iter*>(0), static_cast<LastIterator*>(0), static_cast<TransformFunc*>(0), f);
+    }
+};
+
+} // namespace aux
+
+// agurt, 17/mar/02: pointer default parameters are necessary to workaround 
+// MSVC 6.5 function template signature's mangling bug
+template<
+      typename Sequence
+    , typename TransformOp
+    , typename F
+    >
+inline
+void for_each(F f, Sequence* = 0, TransformOp* = 0)
+{
+    BOOST_MPL_ASSERT(( is_sequence<Sequence> ));
+
+    typedef typename begin<Sequence>::type first;
+    typedef typename end<Sequence>::type last;
+
+    aux::for_each_impl< ndnboost::is_same<first,last>::value >
+        ::execute(static_cast<first*>(0), static_cast<last*>(0), static_cast<TransformOp*>(0), f);
+}
+
+template<
+      typename Sequence
+    , typename F
+    >
+inline
+void for_each(F f, Sequence* = 0)
+{
+    for_each<Sequence, identity<> >(f);
+}
+
+}}
+
+#endif // BOOST_MPL_FOR_EACH_HPP_INCLUDED
diff --git a/ndnboost/mpl/front.hpp b/ndnboost/mpl/front.hpp
deleted file mode 100644
index 118b112..0000000
--- a/ndnboost/mpl/front.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-
-#ifndef BOOST_MPL_FRONT_HPP_INCLUDED
-#define BOOST_MPL_FRONT_HPP_INCLUDED
-
-// Copyright Aleksey Gurtovoy 2000-2004
-//
-// Distributed under the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at 
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/mpl for documentation.
-
-// $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
-// $Revision: 49267 $
-
-#include <ndnboost/mpl/front_fwd.hpp>
-#include <ndnboost/mpl/aux_/front_impl.hpp>
-#include <ndnboost/mpl/sequence_tag.hpp>
-#include <ndnboost/mpl/aux_/na_spec.hpp>
-#include <ndnboost/mpl/aux_/lambda_support.hpp>
-
-namespace ndnboost { namespace mpl {
-
-template<
-      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
-    >
-struct front
-    : front_impl< typename sequence_tag<Sequence>::type >
-        ::template apply< Sequence >
-{
-    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,front,(Sequence))
-};
-
-BOOST_MPL_AUX_NA_SPEC(1, front)
-
-}}
-
-#endif // BOOST_MPL_FRONT_HPP_INCLUDED
diff --git a/ndnboost/mpl/greater.hpp b/ndnboost/mpl/greater.hpp
new file mode 100644
index 0000000..53f5db0
--- /dev/null
+++ b/ndnboost/mpl/greater.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_GREATER_HPP_INCLUDED
+#define BOOST_MPL_GREATER_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: greater.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME greater
+#define AUX778076_OP_TOKEN >
+#include <ndnboost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_GREATER_HPP_INCLUDED
diff --git a/ndnboost/mpl/greater_equal.hpp b/ndnboost/mpl/greater_equal.hpp
new file mode 100644
index 0000000..0576e01
--- /dev/null
+++ b/ndnboost/mpl/greater_equal.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
+#define BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: greater_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME greater_equal
+#define AUX778076_OP_TOKEN >=
+#include <ndnboost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
diff --git a/ndnboost/mpl/joint_view.hpp b/ndnboost/mpl/joint_view.hpp
deleted file mode 100644
index 709c822..0000000
--- a/ndnboost/mpl/joint_view.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-
-#ifndef BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
-#define BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
-
-// Copyright Aleksey Gurtovoy 2000-2004
-//
-// Distributed under the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at 
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/mpl for documentation.
-
-// $Id: joint_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
-// $Revision: 49267 $
-
-#include <ndnboost/mpl/aux_/joint_iter.hpp>
-#include <ndnboost/mpl/plus.hpp>
-#include <ndnboost/mpl/size_fwd.hpp>
-#include <ndnboost/mpl/begin_end.hpp>
-#include <ndnboost/mpl/aux_/na_spec.hpp>
-
-namespace ndnboost { namespace mpl {
-
-namespace aux {
-struct joint_view_tag;
-}
-
-template<>
-struct size_impl< aux::joint_view_tag >
-{
-    template < typename JointView > struct apply
-      : plus<
-            size<typename JointView::sequence1_>
-          , size<typename JointView::sequence2_>
-          >
-    {};
-};
-
-template<
-      typename BOOST_MPL_AUX_NA_PARAM(Sequence1_)
-    , typename BOOST_MPL_AUX_NA_PARAM(Sequence2_)
-    >
-struct joint_view
-{
-    typedef typename mpl::begin<Sequence1_>::type   first1_;
-    typedef typename mpl::end<Sequence1_>::type     last1_;
-    typedef typename mpl::begin<Sequence2_>::type   first2_;
-    typedef typename mpl::end<Sequence2_>::type     last2_;
-
-    // agurt, 25/may/03: for the 'size_traits' implementation above
-    typedef Sequence1_ sequence1_;
-    typedef Sequence2_ sequence2_;
-
-    typedef joint_view type;
-    typedef aux::joint_view_tag tag;
-    typedef joint_iter<first1_,last1_,first2_>  begin;
-    typedef joint_iter<last1_,last1_,last2_>    end;
-};
-
-BOOST_MPL_AUX_NA_SPEC(2, joint_view)
-
-}}
-
-#endif // BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
diff --git a/ndnboost/mpl/less_equal.hpp b/ndnboost/mpl/less_equal.hpp
new file mode 100644
index 0000000..9fd7a46
--- /dev/null
+++ b/ndnboost/mpl/less_equal.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_LESS_EQUAL_HPP_INCLUDED
+#define BOOST_MPL_LESS_EQUAL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: less_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME less_equal
+#define AUX778076_OP_TOKEN <=
+#include <ndnboost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_LESS_EQUAL_HPP_INCLUDED
diff --git a/ndnboost/mpl/limits/list.hpp b/ndnboost/mpl/limits/list.hpp
new file mode 100644
index 0000000..6ae7387
--- /dev/null
+++ b/ndnboost/mpl/limits/list.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_LIMITS_LIST_HPP_INCLUDED
+#define BOOST_MPL_LIMITS_LIST_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_LIMIT_LIST_SIZE)
+#   define BOOST_MPL_LIMIT_LIST_SIZE 20
+#endif
+
+#endif // BOOST_MPL_LIMITS_LIST_HPP_INCLUDED
diff --git a/ndnboost/mpl/list.hpp b/ndnboost/mpl/list.hpp
new file mode 100644
index 0000000..8ce6ad5
--- /dev/null
+++ b/ndnboost/mpl/list.hpp
@@ -0,0 +1,57 @@
+
+#ifndef BOOST_MPL_LIST_HPP_INCLUDED
+#define BOOST_MPL_LIST_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <ndnboost/mpl/limits/list.hpp>
+#   include <ndnboost/mpl/aux_/na.hpp>
+#   include <ndnboost/mpl/aux_/config/preprocessor.hpp>
+
+#   include <ndnboost/preprocessor/inc.hpp>
+#   include <ndnboost/preprocessor/cat.hpp>
+#   include <ndnboost/preprocessor/stringize.hpp>
+
+#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
+#   define AUX778076_LIST_HEADER \
+    BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE).hpp \
+    /**/
+#else
+#   define AUX778076_LIST_HEADER \
+    BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE)##.hpp \
+    /**/
+#endif
+
+#   include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_HEADER)
+#   undef AUX778076_LIST_HEADER
+#endif
+
+#include <ndnboost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list.hpp
+#   include <ndnboost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <ndnboost/mpl/limits/list.hpp>
+
+#   define AUX778076_SEQUENCE_NAME list
+#   define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_LIST_SIZE
+#   include <ndnboost/mpl/aux_/sequence_wrapper.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_LIST_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/aux_/O1_size.hpp b/ndnboost/mpl/list/aux_/O1_size.hpp
new file mode 100644
index 0000000..f5fda21
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/O1_size.hpp
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/O1_size_fwd.hpp>
+#include <ndnboost/mpl/list/aux_/tag.hpp>
+
+namespace ndnboost { namespace mpl {
+
+template<>
+struct O1_size_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+        : List::size
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/aux_/begin_end.hpp b/ndnboost/mpl/list/aux_/begin_end.hpp
new file mode 100644
index 0000000..6c3e7ff
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/begin_end.hpp
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/begin_end_fwd.hpp>
+#include <ndnboost/mpl/list/aux_/iterator.hpp>
+#include <ndnboost/mpl/list/aux_/tag.hpp>
+#include <ndnboost/mpl/list/aux_/item.hpp>
+
+namespace ndnboost { namespace mpl {
+
+template<>
+struct begin_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+    {
+        typedef l_iter<typename List::type> type;
+    };
+};
+
+template<>
+struct end_impl< aux::list_tag >
+{
+    template< typename > struct apply
+    {
+        typedef l_iter<l_end> type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/aux_/clear.hpp b/ndnboost/mpl/list/aux_/clear.hpp
new file mode 100644
index 0000000..05cf597
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/clear.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/clear_fwd.hpp>
+#include <ndnboost/mpl/list/aux_/item.hpp>
+#include <ndnboost/mpl/list/aux_/tag.hpp>
+
+namespace ndnboost { namespace mpl {
+
+template<>
+struct clear_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+    {
+        typedef l_end type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/aux_/empty.hpp b/ndnboost/mpl/list/aux_/empty.hpp
new file mode 100644
index 0000000..e40effc
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/empty.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/empty_fwd.hpp>
+#include <ndnboost/mpl/not.hpp>
+#include <ndnboost/mpl/list/aux_/tag.hpp>
+
+namespace ndnboost { namespace mpl {
+
+template<>
+struct empty_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+        : not_<typename List::size>
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/aux_/front.hpp b/ndnboost/mpl/list/aux_/front.hpp
new file mode 100644
index 0000000..dcb43ab
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/front.hpp
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/front_fwd.hpp>
+#include <ndnboost/mpl/list/aux_/tag.hpp>
+
+namespace ndnboost { namespace mpl {
+
+template<>
+struct front_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+    {
+        typedef typename List::item type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/aux_/include_preprocessed.hpp b/ndnboost/mpl/list/aux_/include_preprocessed.hpp
new file mode 100644
index 0000000..8ce5d6e
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/include_preprocessed.hpp
@@ -0,0 +1,35 @@
+
+// Copyright Aleksey Gurtovoy 2001-2006
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
+
+#include <ndnboost/mpl/aux_/config/workaround.hpp>
+
+#include <ndnboost/preprocessor/cat.hpp>
+#include <ndnboost/preprocessor/stringize.hpp>
+
+#   define AUX778076_HEADER \
+    aux_/preprocessed/plain/BOOST_MPL_PREPROCESSED_HEADER \
+/**/
+
+#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700))
+#   define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER)
+#   include AUX778076_INCLUDE_STRING
+#   undef AUX778076_INCLUDE_STRING
+#else
+#   include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER)
+#endif
+
+#   undef AUX778076_HEADER
+
+#undef BOOST_MPL_PREPROCESSED_HEADER
diff --git a/ndnboost/mpl/list/aux_/item.hpp b/ndnboost/mpl/list/aux_/item.hpp
new file mode 100644
index 0000000..3048007
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/item.hpp
@@ -0,0 +1,55 @@
+
+#ifndef BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/long.hpp>
+#include <ndnboost/mpl/list/aux_/tag.hpp>
+#include <ndnboost/mpl/aux_/config/msvc.hpp>
+#include <ndnboost/mpl/aux_/config/workaround.hpp>
+
+namespace ndnboost { namespace mpl {
+
+template<
+      typename Size
+    , typename T
+    , typename Next
+    >
+struct l_item
+{
+// agurt, 17/jul/03: to facilitate the deficient 'is_sequence' implementation 
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+    typedef int begin;
+#endif
+    typedef aux::list_tag tag;
+    typedef l_item type;
+
+    typedef Size size;
+    typedef T item;
+    typedef Next next;
+};
+
+struct l_end
+{
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+    typedef int begin;
+#endif
+    typedef aux::list_tag tag;
+    typedef l_end type;
+    typedef long_<0> size;
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/aux_/iterator.hpp b/ndnboost/mpl/list/aux_/iterator.hpp
new file mode 100644
index 0000000..492f779
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/iterator.hpp
@@ -0,0 +1,76 @@
+
+#ifndef BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/iterator_tags.hpp>
+#include <ndnboost/mpl/next_prior.hpp>
+#include <ndnboost/mpl/deref.hpp>
+#include <ndnboost/mpl/list/aux_/item.hpp>
+#include <ndnboost/mpl/aux_/na.hpp>
+#include <ndnboost/mpl/aux_/lambda_spec.hpp>
+#include <ndnboost/mpl/aux_/config/ctps.hpp>
+
+namespace ndnboost { namespace mpl {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< typename Node >
+struct l_iter
+{
+    typedef aux::l_iter_tag tag;
+    typedef forward_iterator_tag category;
+};
+
+template< typename Node >
+struct deref< l_iter<Node> >
+{
+    typedef typename Node::item type;
+};
+
+template< typename Node >
+struct next< l_iter<Node> >
+{
+    typedef l_iter< typename Node::next > type;
+};
+
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+template< typename Node >
+struct l_iter
+{
+    typedef aux::l_iter_tag tag;
+    typedef forward_iterator_tag category;
+    typedef typename Node::item type;
+    typedef l_iter< typename mpl::next<Node>::type > next;
+};
+
+#endif
+
+
+template<> struct l_iter<l_end>
+{
+    typedef aux::l_iter_tag tag;
+    typedef forward_iterator_tag category;
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+    typedef na type;
+    typedef l_iter next;
+#endif
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, l_iter)
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/aux_/numbered.hpp b/ndnboost/mpl/list/aux_/numbered.hpp
new file mode 100644
index 0000000..052c368
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/numbered.hpp
@@ -0,0 +1,68 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+// Copyright Peter Dimov 2000-2002
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if defined(BOOST_PP_IS_ITERATING)
+
+#include <ndnboost/preprocessor/enum_params.hpp>
+#include <ndnboost/preprocessor/enum_shifted_params.hpp>
+#include <ndnboost/preprocessor/dec.hpp>
+#include <ndnboost/preprocessor/cat.hpp>
+
+#define i BOOST_PP_FRAME_ITERATION(1)
+
+#if i == 1
+
+template<
+      BOOST_PP_ENUM_PARAMS(i, typename T)
+    >
+struct list1
+    : l_item<
+          long_<1>
+        , T0
+        , l_end
+        >
+{
+    typedef list1 type;
+};
+
+#else
+
+#   define MPL_AUX_LIST_TAIL(list, i, T) \
+    BOOST_PP_CAT(list,BOOST_PP_DEC(i))< \
+      BOOST_PP_ENUM_SHIFTED_PARAMS(i, T) \
+    > \
+    /**/
+    
+template<
+      BOOST_PP_ENUM_PARAMS(i, typename T)
+    >
+struct BOOST_PP_CAT(list,i)
+    : l_item<
+          long_<i>
+        , T0
+        , MPL_AUX_LIST_TAIL(list,i,T)
+        >
+{
+    typedef BOOST_PP_CAT(list,i) type;
+};
+
+#   undef MPL_AUX_LIST_TAIL
+
+#endif // i == 1
+
+#undef i
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ndnboost/mpl/list/aux_/numbered_c.hpp b/ndnboost/mpl/list/aux_/numbered_c.hpp
new file mode 100644
index 0000000..7126440
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/numbered_c.hpp
@@ -0,0 +1,71 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numbered_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if defined(BOOST_PP_IS_ITERATING)
+
+#include <ndnboost/preprocessor/enum_params.hpp>
+#include <ndnboost/preprocessor/enum_shifted_params.hpp>
+#include <ndnboost/preprocessor/dec.hpp>
+#include <ndnboost/preprocessor/cat.hpp>
+
+#define i BOOST_PP_FRAME_ITERATION(1)
+
+#if i == 1
+
+template<
+      typename T
+    , BOOST_PP_ENUM_PARAMS(i, T C)
+    >
+struct list1_c
+    : l_item<
+          long_<1>
+        , integral_c<T,C0>
+        , l_end
+        >
+{
+    typedef list1_c type;
+    typedef T value_type;
+};
+
+#else
+
+#   define MPL_AUX_LIST_C_TAIL(list, i, C) \
+    BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_PP_DEC(i)),_c)<T, \
+      BOOST_PP_ENUM_SHIFTED_PARAMS(i, C) \
+    > \
+    /**/
+    
+template<
+      typename T
+    , BOOST_PP_ENUM_PARAMS(i, T C)
+    >
+struct BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c)
+    : l_item<
+          long_<i>
+        , integral_c<T,C0>
+        , MPL_AUX_LIST_C_TAIL(list,i,C)
+        >
+{
+    typedef BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) type;
+    typedef T value_type;
+};
+
+#   undef MPL_AUX_LIST_C_TAIL
+
+#endif // i == 1
+
+#undef i
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/ndnboost/mpl/list/aux_/pop_front.hpp b/ndnboost/mpl/list/aux_/pop_front.hpp
new file mode 100644
index 0000000..27c2dae
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/pop_front.hpp
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: pop_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/pop_front_fwd.hpp>
+#include <ndnboost/mpl/next_prior.hpp>
+#include <ndnboost/mpl/list/aux_/tag.hpp>
+
+namespace ndnboost { namespace mpl {
+
+template<>
+struct pop_front_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+    {
+        typedef typename mpl::next<List>::type type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/aux_/preprocessed/plain/list10.hpp b/ndnboost/mpl/list/aux_/preprocessed/plain/list10.hpp
new file mode 100644
index 0000000..2e8edb2
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/preprocessed/plain/list10.hpp
@@ -0,0 +1,149 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "ndnboost/mpl/list/list10.hpp" header
+// -- DO NOT modify by hand!
+
+namespace ndnboost { namespace mpl {
+
+template<
+      typename T0
+    >
+struct list1
+    : l_item<
+          long_<1>
+        , T0
+        , l_end
+        >
+{
+    typedef list1 type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct list2
+    : l_item<
+          long_<2>
+        , T0
+        , list1<T1>
+        >
+{
+    typedef list2 type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct list3
+    : l_item<
+          long_<3>
+        , T0
+        , list2< T1,T2 >
+        >
+{
+    typedef list3 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct list4
+    : l_item<
+          long_<4>
+        , T0
+        , list3< T1,T2,T3 >
+        >
+{
+    typedef list4 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct list5
+    : l_item<
+          long_<5>
+        , T0
+        , list4< T1,T2,T3,T4 >
+        >
+{
+    typedef list5 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct list6
+    : l_item<
+          long_<6>
+        , T0
+        , list5< T1,T2,T3,T4,T5 >
+        >
+{
+    typedef list6 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct list7
+    : l_item<
+          long_<7>
+        , T0
+        , list6< T1,T2,T3,T4,T5,T6 >
+        >
+{
+    typedef list7 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct list8
+    : l_item<
+          long_<8>
+        , T0
+        , list7< T1,T2,T3,T4,T5,T6,T7 >
+        >
+{
+    typedef list8 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct list9
+    : l_item<
+          long_<9>
+        , T0
+        , list8< T1,T2,T3,T4,T5,T6,T7,T8 >
+        >
+{
+    typedef list9 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct list10
+    : l_item<
+          long_<10>
+        , T0
+        , list9< T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+        >
+{
+    typedef list10 type;
+};
+
+}}
diff --git a/ndnboost/mpl/list/aux_/preprocessed/plain/list10_c.hpp b/ndnboost/mpl/list/aux_/preprocessed/plain/list10_c.hpp
new file mode 100644
index 0000000..bfc0582
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/preprocessed/plain/list10_c.hpp
@@ -0,0 +1,164 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "ndnboost/mpl/list/list10_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace ndnboost { namespace mpl {
+
+template<
+      typename T
+    , T C0
+    >
+struct list1_c
+    : l_item<
+          long_<1>
+        , integral_c< T,C0 >
+        , l_end
+        >
+{
+    typedef list1_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1
+    >
+struct list2_c
+    : l_item<
+          long_<2>
+        , integral_c< T,C0 >
+        , list1_c< T,C1 >
+        >
+{
+    typedef list2_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2
+    >
+struct list3_c
+    : l_item<
+          long_<3>
+        , integral_c< T,C0 >
+        , list2_c< T,C1,C2 >
+        >
+{
+    typedef list3_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3
+    >
+struct list4_c
+    : l_item<
+          long_<4>
+        , integral_c< T,C0 >
+        , list3_c< T,C1,C2,C3 >
+        >
+{
+    typedef list4_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4
+    >
+struct list5_c
+    : l_item<
+          long_<5>
+        , integral_c< T,C0 >
+        , list4_c< T,C1,C2,C3,C4 >
+        >
+{
+    typedef list5_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5
+    >
+struct list6_c
+    : l_item<
+          long_<6>
+        , integral_c< T,C0 >
+        , list5_c< T,C1,C2,C3,C4,C5 >
+        >
+{
+    typedef list6_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6
+    >
+struct list7_c
+    : l_item<
+          long_<7>
+        , integral_c< T,C0 >
+        , list6_c< T,C1,C2,C3,C4,C5,C6 >
+        >
+{
+    typedef list7_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7
+    >
+struct list8_c
+    : l_item<
+          long_<8>
+        , integral_c< T,C0 >
+        , list7_c< T,C1,C2,C3,C4,C5,C6,C7 >
+        >
+{
+    typedef list8_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8
+    >
+struct list9_c
+    : l_item<
+          long_<9>
+        , integral_c< T,C0 >
+        , list8_c< T,C1,C2,C3,C4,C5,C6,C7,C8 >
+        >
+{
+    typedef list9_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9
+    >
+struct list10_c
+    : l_item<
+          long_<10>
+        , integral_c< T,C0 >
+        , list9_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+        >
+{
+    typedef list10_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ndnboost/mpl/list/aux_/preprocessed/plain/list20.hpp b/ndnboost/mpl/list/aux_/preprocessed/plain/list20.hpp
new file mode 100644
index 0000000..8b64295
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/preprocessed/plain/list20.hpp
@@ -0,0 +1,169 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "ndnboost/mpl/list/list20.hpp" header
+// -- DO NOT modify by hand!
+
+namespace ndnboost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct list11
+    : l_item<
+          long_<11>
+        , T0
+        , list10< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+        >
+{
+    typedef list11 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct list12
+    : l_item<
+          long_<12>
+        , T0
+        , list11< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+        >
+{
+    typedef list12 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct list13
+    : l_item<
+          long_<13>
+        , T0
+        , list12< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+        >
+{
+    typedef list13 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct list14
+    : l_item<
+          long_<14>
+        , T0
+        , list13< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+        >
+{
+    typedef list14 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct list15
+    : l_item<
+          long_<15>
+        , T0
+        , list14< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >
+        >
+{
+    typedef list15 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct list16
+    : l_item<
+          long_<16>
+        , T0
+        , list15< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >
+        >
+{
+    typedef list16 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct list17
+    : l_item<
+          long_<17>
+        , T0
+        , list16< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >
+        >
+{
+    typedef list17 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct list18
+    : l_item<
+          long_<18>
+        , T0
+        , list17< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >
+        >
+{
+    typedef list18 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct list19
+    : l_item<
+          long_<19>
+        , T0
+        , list18< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >
+        >
+{
+    typedef list19 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list20
+    : l_item<
+          long_<20>
+        , T0
+        , list19< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >
+        >
+{
+    typedef list20 type;
+};
+
+}}
diff --git a/ndnboost/mpl/list/aux_/preprocessed/plain/list20_c.hpp b/ndnboost/mpl/list/aux_/preprocessed/plain/list20_c.hpp
new file mode 100644
index 0000000..ec34def
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/preprocessed/plain/list20_c.hpp
@@ -0,0 +1,173 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "ndnboost/mpl/list/list20_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace ndnboost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    >
+struct list11_c
+    : l_item<
+          long_<11>
+        , integral_c< T,C0 >
+        , list10_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+        >
+{
+    typedef list11_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11
+    >
+struct list12_c
+    : l_item<
+          long_<12>
+        , integral_c< T,C0 >
+        , list11_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+        >
+{
+    typedef list12_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12
+    >
+struct list13_c
+    : l_item<
+          long_<13>
+        , integral_c< T,C0 >
+        , list12_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+        >
+{
+    typedef list13_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13
+    >
+struct list14_c
+    : l_item<
+          long_<14>
+        , integral_c< T,C0 >
+        , list13_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >
+        >
+{
+    typedef list14_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14
+    >
+struct list15_c
+    : l_item<
+          long_<15>
+        , integral_c< T,C0 >
+        , list14_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >
+        >
+{
+    typedef list15_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15
+    >
+struct list16_c
+    : l_item<
+          long_<16>
+        , integral_c< T,C0 >
+        , list15_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >
+        >
+{
+    typedef list16_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16
+    >
+struct list17_c
+    : l_item<
+          long_<17>
+        , integral_c< T,C0 >
+        , list16_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >
+        >
+{
+    typedef list17_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17
+    >
+struct list18_c
+    : l_item<
+          long_<18>
+        , integral_c< T,C0 >
+        , list17_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >
+        >
+{
+    typedef list18_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18
+    >
+struct list19_c
+    : l_item<
+          long_<19>
+        , integral_c< T,C0 >
+        , list18_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >
+        >
+{
+    typedef list19_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19
+    >
+struct list20_c
+    : l_item<
+          long_<20>
+        , integral_c< T,C0 >
+        , list19_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >
+        >
+{
+    typedef list20_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ndnboost/mpl/list/aux_/preprocessed/plain/list30.hpp b/ndnboost/mpl/list/aux_/preprocessed/plain/list30.hpp
new file mode 100644
index 0000000..5cdcac7
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/preprocessed/plain/list30.hpp
@@ -0,0 +1,189 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "ndnboost/mpl/list/list30.hpp" header
+// -- DO NOT modify by hand!
+
+namespace ndnboost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20
+    >
+struct list21
+    : l_item<
+          long_<21>
+        , T0
+        , list20< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 >
+        >
+{
+    typedef list21 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21
+    >
+struct list22
+    : l_item<
+          long_<22>
+        , T0
+        , list21< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 >
+        >
+{
+    typedef list22 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22
+    >
+struct list23
+    : l_item<
+          long_<23>
+        , T0
+        , list22< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 >
+        >
+{
+    typedef list23 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23
+    >
+struct list24
+    : l_item<
+          long_<24>
+        , T0
+        , list23< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 >
+        >
+{
+    typedef list24 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    >
+struct list25
+    : l_item<
+          long_<25>
+        , T0
+        , list24< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 >
+        >
+{
+    typedef list25 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25
+    >
+struct list26
+    : l_item<
+          long_<26>
+        , T0
+        , list25< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 >
+        >
+{
+    typedef list26 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26
+    >
+struct list27
+    : l_item<
+          long_<27>
+        , T0
+        , list26< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 >
+        >
+{
+    typedef list27 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27
+    >
+struct list28
+    : l_item<
+          long_<28>
+        , T0
+        , list27< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 >
+        >
+{
+    typedef list28 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28
+    >
+struct list29
+    : l_item<
+          long_<29>
+        , T0
+        , list28< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 >
+        >
+{
+    typedef list29 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    >
+struct list30
+    : l_item<
+          long_<30>
+        , T0
+        , list29< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 >
+        >
+{
+    typedef list30 type;
+};
+
+}}
diff --git a/ndnboost/mpl/list/aux_/preprocessed/plain/list30_c.hpp b/ndnboost/mpl/list/aux_/preprocessed/plain/list30_c.hpp
new file mode 100644
index 0000000..3398150
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/preprocessed/plain/list30_c.hpp
@@ -0,0 +1,183 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "ndnboost/mpl/list/list30_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace ndnboost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    >
+struct list21_c
+    : l_item<
+          long_<21>
+        , integral_c< T,C0 >
+        , list20_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 >
+        >
+{
+    typedef list21_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21
+    >
+struct list22_c
+    : l_item<
+          long_<22>
+        , integral_c< T,C0 >
+        , list21_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 >
+        >
+{
+    typedef list22_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22
+    >
+struct list23_c
+    : l_item<
+          long_<23>
+        , integral_c< T,C0 >
+        , list22_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 >
+        >
+{
+    typedef list23_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23
+    >
+struct list24_c
+    : l_item<
+          long_<24>
+        , integral_c< T,C0 >
+        , list23_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 >
+        >
+{
+    typedef list24_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24
+    >
+struct list25_c
+    : l_item<
+          long_<25>
+        , integral_c< T,C0 >
+        , list24_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 >
+        >
+{
+    typedef list25_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25
+    >
+struct list26_c
+    : l_item<
+          long_<26>
+        , integral_c< T,C0 >
+        , list25_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 >
+        >
+{
+    typedef list26_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26
+    >
+struct list27_c
+    : l_item<
+          long_<27>
+        , integral_c< T,C0 >
+        , list26_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 >
+        >
+{
+    typedef list27_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27
+    >
+struct list28_c
+    : l_item<
+          long_<28>
+        , integral_c< T,C0 >
+        , list27_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 >
+        >
+{
+    typedef list28_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28
+    >
+struct list29_c
+    : l_item<
+          long_<29>
+        , integral_c< T,C0 >
+        , list28_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 >
+        >
+{
+    typedef list29_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29
+    >
+struct list30_c
+    : l_item<
+          long_<30>
+        , integral_c< T,C0 >
+        , list29_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 >
+        >
+{
+    typedef list30_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ndnboost/mpl/list/aux_/preprocessed/plain/list40.hpp b/ndnboost/mpl/list/aux_/preprocessed/plain/list40.hpp
new file mode 100644
index 0000000..810ae99
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/preprocessed/plain/list40.hpp
@@ -0,0 +1,209 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "ndnboost/mpl/list/list40.hpp" header
+// -- DO NOT modify by hand!
+
+namespace ndnboost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30
+    >
+struct list31
+    : l_item<
+          long_<31>
+        , T0
+        , list30< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 >
+        >
+{
+    typedef list31 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31
+    >
+struct list32
+    : l_item<
+          long_<32>
+        , T0
+        , list31< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 >
+        >
+{
+    typedef list32 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32
+    >
+struct list33
+    : l_item<
+          long_<33>
+        , T0
+        , list32< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 >
+        >
+{
+    typedef list33 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33
+    >
+struct list34
+    : l_item<
+          long_<34>
+        , T0
+        , list33< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 >
+        >
+{
+    typedef list34 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    >
+struct list35
+    : l_item<
+          long_<35>
+        , T0
+        , list34< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 >
+        >
+{
+    typedef list35 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35
+    >
+struct list36
+    : l_item<
+          long_<36>
+        , T0
+        , list35< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 >
+        >
+{
+    typedef list36 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36
+    >
+struct list37
+    : l_item<
+          long_<37>
+        , T0
+        , list36< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 >
+        >
+{
+    typedef list37 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37
+    >
+struct list38
+    : l_item<
+          long_<38>
+        , T0
+        , list37< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 >
+        >
+{
+    typedef list38 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38
+    >
+struct list39
+    : l_item<
+          long_<39>
+        , T0
+        , list38< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 >
+        >
+{
+    typedef list39 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    >
+struct list40
+    : l_item<
+          long_<40>
+        , T0
+        , list39< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 >
+        >
+{
+    typedef list40 type;
+};
+
+}}
diff --git a/ndnboost/mpl/list/aux_/preprocessed/plain/list40_c.hpp b/ndnboost/mpl/list/aux_/preprocessed/plain/list40_c.hpp
new file mode 100644
index 0000000..18ed649
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/preprocessed/plain/list40_c.hpp
@@ -0,0 +1,193 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "ndnboost/mpl/list/list40_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace ndnboost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    >
+struct list31_c
+    : l_item<
+          long_<31>
+        , integral_c< T,C0 >
+        , list30_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 >
+        >
+{
+    typedef list31_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31
+    >
+struct list32_c
+    : l_item<
+          long_<32>
+        , integral_c< T,C0 >
+        , list31_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 >
+        >
+{
+    typedef list32_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32
+    >
+struct list33_c
+    : l_item<
+          long_<33>
+        , integral_c< T,C0 >
+        , list32_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 >
+        >
+{
+    typedef list33_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33
+    >
+struct list34_c
+    : l_item<
+          long_<34>
+        , integral_c< T,C0 >
+        , list33_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 >
+        >
+{
+    typedef list34_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34
+    >
+struct list35_c
+    : l_item<
+          long_<35>
+        , integral_c< T,C0 >
+        , list34_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 >
+        >
+{
+    typedef list35_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35
+    >
+struct list36_c
+    : l_item<
+          long_<36>
+        , integral_c< T,C0 >
+        , list35_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 >
+        >
+{
+    typedef list36_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36
+    >
+struct list37_c
+    : l_item<
+          long_<37>
+        , integral_c< T,C0 >
+        , list36_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 >
+        >
+{
+    typedef list37_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37
+    >
+struct list38_c
+    : l_item<
+          long_<38>
+        , integral_c< T,C0 >
+        , list37_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 >
+        >
+{
+    typedef list38_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38
+    >
+struct list39_c
+    : l_item<
+          long_<39>
+        , integral_c< T,C0 >
+        , list38_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 >
+        >
+{
+    typedef list39_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39
+    >
+struct list40_c
+    : l_item<
+          long_<40>
+        , integral_c< T,C0 >
+        , list39_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 >
+        >
+{
+    typedef list40_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ndnboost/mpl/list/aux_/preprocessed/plain/list50.hpp b/ndnboost/mpl/list/aux_/preprocessed/plain/list50.hpp
new file mode 100644
index 0000000..5b8fda5
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/preprocessed/plain/list50.hpp
@@ -0,0 +1,229 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "ndnboost/mpl/list/list50.hpp" header
+// -- DO NOT modify by hand!
+
+namespace ndnboost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40
+    >
+struct list41
+    : l_item<
+          long_<41>
+        , T0
+        , list40< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 >
+        >
+{
+    typedef list41 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41
+    >
+struct list42
+    : l_item<
+          long_<42>
+        , T0
+        , list41< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 >
+        >
+{
+    typedef list42 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42
+    >
+struct list43
+    : l_item<
+          long_<43>
+        , T0
+        , list42< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 >
+        >
+{
+    typedef list43 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43
+    >
+struct list44
+    : l_item<
+          long_<44>
+        , T0
+        , list43< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 >
+        >
+{
+    typedef list44 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    >
+struct list45
+    : l_item<
+          long_<45>
+        , T0
+        , list44< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 >
+        >
+{
+    typedef list45 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45
+    >
+struct list46
+    : l_item<
+          long_<46>
+        , T0
+        , list45< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 >
+        >
+{
+    typedef list46 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46
+    >
+struct list47
+    : l_item<
+          long_<47>
+        , T0
+        , list46< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 >
+        >
+{
+    typedef list47 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47
+    >
+struct list48
+    : l_item<
+          long_<48>
+        , T0
+        , list47< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 >
+        >
+{
+    typedef list48 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48
+    >
+struct list49
+    : l_item<
+          long_<49>
+        , T0
+        , list48< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 >
+        >
+{
+    typedef list49 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48, typename T49
+    >
+struct list50
+    : l_item<
+          long_<50>
+        , T0
+        , list49< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49 >
+        >
+{
+    typedef list50 type;
+};
+
+}}
diff --git a/ndnboost/mpl/list/aux_/preprocessed/plain/list50_c.hpp b/ndnboost/mpl/list/aux_/preprocessed/plain/list50_c.hpp
new file mode 100644
index 0000000..d0f619e
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/preprocessed/plain/list50_c.hpp
@@ -0,0 +1,203 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+// Preprocessed version of "ndnboost/mpl/list/list50_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace ndnboost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    >
+struct list41_c
+    : l_item<
+          long_<41>
+        , integral_c< T,C0 >
+        , list40_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 >
+        >
+{
+    typedef list41_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41
+    >
+struct list42_c
+    : l_item<
+          long_<42>
+        , integral_c< T,C0 >
+        , list41_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 >
+        >
+{
+    typedef list42_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42
+    >
+struct list43_c
+    : l_item<
+          long_<43>
+        , integral_c< T,C0 >
+        , list42_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 >
+        >
+{
+    typedef list43_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43
+    >
+struct list44_c
+    : l_item<
+          long_<44>
+        , integral_c< T,C0 >
+        , list43_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 >
+        >
+{
+    typedef list44_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44
+    >
+struct list45_c
+    : l_item<
+          long_<45>
+        , integral_c< T,C0 >
+        , list44_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 >
+        >
+{
+    typedef list45_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45
+    >
+struct list46_c
+    : l_item<
+          long_<46>
+        , integral_c< T,C0 >
+        , list45_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 >
+        >
+{
+    typedef list46_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46
+    >
+struct list47_c
+    : l_item<
+          long_<47>
+        , integral_c< T,C0 >
+        , list46_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 >
+        >
+{
+    typedef list47_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47
+    >
+struct list48_c
+    : l_item<
+          long_<48>
+        , integral_c< T,C0 >
+        , list47_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 >
+        >
+{
+    typedef list48_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48
+    >
+struct list49_c
+    : l_item<
+          long_<49>
+        , integral_c< T,C0 >
+        , list48_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 >
+        >
+{
+    typedef list49_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49
+    >
+struct list50_c
+    : l_item<
+          long_<50>
+        , integral_c< T,C0 >
+        , list49_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48,C49 >
+        >
+{
+    typedef list50_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/ndnboost/mpl/list/aux_/push_back.hpp b/ndnboost/mpl/list/aux_/push_back.hpp
new file mode 100644
index 0000000..41c2f9c
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/push_back.hpp
@@ -0,0 +1,36 @@
+
+#ifndef BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/push_back_fwd.hpp>
+#include <ndnboost/mpl/bool.hpp>
+#include <ndnboost/mpl/list/aux_/tag.hpp>
+
+namespace ndnboost { namespace mpl {
+
+template< typename Tag > struct has_push_back_impl;
+
+template<>
+struct has_push_back_impl< aux::list_tag >
+{
+    template< typename Seq > struct apply
+        : false_
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/aux_/push_front.hpp b/ndnboost/mpl/list/aux_/push_front.hpp
new file mode 100644
index 0000000..9b0ed8c
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/push_front.hpp
@@ -0,0 +1,39 @@
+
+#ifndef BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/push_front_fwd.hpp>
+#include <ndnboost/mpl/next.hpp>
+#include <ndnboost/mpl/list/aux_/item.hpp>
+#include <ndnboost/mpl/list/aux_/tag.hpp>
+
+namespace ndnboost { namespace mpl {
+
+template<>
+struct push_front_impl< aux::list_tag >
+{
+    template< typename List, typename T > struct apply
+    {
+        typedef l_item<
+              typename next<typename List::size>::type
+            , T
+            , typename List::type
+            > type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/aux_/size.hpp b/ndnboost/mpl/list/aux_/size.hpp
new file mode 100644
index 0000000..8581584
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/size.hpp
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/size_fwd.hpp>
+#include <ndnboost/mpl/list/aux_/tag.hpp>
+
+namespace ndnboost { namespace mpl {
+
+template<>
+struct size_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+        : List::size
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/aux_/tag.hpp b/ndnboost/mpl/list/aux_/tag.hpp
new file mode 100644
index 0000000..2322a81
--- /dev/null
+++ b/ndnboost/mpl/list/aux_/tag.hpp
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+namespace ndnboost { namespace mpl { namespace aux {
+
+struct list_tag;
+struct l_iter_tag;
+
+}}}
+
+#endif // BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/list0.hpp b/ndnboost/mpl/list/list0.hpp
new file mode 100644
index 0000000..3cd88e7
--- /dev/null
+++ b/ndnboost/mpl/list/list0.hpp
@@ -0,0 +1,42 @@
+
+#ifndef BOOST_MPL_LIST_LIST0_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST0_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/long.hpp>
+#include <ndnboost/mpl/aux_/na.hpp>
+#include <ndnboost/mpl/list/aux_/push_front.hpp>
+#include <ndnboost/mpl/list/aux_/pop_front.hpp>
+#include <ndnboost/mpl/list/aux_/push_back.hpp>
+#include <ndnboost/mpl/list/aux_/front.hpp>
+#include <ndnboost/mpl/list/aux_/clear.hpp>
+#include <ndnboost/mpl/list/aux_/O1_size.hpp>
+#include <ndnboost/mpl/list/aux_/size.hpp>
+#include <ndnboost/mpl/list/aux_/empty.hpp>
+#include <ndnboost/mpl/list/aux_/begin_end.hpp>
+#include <ndnboost/mpl/list/aux_/item.hpp>
+
+namespace ndnboost { namespace mpl {
+
+template< typename Dummy = na > struct list0;
+
+template<> struct list0<na>
+    : l_end
+{
+    typedef l_end type;
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_LIST0_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/list0_c.hpp b/ndnboost/mpl/list/list0_c.hpp
new file mode 100644
index 0000000..882436a
--- /dev/null
+++ b/ndnboost/mpl/list/list0_c.hpp
@@ -0,0 +1,31 @@
+
+#ifndef BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list0_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#include <ndnboost/mpl/list/list0.hpp>
+#include <ndnboost/mpl/integral_c.hpp>
+
+namespace ndnboost { namespace mpl {
+
+template< typename T > struct list0_c
+    : l_end
+{
+    typedef l_end type;
+    typedef T value_type;
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/list10.hpp b/ndnboost/mpl/list/list10.hpp
new file mode 100644
index 0000000..f78cf33
--- /dev/null
+++ b/ndnboost/mpl/list/list10.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST10_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST10_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <ndnboost/mpl/list/list0.hpp>
+#endif
+
+#include <ndnboost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list10.hpp
+#   include <ndnboost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <ndnboost/preprocessor/iterate.hpp>
+
+namespace ndnboost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(1, 10, <ndnboost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST10_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/list10_c.hpp b/ndnboost/mpl/list/list10_c.hpp
new file mode 100644
index 0000000..86f3d89
--- /dev/null
+++ b/ndnboost/mpl/list/list10_c.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list10_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <ndnboost/mpl/list/list0_c.hpp>
+#endif
+
+#include <ndnboost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list10_c.hpp
+#   include <ndnboost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <ndnboost/preprocessor/iterate.hpp>
+
+namespace ndnboost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(1, 10, <ndnboost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/list20.hpp b/ndnboost/mpl/list/list20.hpp
new file mode 100644
index 0000000..a9dd822
--- /dev/null
+++ b/ndnboost/mpl/list/list20.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST20_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST20_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <ndnboost/mpl/list/list10.hpp>
+#endif
+
+#include <ndnboost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list20.hpp
+#   include <ndnboost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <ndnboost/preprocessor/iterate.hpp>
+
+namespace ndnboost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(11, 20, <ndnboost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST20_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/list20_c.hpp b/ndnboost/mpl/list/list20_c.hpp
new file mode 100644
index 0000000..deb2125
--- /dev/null
+++ b/ndnboost/mpl/list/list20_c.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list20_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <ndnboost/mpl/list/list10_c.hpp>
+#endif
+
+#include <ndnboost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list20_c.hpp
+#   include <ndnboost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <ndnboost/preprocessor/iterate.hpp>
+
+namespace ndnboost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(11, 20, <ndnboost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/list30.hpp b/ndnboost/mpl/list/list30.hpp
new file mode 100644
index 0000000..eaade39
--- /dev/null
+++ b/ndnboost/mpl/list/list30.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST30_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST30_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <ndnboost/mpl/list/list20.hpp>
+#endif
+
+#include <ndnboost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list30.hpp
+#   include <ndnboost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <ndnboost/preprocessor/iterate.hpp>
+
+namespace ndnboost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(21, 30, <ndnboost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST30_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/list30_c.hpp b/ndnboost/mpl/list/list30_c.hpp
new file mode 100644
index 0000000..6f9aa3c
--- /dev/null
+++ b/ndnboost/mpl/list/list30_c.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list30_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <ndnboost/mpl/list/list20_c.hpp>
+#endif
+
+#include <ndnboost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list30_c.hpp
+#   include <ndnboost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <ndnboost/preprocessor/iterate.hpp>
+
+namespace ndnboost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(21, 30, <ndnboost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/list40.hpp b/ndnboost/mpl/list/list40.hpp
new file mode 100644
index 0000000..1cc4511
--- /dev/null
+++ b/ndnboost/mpl/list/list40.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST40_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST40_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <ndnboost/mpl/list/list30.hpp>
+#endif
+
+#include <ndnboost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list40.hpp
+#   include <ndnboost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <ndnboost/preprocessor/iterate.hpp>
+
+namespace ndnboost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(31, 40, <ndnboost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST40_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/list40_c.hpp b/ndnboost/mpl/list/list40_c.hpp
new file mode 100644
index 0000000..0bea21d
--- /dev/null
+++ b/ndnboost/mpl/list/list40_c.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list40_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <ndnboost/mpl/list/list30_c.hpp>
+#endif
+
+#include <ndnboost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list40_c.hpp
+#   include <ndnboost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <ndnboost/preprocessor/iterate.hpp>
+
+namespace ndnboost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(31, 40, <ndnboost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/list50.hpp b/ndnboost/mpl/list/list50.hpp
new file mode 100644
index 0000000..5850c5a
--- /dev/null
+++ b/ndnboost/mpl/list/list50.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST50_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST50_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <ndnboost/mpl/list/list40.hpp>
+#endif
+
+#include <ndnboost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list50.hpp
+#   include <ndnboost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <ndnboost/preprocessor/iterate.hpp>
+
+namespace ndnboost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(41, 50, <ndnboost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST50_HPP_INCLUDED
diff --git a/ndnboost/mpl/list/list50_c.hpp b/ndnboost/mpl/list/list50_c.hpp
new file mode 100644
index 0000000..12142f8
--- /dev/null
+++ b/ndnboost/mpl/list/list50_c.hpp
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list50_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <ndnboost/mpl/list/list40_c.hpp>
+#endif
+
+#include <ndnboost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list50_c.hpp
+#   include <ndnboost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <ndnboost/preprocessor/iterate.hpp>
+
+namespace ndnboost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(41, 50, <ndnboost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED
diff --git a/ndnboost/mpl/not_equal_to.hpp b/ndnboost/mpl/not_equal_to.hpp
new file mode 100644
index 0000000..3698bf6
--- /dev/null
+++ b/ndnboost/mpl/not_equal_to.hpp
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED
+#define BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// Distributed under the Boost Software License, Version 1.0. 
+// (See accompanying file LICENSE_1_0.txt or copy at 
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: not_equal_to.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME not_equal_to
+#define AUX778076_OP_TOKEN !=
+#include <ndnboost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED
diff --git a/ndnboost/mpl/pop_front.hpp b/ndnboost/mpl/pop_front.hpp
deleted file mode 100644
index fe7f3cb..0000000
--- a/ndnboost/mpl/pop_front.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-
-#ifndef BOOST_MPL_POP_FRONT_HPP_INCLUDED
-#define BOOST_MPL_POP_FRONT_HPP_INCLUDED
-
-// Copyright Aleksey Gurtovoy 2000-2004
-//
-// Distributed under the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at 
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/mpl for documentation.
-
-// $Id: pop_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
-// $Revision: 49267 $
-
-#include <ndnboost/mpl/pop_front_fwd.hpp>
-#include <ndnboost/mpl/aux_/pop_front_impl.hpp>
-#include <ndnboost/mpl/sequence_tag.hpp>
-#include <ndnboost/mpl/aux_/na_spec.hpp>
-#include <ndnboost/mpl/aux_/lambda_support.hpp>
-
-namespace ndnboost { namespace mpl {
-
-template<
-      typename BOOST_MPL_AUX_NA_PARAM(Sequence)
-    >
-struct pop_front
-    : pop_front_impl< typename sequence_tag<Sequence>::type >
-        ::template apply< Sequence >
-{
-    BOOST_MPL_AUX_LAMBDA_SUPPORT(1,pop_front,(Sequence))
-};
-
-BOOST_MPL_AUX_NA_SPEC(1, pop_front)
-
-}}
-
-#endif // BOOST_MPL_POP_FRONT_HPP_INCLUDED
diff --git a/ndnboost/mpl/remove.hpp b/ndnboost/mpl/remove.hpp
deleted file mode 100644
index b080cfc..0000000
--- a/ndnboost/mpl/remove.hpp
+++ /dev/null
@@ -1,52 +0,0 @@
-
-#ifndef BOOST_MPL_REMOVE_HPP_INCLUDED
-#define BOOST_MPL_REMOVE_HPP_INCLUDED
-
-// Copyright Aleksey Gurtovoy 2000-2004
-// Copyright David Abrahams 2003-2004
-//
-// Distributed under the Boost Software License, Version 1.0. 
-// (See accompanying file LICENSE_1_0.txt or copy at 
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/mpl for documentation.
-
-// $Id: remove.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
-// $Revision: 49267 $
-
-#include <ndnboost/mpl/remove_if.hpp>
-#include <ndnboost/mpl/same_as.hpp>
-#include <ndnboost/mpl/aux_/inserter_algorithm.hpp>
-
-namespace ndnboost { namespace mpl {
-
-namespace aux {
-
-template<
-      typename Sequence
-    , typename T
-    , typename Inserter 
-    >
-struct remove_impl
-    : remove_if_impl< Sequence, same_as<T>, Inserter >
-{
-};
-
-template<
-      typename Sequence
-    , typename T
-    , typename Inserter 
-    >
-struct reverse_remove_impl
-    : reverse_remove_if_impl< Sequence, same_as<T>, Inserter >
-{
-};
-
-} // namespace aux
-
-BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, remove)
-
-}}
-
-#endif // BOOST_MPL_REMOVE_HPP_INCLUDED
diff --git a/ndnboost/next_prior.hpp b/ndnboost/next_prior.hpp
new file mode 100644
index 0000000..fe00ff1
--- /dev/null
+++ b/ndnboost/next_prior.hpp
@@ -0,0 +1,51 @@
+//  Boost next_prior.hpp header file  ---------------------------------------//
+
+//  (C) Copyright Dave Abrahams and Daniel Walker 1999-2003. Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/utility for documentation.
+
+//  Revision History
+//  13 Dec 2003  Added next(x, n) and prior(x, n) (Daniel Walker)
+
+#ifndef BOOST_NEXT_PRIOR_HPP_INCLUDED
+#define BOOST_NEXT_PRIOR_HPP_INCLUDED
+
+#include <iterator>
+
+namespace ndnboost {
+
+//  Helper functions for classes like bidirectional iterators not supporting
+//  operator+ and operator-
+//
+//  Usage:
+//    const std::list<T>::iterator p = get_some_iterator();
+//    const std::list<T>::iterator prev = ndnboost::prior(p);
+//    const std::list<T>::iterator next = ndnboost::next(prev, 2);
+
+//  Contributed by Dave Abrahams
+
+template <class T>
+inline T next(T x) { return ++x; }
+
+template <class T, class Distance>
+inline T next(T x, Distance n)
+{
+    std::advance(x, n);
+    return x;
+}
+
+template <class T>
+inline T prior(T x) { return --x; }
+
+template <class T, class Distance>
+inline T prior(T x, Distance n)
+{
+    std::advance(x, -n);
+    return x;
+}
+
+} // namespace ndnboost
+
+#endif  // BOOST_NEXT_PRIOR_HPP_INCLUDED
diff --git a/ndnboost/none.hpp b/ndnboost/none.hpp
new file mode 100644
index 0000000..58c32c6
--- /dev/null
+++ b/ndnboost/none.hpp
@@ -0,0 +1,28 @@
+// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  fernando_cacciola@hotmail.com
+//
+#ifndef BOOST_NONE_17SEP2003_HPP
+#define BOOST_NONE_17SEP2003_HPP
+
+#include "ndnboost/none_t.hpp"
+
+// NOTE: Borland users have to include this header outside any precompiled headers
+// (bcc<=5.64 cannot include instance data in a precompiled header)
+//  -- * To be verified, now that there's no unnamed namespace
+
+namespace ndnboost {
+
+none_t const none = (static_cast<none_t>(0)) ;
+
+} // namespace ndnboost
+
+#endif
+
diff --git a/ndnboost/numeric/conversion/bounds.hpp b/ndnboost/numeric/conversion/bounds.hpp
new file mode 100644
index 0000000..2792ab0
--- /dev/null
+++ b/ndnboost/numeric/conversion/bounds.hpp
@@ -0,0 +1,24 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_BOUNDS_12NOV2002_HPP
+
+#include "ndnboost/numeric/conversion/detail/bounds.hpp"
+
+namespace ndnboost { namespace numeric 
+{
+
+template<class N>
+struct bounds : boundsdetail::get_impl<N>::type
+{} ;
+
+} } // namespace ndnboost::numeric
+
+#endif
diff --git a/ndnboost/numeric/conversion/cast.hpp b/ndnboost/numeric/conversion/cast.hpp
new file mode 100644
index 0000000..de542eb
--- /dev/null
+++ b/ndnboost/numeric/conversion/cast.hpp
@@ -0,0 +1,61 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+//
+//
+//  Revision History
+//
+//    19 Nov 2001 Syntatic changes as suggested by Darin Adler (Fernando Cacciola)
+//    08 Nov 2001 Fixes to accommodate MSVC (Fernando Cacciola)
+//    04 Nov 2001 Fixes to accommodate gcc2.92 (Fernando Cacciola)
+//    30 Oct 2001 Some fixes suggested by Daryle Walker (Fernando Cacciola)
+//    25 Oct 2001 Initial boostification (Fernando Cacciola)
+//    23 Jan 2004 Inital add to cvs (post review)s
+//    22 Jun 2011 Added support for specializing cast policies via numeric_cast_traits (Brandon Kohn).
+//
+#ifndef BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP
+#define BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP
+
+#include <ndnboost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+
+#  include<ndnboost/numeric/conversion/detail/old_numeric_cast.hpp>
+
+#else
+
+#include <ndnboost/type.hpp>
+#include <ndnboost/numeric/conversion/converter.hpp>
+#include <ndnboost/numeric/conversion/numeric_cast_traits.hpp>
+
+namespace ndnboost
+{
+    template <typename Target, typename Source> 
+    inline Target numeric_cast( Source arg )
+    {
+        typedef numeric::conversion_traits<Target, Source>   conv_traits;
+        typedef numeric::numeric_cast_traits<Target, Source> cast_traits;
+        typedef ndnboost::numeric::converter
+            <
+                Target,
+                Source, 
+                conv_traits,
+                typename cast_traits::overflow_policy, 
+                typename cast_traits::rounding_policy, 
+                ndnboost::numeric::raw_converter< conv_traits >,
+                typename cast_traits::range_checking_policy
+            > converter;
+        return converter::convert(arg);
+    }
+    
+    using numeric::bad_numeric_cast;
+} // namespace ndnboost
+
+#endif
+
+#endif
diff --git a/ndnboost/numeric/conversion/conversion_traits.hpp b/ndnboost/numeric/conversion/conversion_traits.hpp
new file mode 100644
index 0000000..468acb1
--- /dev/null
+++ b/ndnboost/numeric/conversion/conversion_traits.hpp
@@ -0,0 +1,39 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_CONVERSION_TRAITS_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_CONVERSION_TRAITS_FLC_12NOV2002_HPP
+
+#include "ndnboost/numeric/conversion/detail/conversion_traits.hpp"
+#include "ndnboost/detail/workaround.hpp"
+#include "ndnboost/config.hpp"
+
+namespace ndnboost { namespace numeric
+{
+
+template<class T, class S>
+struct conversion_traits 
+    : convdetail::get_conversion_traits<T,S>::type 
+{
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+    typedef typename convdetail::get_conversion_traits<T,S>::type base_;
+    typedef typename base_::target_type     target_type;
+    typedef typename base_::source_type     source_type;
+    typedef typename base_::result_type     result_type;
+    typedef typename base_::argument_type   argument_type;
+#endif
+} ;
+
+} } // namespace ndnboost::numeric
+
+#endif
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/ndnboost/numeric/conversion/converter.hpp b/ndnboost/numeric/conversion/converter.hpp
new file mode 100644
index 0000000..ee406a5
--- /dev/null
+++ b/ndnboost/numeric/conversion/converter.hpp
@@ -0,0 +1,68 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP
+
+#include "ndnboost/numeric/conversion/conversion_traits.hpp"
+#include "ndnboost/numeric/conversion/converter_policies.hpp"
+
+#include "ndnboost/numeric/conversion/detail/converter.hpp"
+
+namespace ndnboost { namespace numeric 
+{
+
+template<class T,
+         class S,
+         class Traits           = conversion_traits<T,S>,
+         class OverflowHandler  = def_overflow_handler,
+         class Float2IntRounder = Trunc< BOOST_DEDUCED_TYPENAME Traits::source_type>  ,
+         class RawConverter     = raw_converter<Traits>,
+         class UserRangeChecker = UseInternalRangeChecker
+        >
+struct converter : convdetail::get_converter_impl<Traits,
+                                                  OverflowHandler,
+                                                  Float2IntRounder,
+                                                  RawConverter,
+                                                  UserRangeChecker
+                                                 >::type
+{
+  typedef Traits traits ;
+
+  typedef typename Traits::argument_type argument_type ;
+  typedef typename Traits::result_type   result_type   ;
+
+  result_type operator() ( argument_type s ) const { return this->convert(s) ; }
+} ;
+
+
+
+template<class S,
+         class OverflowHandler  = def_overflow_handler,
+         class Float2IntRounder = Trunc<S>  ,
+         class UserRangeChecker = UseInternalRangeChecker
+        >
+struct make_converter_from
+{
+  template<class T,
+           class Traits       = conversion_traits<T,S>,
+           class RawConverter = raw_converter<Traits>
+          > 
+  struct to
+  {
+    typedef converter<T,S,Traits,OverflowHandler,Float2IntRounder,RawConverter,UserRangeChecker> type ;
+  } ;
+
+} ;
+
+} } // namespace ndnboost::numeric
+
+#endif
+
+
diff --git a/ndnboost/numeric/conversion/converter_policies.hpp b/ndnboost/numeric/conversion/converter_policies.hpp
new file mode 100644
index 0000000..fd02094
--- /dev/null
+++ b/ndnboost/numeric/conversion/converter_policies.hpp
@@ -0,0 +1,194 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+//
+#ifndef BOOST_NUMERIC_CONVERSION_CONVERTER_POLICIES_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_CONVERTER_POLICIES_FLC_12NOV2002_HPP
+
+#include <typeinfo> // for std::bad_cast
+
+#include <ndnboost/config/no_tr1/cmath.hpp> // for std::floor and std::ceil
+#include <ndnboost/throw_exception.hpp>
+
+#include <functional>
+
+#include "ndnboost/type_traits/is_arithmetic.hpp"
+
+#include "ndnboost/mpl/if.hpp"
+#include "ndnboost/mpl/integral_c.hpp"
+
+namespace ndnboost { namespace numeric
+{
+
+template<class S>
+struct Trunc
+{
+  typedef S source_type ;
+
+  typedef typename mpl::if_< is_arithmetic<S>,S,S const&>::type argument_type ;
+
+  static source_type nearbyint ( argument_type s )
+  {
+#if !defined(BOOST_NO_STDC_NAMESPACE)
+    using std::floor ;
+    using std::ceil  ;
+#endif
+
+    return s < static_cast<S>(0) ? ceil(s) : floor(s) ;
+  }
+
+  typedef mpl::integral_c< std::float_round_style, std::round_toward_zero> round_style ;
+} ;
+
+
+
+template<class S>
+struct Floor
+{
+  typedef S source_type ;
+
+  typedef typename mpl::if_< is_arithmetic<S>,S,S const&>::type argument_type ;
+
+  static source_type nearbyint ( argument_type s )
+  {
+#if !defined(BOOST_NO_STDC_NAMESPACE)
+    using std::floor ;
+#endif
+
+    return floor(s) ;
+  }
+
+  typedef mpl::integral_c< std::float_round_style, std::round_toward_neg_infinity> round_style ;
+} ;
+
+template<class S>
+struct Ceil
+{
+  typedef S source_type ;
+
+  typedef typename mpl::if_< is_arithmetic<S>,S,S const&>::type argument_type ;
+
+  static source_type nearbyint ( argument_type s )
+  {
+#if !defined(BOOST_NO_STDC_NAMESPACE)
+    using std::ceil ;
+#endif
+
+    return ceil(s) ;
+  }
+
+  typedef mpl::integral_c< std::float_round_style, std::round_toward_infinity> round_style ;
+} ;
+
+template<class S>
+struct RoundEven
+{
+  typedef S source_type ;
+
+  typedef typename mpl::if_< is_arithmetic<S>,S,S const&>::type argument_type ;
+
+  static source_type nearbyint ( argument_type s )
+  {
+    // Algorithm contributed by Guillaume Melquiond
+
+#if !defined(BOOST_NO_STDC_NAMESPACE)
+    using std::floor ;
+    using std::ceil  ;
+#endif
+
+    // only works inside the range not at the boundaries
+    S prev = floor(s);
+    S next = ceil(s);
+
+    S rt = (s - prev) - (next - s); // remainder type
+
+    S const zero(0.0);
+    S const two(2.0);
+
+    if ( rt < zero )
+      return prev;
+    else if ( rt > zero )
+      return next;
+    else
+    {
+      bool is_prev_even = two * floor(prev / two) == prev ;
+      return ( is_prev_even ? prev : next ) ;
+    }
+  }
+
+  typedef mpl::integral_c< std::float_round_style, std::round_to_nearest> round_style ;
+} ;
+
+
+enum range_check_result
+{
+  cInRange     = 0 ,
+  cNegOverflow = 1 ,
+  cPosOverflow = 2
+} ;
+
+class bad_numeric_cast : public std::bad_cast
+{
+  public:
+
+    virtual const char * what() const throw()
+      {  return "bad numeric conversion: overflow"; }
+};
+
+class negative_overflow : public bad_numeric_cast
+{
+  public:
+
+    virtual const char * what() const throw()
+      {  return "bad numeric conversion: negative overflow"; }
+};
+class positive_overflow : public bad_numeric_cast
+{
+  public:
+
+    virtual const char * what() const throw()
+      { return "bad numeric conversion: positive overflow"; }
+};
+
+struct def_overflow_handler
+{
+  void operator() ( range_check_result r ) // throw(negative_overflow,positive_overflow)
+  {
+#ifndef BOOST_NO_EXCEPTIONS
+    if ( r == cNegOverflow )
+      throw negative_overflow() ;
+    else if ( r == cPosOverflow )
+           throw positive_overflow() ;
+#else
+    if ( r == cNegOverflow )
+      ::ndnboost::throw_exception(negative_overflow()) ;
+    else if ( r == cPosOverflow )
+           ::ndnboost::throw_exception(positive_overflow()) ;
+#endif
+  }
+} ;
+
+struct silent_overflow_handler
+{
+  void operator() ( range_check_result ) {} // throw()
+} ;
+
+template<class Traits>
+struct raw_converter
+{
+  typedef typename Traits::result_type   result_type   ;
+  typedef typename Traits::argument_type argument_type ;
+
+  static result_type low_level_convert ( argument_type s ) { return static_cast<result_type>(s) ; }
+} ;
+
+struct UseInternalRangeChecker {} ;
+
+} } // namespace ndnboost::numeric
+
+#endif
diff --git a/ndnboost/numeric/conversion/detail/bounds.hpp b/ndnboost/numeric/conversion/detail/bounds.hpp
new file mode 100644
index 0000000..34effae
--- /dev/null
+++ b/ndnboost/numeric/conversion/detail/bounds.hpp
@@ -0,0 +1,58 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP
+
+#include "ndnboost/limits.hpp"
+#include "ndnboost/config.hpp"
+#include "ndnboost/mpl/if.hpp"
+
+namespace ndnboost { namespace numeric { namespace boundsdetail
+{
+  template<class N>
+  class Integral
+  {
+      typedef std::numeric_limits<N> limits ;
+
+    public :
+    
+      static N lowest  () { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); }
+      static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
+      static N smallest() { return static_cast<N>(1); }
+  } ;
+
+  template<class N>
+  class Float
+  {
+      typedef std::numeric_limits<N> limits ;
+
+    public :
+    
+      static N lowest  () { return static_cast<N>(-limits::max BOOST_PREVENT_MACRO_SUBSTITUTION ()) ; }
+      static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
+      static N smallest() { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); }
+  } ;
+
+  template<class N>
+  struct get_impl
+  {
+    typedef mpl::bool_< ::std::numeric_limits<N>::is_integer > is_int ;
+
+    typedef Integral<N> impl_int   ;
+    typedef Float   <N> impl_float ;
+
+    typedef typename mpl::if_<is_int,impl_int,impl_float>::type type ;
+  } ;
+
+} } } // namespace ndnboost::numeric::boundsdetail.
+
+#endif
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/ndnboost/numeric/conversion/detail/conversion_traits.hpp b/ndnboost/numeric/conversion/detail/conversion_traits.hpp
new file mode 100644
index 0000000..55c7d86
--- /dev/null
+++ b/ndnboost/numeric/conversion/detail/conversion_traits.hpp
@@ -0,0 +1,97 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_CONVERSION_TRAITS_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_CONVERSION_TRAITS_FLC_12NOV2002_HPP
+
+#include "ndnboost/type_traits/is_arithmetic.hpp"
+#include "ndnboost/type_traits/is_same.hpp"
+#include "ndnboost/type_traits/remove_cv.hpp"
+
+#include "ndnboost/numeric/conversion/detail/meta.hpp"
+#include "ndnboost/numeric/conversion/detail/int_float_mixture.hpp"
+#include "ndnboost/numeric/conversion/detail/sign_mixture.hpp"
+#include "ndnboost/numeric/conversion/detail/udt_builtin_mixture.hpp"
+#include "ndnboost/numeric/conversion/detail/is_subranged.hpp"
+
+namespace ndnboost { namespace numeric { namespace convdetail
+{
+  //-------------------------------------------------------------------
+  // Implementation of the Conversion Traits for T != S
+  //
+  // This is a VISIBLE base class of the user-level conversion_traits<> class.
+  //-------------------------------------------------------------------
+  template<class T,class S>
+  struct non_trivial_traits_impl
+  {
+    typedef typename get_int_float_mixture   <T,S>::type int_float_mixture ;
+    typedef typename get_sign_mixture        <T,S>::type sign_mixture ;
+    typedef typename get_udt_builtin_mixture <T,S>::type udt_builtin_mixture ;
+
+    typedef typename get_is_subranged<T,S>::type subranged ;
+
+    typedef mpl::false_ trivial ;
+
+    typedef T target_type ;
+    typedef S source_type ;
+    typedef T result_type ;
+
+    typedef typename mpl::if_< is_arithmetic<S>, S, S const&>::type argument_type ;
+
+    typedef typename mpl::if_<subranged,S,T>::type supertype ;
+    typedef typename mpl::if_<subranged,T,S>::type subtype   ;
+  } ;
+
+  //-------------------------------------------------------------------
+  // Implementation of the Conversion Traits for T == S
+  //
+  // This is a VISIBLE base class of the user-level conversion_traits<> class.
+  //-------------------------------------------------------------------
+  template<class N>
+  struct trivial_traits_impl
+  {
+    typedef typename get_int_float_mixture  <N,N>::type int_float_mixture ;
+    typedef typename get_sign_mixture       <N,N>::type sign_mixture ;
+    typedef typename get_udt_builtin_mixture<N,N>::type udt_builtin_mixture ;
+
+    typedef mpl::false_ subranged ;
+    typedef mpl::true_  trivial ;
+
+    typedef N        target_type ;
+    typedef N        source_type ;
+    typedef N const& result_type ;
+    typedef N const& argument_type ;
+
+    typedef N supertype ;
+    typedef N subtype  ;
+
+  } ;
+
+  //-------------------------------------------------------------------
+  // Top level implementation selector.
+  //-------------------------------------------------------------------
+  template<class T, class S>
+  struct get_conversion_traits
+  {
+    typedef typename remove_cv<T>::type target_type ;
+    typedef typename remove_cv<S>::type source_type ;
+
+    typedef typename is_same<target_type,source_type>::type is_trivial ;
+
+    typedef trivial_traits_impl    <target_type>             trivial_imp ;
+    typedef non_trivial_traits_impl<target_type,source_type> non_trivial_imp ;
+
+    typedef typename mpl::if_<is_trivial,trivial_imp,non_trivial_imp>::type type ;
+  } ;
+
+} } } // namespace ndnboost::numeric::convdetail
+
+#endif
+
+
diff --git a/ndnboost/numeric/conversion/detail/converter.hpp b/ndnboost/numeric/conversion/detail/converter.hpp
new file mode 100644
index 0000000..813a5c3
--- /dev/null
+++ b/ndnboost/numeric/conversion/detail/converter.hpp
@@ -0,0 +1,602 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+//
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_CONVERTER_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_CONVERTER_FLC_12NOV2002_HPP
+
+#include <functional>
+
+#include "ndnboost/numeric/conversion/detail/meta.hpp"
+#include "ndnboost/numeric/conversion/detail/conversion_traits.hpp"
+#include "ndnboost/numeric/conversion/bounds.hpp"
+
+#include "ndnboost/type_traits/is_same.hpp"
+
+#include "ndnboost/mpl/integral_c.hpp"
+
+namespace ndnboost { namespace numeric { namespace convdetail
+{
+  // Integral Constants representing rounding modes
+  typedef mpl::integral_c<std::float_round_style, std::round_toward_zero>         round2zero_c ;
+  typedef mpl::integral_c<std::float_round_style, std::round_to_nearest>          round2nearest_c ;
+  typedef mpl::integral_c<std::float_round_style, std::round_toward_infinity>     round2inf_c ;
+  typedef mpl::integral_c<std::float_round_style, std::round_toward_neg_infinity> round2neg_inf_c ;
+
+  // Metafunction:
+  //
+  //   for_round_style<RoundStyle,RoundToZero,RoundToNearest,RoundToInf,RoundToNegInf>::type
+  //
+  // {RoundStyle} Integral Constant specifying a round style as declared above.
+  // {RoundToZero,RoundToNearest,RoundToInf,RoundToNegInf} arbitrary types.
+  //
+  // Selects one of the 4 types according to the value of RoundStyle.
+  //
+  template<class RoundStyle,class RoundToZero,class RoundToNearest,class RoundToInf,class RoundToNegInf>
+  struct for_round_style
+  {
+    typedef ct_switch4<RoundStyle
+                       , round2zero_c, round2nearest_c, round2inf_c // round2neg_inf_c
+                       , RoundToZero , RoundToNearest , RoundToInf , RoundToNegInf
+                      > selector ;
+
+    typedef typename selector::type type ;
+  } ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//--------------------------------------------------------------------------
+//                             Range Checking Logic.
+//
+// The range checking logic is built up by combining 1 or 2 predicates.
+// Each predicate is encapsulated in a template class and exposes
+// the static member function 'apply'.
+//
+//--------------------------------------------------------------------------
+
+
+  // Because a particular logic can combine either 1 or two predicates, the following
+  // tags are used to allow the predicate applier to receive 2 preds, but optimize away
+  // one of them if it is 'non-applicable'
+  struct non_applicable { typedef mpl::false_ do_apply ; } ;
+  struct applicable     { typedef mpl::true_  do_apply ; } ;
+
+
+  //--------------------------------------------------------------------------
+  //
+  //                      Range Checking Logic implementations.
+  //
+  // The following classes, collectivelly named 'Predicates', are instantiated within
+  // the corresponding range checkers.
+  // Their static member function 'apply' is called to perform the actual range checking logic.
+  //--------------------------------------------------------------------------
+
+    // s < Lowest(T) ? cNegOverflow : cInRange
+    //
+    template<class Traits>
+    struct LT_LoT : applicable
+    {
+      typedef typename Traits::target_type T ;
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s < static_cast<S>(bounds<T>::lowest()) ? cNegOverflow : cInRange ;
+      }
+    } ;
+
+    // s < 0 ? cNegOverflow : cInRange
+    //
+    template<class Traits>
+    struct LT_Zero : applicable
+    {
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s < static_cast<S>(0) ? cNegOverflow : cInRange ;
+      }
+    } ;
+
+    // s <= Lowest(T)-1 ? cNegOverflow : cInRange
+    //
+    template<class Traits>
+    struct LE_PrevLoT : applicable
+    {
+      typedef typename Traits::target_type T ;
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s <= static_cast<S>(bounds<T>::lowest()) - static_cast<S>(1.0)
+                 ? cNegOverflow : cInRange ;
+      }
+    } ;
+
+    // s < Lowest(T)-0.5 ? cNegOverflow : cInRange
+    //
+    template<class Traits>
+    struct LT_HalfPrevLoT : applicable
+    {
+      typedef typename Traits::target_type T ;
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s < static_cast<S>(bounds<T>::lowest()) - static_cast<S>(0.5)
+                 ? cNegOverflow : cInRange ;
+      }
+    } ;
+
+    // s > Highest(T) ? cPosOverflow : cInRange
+    //
+    template<class Traits>
+    struct GT_HiT : applicable
+    {
+      typedef typename Traits::target_type T ;
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s > static_cast<S>(bounds<T>::highest())
+                 ? cPosOverflow : cInRange ;
+      }
+    } ;
+
+    // s >= Lowest(T) + 1 ? cPosOverflow : cInRange
+    //
+    template<class Traits>
+    struct GE_SuccHiT : applicable
+    {
+      typedef typename Traits::target_type T ;
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s >= static_cast<S>(bounds<T>::highest()) + static_cast<S>(1.0)
+                 ? cPosOverflow : cInRange ;
+      }
+    } ;
+
+    // s >= Lowest(T) + 0.5 ? cPosgOverflow : cInRange
+    //
+    template<class Traits>
+    struct GT_HalfSuccHiT : applicable
+    {
+      typedef typename Traits::target_type T ;
+      typedef typename Traits::source_type S ;
+      typedef typename Traits::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        return s >= static_cast<S>(bounds<T>::highest()) + static_cast<S>(0.5)
+                 ? cPosOverflow : cInRange ;
+      }
+    } ;
+
+
+  //--------------------------------------------------------------------------
+  //
+  // Predicate Combiner.
+  //
+  // This helper classes are used to possibly combine the range checking logic
+  // individually performed by the predicates
+  //
+  //--------------------------------------------------------------------------
+
+
+    // Applies both predicates: first 'PredA', and if it equals 'cInRange', 'PredB'
+    template<class PredA, class PredB>
+    struct applyBoth
+    {
+      typedef typename PredA::argument_type argument_type ;
+
+      static range_check_result apply ( argument_type s )
+      {
+        range_check_result r = PredA::apply(s) ;
+        if ( r == cInRange )
+          r = PredB::apply(s);
+        return r ;
+      }
+    } ;
+
+    template<class PredA, class PredB>
+    struct combine
+    {
+      typedef applyBoth<PredA,PredB> Both ;
+      typedef void                   NNone ; // 'None' is defined as a macro in (/usr/X11R6/include/X11/X.h)
+
+      typedef typename PredA::do_apply do_applyA ;
+      typedef typename PredB::do_apply do_applyB ;
+
+      typedef typename for_both<do_applyA, do_applyB, Both, PredA, PredB, NNone>::type type ;
+    } ;
+
+
+
+
+
+
+
+
+
+
+
+
+//--------------------------------------------------------------------------
+//                             Range Checker classes.
+//
+// The following classes are VISIBLE base classes of the user-level converter<> class.
+// They supply the optimized 'out_of_range()' and 'validate_range()' static member functions
+// visible in the user interface.
+//
+//--------------------------------------------------------------------------
+
+  // Dummy range checker.
+  template<class Traits>
+  struct dummy_range_checker
+  {
+    typedef typename Traits::argument_type argument_type ;
+
+    static range_check_result out_of_range ( argument_type ) { return cInRange ; }
+    static void validate_range ( argument_type ) {}
+  } ;
+
+  // Generic range checker.
+  //
+  // All the range checking logic for all possible combinations of source and target
+  // can be arranged in terms of one or two predicates, which test overflow on both neg/pos 'sides'
+  // of the ranges.
+  //
+  // These predicates are given here as IsNegOverflow and IsPosOverflow.
+  //
+  template<class Traits, class IsNegOverflow, class IsPosOverflow, class OverflowHandler>
+  struct generic_range_checker
+  {
+    typedef OverflowHandler overflow_handler ;
+
+    typedef typename Traits::argument_type argument_type ;
+
+    static range_check_result out_of_range ( argument_type s )
+    {
+      typedef typename combine<IsNegOverflow,IsPosOverflow>::type Predicate ;
+
+      return Predicate::apply(s);
+    }
+
+    static void validate_range ( argument_type s )
+      { OverflowHandler()( out_of_range(s) ) ; }
+  } ;
+
+
+
+//--------------------------------------------------------------------------
+//
+// Selectors for the optimized Range Checker class.
+//
+//--------------------------------------------------------------------------
+
+  template<class Traits,class OverflowHandler>
+  struct GetRC_Sig2Sig_or_Unsig2Unsig
+  {
+    typedef dummy_range_checker<Traits> Dummy ;
+
+    typedef LT_LoT<Traits> Pred1 ;
+    typedef GT_HiT<Traits> Pred2 ;
+
+    typedef generic_range_checker<Traits,Pred1,Pred2,OverflowHandler> Normal ;
+
+    typedef typename Traits::subranged subranged ;
+
+    typedef typename mpl::if_<subranged,Normal,Dummy>::type type ;
+  } ;
+
+  template<class Traits, class OverflowHandler>
+  struct GetRC_Sig2Unsig
+  {
+    typedef LT_Zero<Traits> Pred1 ;
+    typedef GT_HiT <Traits> Pred2 ;
+
+    typedef generic_range_checker<Traits,Pred1,Pred2,OverflowHandler> ChoiceA ;
+
+    typedef generic_range_checker<Traits,Pred1,non_applicable,OverflowHandler> ChoiceB ;
+
+    typedef typename Traits::target_type T ;
+    typedef typename Traits::source_type S ;
+
+    typedef typename subranged_Unsig2Sig<S,T>::type oposite_subranged ;
+
+    typedef typename mpl::not_<oposite_subranged>::type positively_subranged ;
+
+    typedef typename mpl::if_<positively_subranged,ChoiceA,ChoiceB>::type type ;
+  } ;
+
+  template<class Traits, class OverflowHandler>
+  struct GetRC_Unsig2Sig
+  {
+    typedef GT_HiT<Traits> Pred1 ;
+
+    typedef generic_range_checker<Traits,non_applicable,Pred1,OverflowHandler> type ;
+  } ;
+
+  template<class Traits,class OverflowHandler>
+  struct GetRC_Int2Int
+  {
+    typedef GetRC_Sig2Sig_or_Unsig2Unsig<Traits,OverflowHandler> Sig2SigQ     ;
+    typedef GetRC_Sig2Unsig             <Traits,OverflowHandler> Sig2UnsigQ   ;
+    typedef GetRC_Unsig2Sig             <Traits,OverflowHandler> Unsig2SigQ   ;
+    typedef Sig2SigQ                                             Unsig2UnsigQ ;
+
+    typedef typename Traits::sign_mixture sign_mixture ;
+
+    typedef typename
+      for_sign_mixture<sign_mixture,Sig2SigQ,Sig2UnsigQ,Unsig2SigQ,Unsig2UnsigQ>::type
+        selector ;
+
+    typedef typename selector::type type ;
+  } ;
+
+  template<class Traits>
+  struct GetRC_Int2Float
+  {
+    typedef dummy_range_checker<Traits> type ;
+  } ;
+
+  template<class Traits, class OverflowHandler, class Float2IntRounder>
+  struct GetRC_Float2Int
+  {
+    typedef LE_PrevLoT    <Traits> Pred1 ;
+    typedef GE_SuccHiT    <Traits> Pred2 ;
+    typedef LT_HalfPrevLoT<Traits> Pred3 ;
+    typedef GT_HalfSuccHiT<Traits> Pred4 ;
+    typedef GT_HiT        <Traits> Pred5 ;
+    typedef LT_LoT        <Traits> Pred6 ;
+
+    typedef generic_range_checker<Traits,Pred1,Pred2,OverflowHandler> ToZero    ;
+    typedef generic_range_checker<Traits,Pred3,Pred4,OverflowHandler> ToNearest ;
+    typedef generic_range_checker<Traits,Pred1,Pred5,OverflowHandler> ToInf     ;
+    typedef generic_range_checker<Traits,Pred6,Pred2,OverflowHandler> ToNegInf  ;
+
+    typedef typename Float2IntRounder::round_style round_style ;
+
+    typedef typename for_round_style<round_style,ToZero,ToNearest,ToInf,ToNegInf>::type type ;
+  } ;
+
+  template<class Traits, class OverflowHandler>
+  struct GetRC_Float2Float
+  {
+    typedef dummy_range_checker<Traits> Dummy ;
+
+    typedef LT_LoT<Traits> Pred1 ;
+    typedef GT_HiT<Traits> Pred2 ;
+
+    typedef generic_range_checker<Traits,Pred1,Pred2,OverflowHandler> Normal ;
+
+    typedef typename Traits::subranged subranged ;
+
+    typedef typename mpl::if_<subranged,Normal,Dummy>::type type ;
+  } ;
+
+  template<class Traits, class OverflowHandler, class Float2IntRounder>
+  struct GetRC_BuiltIn2BuiltIn
+  {
+    typedef GetRC_Int2Int<Traits,OverflowHandler>                    Int2IntQ ;
+    typedef GetRC_Int2Float<Traits>                                  Int2FloatQ ;
+    typedef GetRC_Float2Int<Traits,OverflowHandler,Float2IntRounder> Float2IntQ ;
+    typedef GetRC_Float2Float<Traits,OverflowHandler>                Float2FloatQ ;
+
+    typedef typename Traits::int_float_mixture int_float_mixture ;
+
+    typedef typename for_int_float_mixture<int_float_mixture, Int2IntQ, Int2FloatQ, Float2IntQ, Float2FloatQ>::type selector ;
+
+    typedef typename selector::type type ;
+  } ;
+
+  template<class Traits, class OverflowHandler, class Float2IntRounder>
+  struct GetRC
+  {
+    typedef GetRC_BuiltIn2BuiltIn<Traits,OverflowHandler,Float2IntRounder> BuiltIn2BuiltInQ ;
+
+    typedef dummy_range_checker<Traits> Dummy ;
+
+    typedef mpl::identity<Dummy> DummyQ ;
+
+    typedef typename Traits::udt_builtin_mixture udt_builtin_mixture ;
+
+    typedef typename for_udt_builtin_mixture<udt_builtin_mixture,BuiltIn2BuiltInQ,DummyQ,DummyQ,DummyQ>::type selector ;
+
+    typedef typename selector::type type ;
+  } ;
+
+
+
+
+//--------------------------------------------------------------------------
+//                             Converter classes.
+//
+// The following classes are VISIBLE base classes of the user-level converter<> class.
+// They supply the optimized 'nearbyint()' and 'convert()' static member functions
+// visible in the user interface.
+//
+//--------------------------------------------------------------------------
+
+  //
+  // Trivial Converter : used when (cv-unqualified) T == (cv-unqualified)  S
+  //
+  template<class Traits>
+  struct trivial_converter_impl : public std::unary_function<  BOOST_DEDUCED_TYPENAME Traits::argument_type
+                                                              ,BOOST_DEDUCED_TYPENAME Traits::result_type
+                                                            >
+                                 ,public dummy_range_checker<Traits>
+  {
+    typedef Traits traits ;
+
+    typedef typename Traits::source_type   source_type   ;
+    typedef typename Traits::argument_type argument_type ;
+    typedef typename Traits::result_type   result_type   ;
+
+    static result_type low_level_convert ( argument_type s ) { return s ; }
+    static source_type nearbyint         ( argument_type s ) { return s ; }
+    static result_type convert           ( argument_type s ) { return s ; }
+  } ;
+
+
+  //
+  // Rounding Converter : used for float to integral conversions.
+  //
+  template<class Traits,class RangeChecker,class RawConverter,class Float2IntRounder>
+  struct rounding_converter : public std::unary_function<  BOOST_DEDUCED_TYPENAME Traits::argument_type
+                                                          ,BOOST_DEDUCED_TYPENAME Traits::result_type
+                                                        >
+                             ,public RangeChecker
+                             ,public Float2IntRounder
+                             ,public RawConverter
+  {
+    typedef RangeChecker     RangeCheckerBase ;
+    typedef Float2IntRounder Float2IntRounderBase ;
+    typedef RawConverter     RawConverterBase ;
+
+    typedef Traits traits ;
+
+    typedef typename Traits::source_type   source_type   ;
+    typedef typename Traits::argument_type argument_type ;
+    typedef typename Traits::result_type   result_type   ;
+
+    static result_type convert ( argument_type s )
+    {
+      RangeCheckerBase::validate_range(s);
+      source_type s1 = Float2IntRounderBase::nearbyint(s);
+      return RawConverterBase::low_level_convert(s1);
+    }
+  } ;
+
+
+  //
+  // Non-Rounding Converter : used for all other conversions.
+  //
+  template<class Traits,class RangeChecker,class RawConverter>
+  struct non_rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type
+                                                             ,BOOST_DEDUCED_TYPENAME Traits::result_type
+                                                           >
+                                 ,public RangeChecker
+                                 ,public RawConverter
+  {
+    typedef RangeChecker RangeCheckerBase ;
+    typedef RawConverter RawConverterBase ;
+
+    typedef Traits traits ;
+
+    typedef typename Traits::source_type   source_type   ;
+    typedef typename Traits::argument_type argument_type ;
+    typedef typename Traits::result_type   result_type   ;
+
+    static source_type nearbyint ( argument_type s ) { return s ; }
+
+    static result_type convert ( argument_type s )
+    {
+      RangeCheckerBase::validate_range(s);
+      return RawConverterBase::low_level_convert(s);
+    }
+  } ;
+
+
+
+
+//--------------------------------------------------------------------------
+//
+// Selectors for the optimized Converter class.
+//
+//--------------------------------------------------------------------------
+
+  template<class Traits,class OverflowHandler,class Float2IntRounder,class RawConverter, class UserRangeChecker>
+  struct get_non_trivial_converter
+  {
+    typedef GetRC<Traits,OverflowHandler,Float2IntRounder> InternalRangeCheckerQ ;
+
+    typedef is_same<UserRangeChecker,UseInternalRangeChecker> use_internal_RC ;
+
+    typedef mpl::identity<UserRangeChecker> UserRangeCheckerQ ;
+
+    typedef typename
+      mpl::eval_if<use_internal_RC,InternalRangeCheckerQ,UserRangeCheckerQ>::type
+        RangeChecker ;
+
+    typedef non_rounding_converter<Traits,RangeChecker,RawConverter>              NonRounding ;
+    typedef rounding_converter<Traits,RangeChecker,RawConverter,Float2IntRounder> Rounding ;
+
+    typedef mpl::identity<NonRounding> NonRoundingQ ;
+    typedef mpl::identity<Rounding>    RoundingQ    ;
+
+    typedef typename Traits::int_float_mixture int_float_mixture ;
+
+    typedef typename
+      for_int_float_mixture<int_float_mixture, NonRoundingQ, NonRoundingQ, RoundingQ, NonRoundingQ>::type
+        selector ;
+
+    typedef typename selector::type type ;
+  } ;
+
+  template< class Traits
+           ,class OverflowHandler
+           ,class Float2IntRounder
+           ,class RawConverter
+           ,class UserRangeChecker
+          >
+  struct get_converter_impl
+  {
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x0561 ) )
+    // bcc55 prefers sometimes template parameters to be explicit local types.
+    // (notice that is is illegal to reuse the names like this)
+    typedef Traits           Traits ;
+    typedef OverflowHandler  OverflowHandler ;
+    typedef Float2IntRounder Float2IntRounder ;
+    typedef RawConverter     RawConverter ;
+    typedef UserRangeChecker UserRangeChecker ;
+#endif
+
+    typedef trivial_converter_impl<Traits> Trivial ;
+    typedef mpl::identity        <Trivial> TrivialQ ;
+
+    typedef get_non_trivial_converter< Traits
+                                      ,OverflowHandler
+                                      ,Float2IntRounder
+                                      ,RawConverter
+                                      ,UserRangeChecker
+                                     > NonTrivialQ ;
+
+    typedef typename Traits::trivial trivial ;
+
+    typedef typename mpl::eval_if<trivial,TrivialQ,NonTrivialQ>::type type ;
+  } ;
+
+} } } // namespace ndnboost::numeric::convdetail
+
+#endif
+
+
diff --git a/ndnboost/numeric/conversion/detail/int_float_mixture.hpp b/ndnboost/numeric/conversion/detail/int_float_mixture.hpp
new file mode 100644
index 0000000..437b56a
--- /dev/null
+++ b/ndnboost/numeric/conversion/detail/int_float_mixture.hpp
@@ -0,0 +1,72 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_INT_FLOAT_MIXTURE_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_INT_FLOAT_MIXTURE_FLC_12NOV2002_HPP
+
+#include "ndnboost/config.hpp"
+#include "ndnboost/limits.hpp"
+
+#include "ndnboost/numeric/conversion/int_float_mixture_enum.hpp"
+#include "ndnboost/numeric/conversion/detail/meta.hpp"
+
+#include "ndnboost/mpl/integral_c.hpp"
+
+namespace ndnboost { namespace numeric { namespace convdetail
+{
+  // Integral Constants for 'IntFloatMixture'
+  typedef mpl::integral_c<int_float_mixture_enum, integral_to_integral> int2int_c ;
+  typedef mpl::integral_c<int_float_mixture_enum, integral_to_float>    int2float_c ;
+  typedef mpl::integral_c<int_float_mixture_enum, float_to_integral>    float2int_c ;
+  typedef mpl::integral_c<int_float_mixture_enum, float_to_float>       float2float_c ;
+
+  // Metafunction:
+  //
+  //   get_int_float_mixture<T,S>::type
+  //
+  // Selects the appropriate Int-Float Mixture Integral Constant for the combination T,S.
+  //
+  template<class T,class S>
+  struct get_int_float_mixture
+  {
+    typedef mpl::bool_< ::std::numeric_limits<S>::is_integer > S_int ;
+    typedef mpl::bool_< ::std::numeric_limits<T>::is_integer > T_int ;
+
+    typedef typename
+      for_both<S_int, T_int, int2int_c, int2float_c, float2int_c, float2float_c>::type
+        type ;
+  } ;
+
+  // Metafunction:
+  //
+  //   for_int_float_mixture<Mixture,int_int,int_float,float_int,float_float>::type
+  //
+  // {Mixture} is one of the Integral Constants for Mixture, declared above.
+  // {int_int,int_float,float_int,float_float} are aribtrary types. (not metafunctions)
+  //
+  // According to the value of 'IntFloatMixture', selects the corresponding type.
+  //
+  template<class IntFloatMixture, class Int2Int, class Int2Float, class Float2Int, class Float2Float>
+  struct for_int_float_mixture
+  {
+    typedef typename
+      ct_switch4<IntFloatMixture
+                 ,int2int_c, int2float_c, float2int_c  // default
+                 ,Int2Int  , Int2Float  , Float2Int  , Float2Float
+                >::type
+        type ;
+  } ;
+
+} } } // namespace ndnboost::numeric::convdetail
+
+#endif
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/ndnboost/numeric/conversion/detail/is_subranged.hpp b/ndnboost/numeric/conversion/detail/is_subranged.hpp
new file mode 100644
index 0000000..6f84872
--- /dev/null
+++ b/ndnboost/numeric/conversion/detail/is_subranged.hpp
@@ -0,0 +1,234 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_IS_SUBRANGED_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_IS_SUBRANGED_FLC_12NOV2002_HPP
+
+#include "ndnboost/config.hpp"
+#include "ndnboost/limits.hpp"
+
+#include "ndnboost/mpl/int.hpp"
+#include "ndnboost/mpl/multiplies.hpp"
+#include "ndnboost/mpl/less.hpp"
+#include "ndnboost/mpl/equal_to.hpp"
+
+#include "ndnboost/type_traits/is_same.hpp"
+
+#include "ndnboost/numeric/conversion/detail/meta.hpp"
+#include "ndnboost/numeric/conversion/detail/int_float_mixture.hpp"
+#include "ndnboost/numeric/conversion/detail/sign_mixture.hpp"
+#include "ndnboost/numeric/conversion/detail/udt_builtin_mixture.hpp"
+
+namespace ndnboost { namespace numeric { namespace convdetail
+{
+  //---------------------------------------------------------------
+  // Implementations of the compile time predicate "T is subranged"
+  //---------------------------------------------------------------
+
+    // for integral to integral conversions
+    template<class T,class S>
+    struct subranged_Sig2Unsig
+    {
+      // Signed to unsigned conversions are 'subranged' because of possible loose
+      // of negative values.
+      typedef mpl::true_ type ;
+    } ;
+
+    // for unsigned integral to signed integral conversions
+    template<class T,class S>
+    struct subranged_Unsig2Sig
+    {
+       // IMPORTANT NOTE:
+       //
+       // This code assumes that signed/unsigned integral values are represented
+       // such that:
+       //
+       //  numeric_limits<signed T>::digits + 1 == numeric_limits<unsigned T>::digits
+       //
+       // The '+1' is required since numeric_limits<>::digits gives 1 bit less for signed integral types.
+       //
+       // This fact is used by the following logic:
+       //
+       //  if ( (numeric_limits<T>::digits+1) < (2*numeric_limits<S>::digits) )
+       //    then the conversion is subranged.
+       //
+
+       typedef mpl::int_< ::std::numeric_limits<S>::digits > S_digits ;
+       typedef mpl::int_< ::std::numeric_limits<T>::digits > T_digits ;
+
+       // T is signed, so take digits+1
+       typedef typename T_digits::next u_T_digits ;
+
+       typedef mpl::int_<2> Two ;
+
+       typedef typename mpl::multiplies<S_digits,Two>::type S_digits_times_2 ;
+
+       typedef typename mpl::less<u_T_digits,S_digits_times_2>::type type ;
+    } ;
+
+    // for integral to integral conversions of the same sign.
+    template<class T,class S>
+    struct subranged_SameSign
+    {
+       // An integral conversion of the same sign is subranged if digits(T) < digits(S).
+
+       typedef mpl::int_< ::std::numeric_limits<S>::digits > S_digits ;
+       typedef mpl::int_< ::std::numeric_limits<T>::digits > T_digits ;
+
+       typedef typename mpl::less<T_digits,S_digits>::type type ;
+    } ;
+
+    // for integral to float conversions
+    template<class T,class S>
+    struct subranged_Int2Float
+    {
+      typedef mpl::false_ type ;
+    } ;
+
+    // for float to integral conversions
+    template<class T,class S>
+    struct subranged_Float2Int
+    {
+      typedef mpl::true_ type ;
+    } ;
+
+    // for float to float conversions
+    template<class T,class S>
+    struct subranged_Float2Float
+    {
+      // If both T and S are floats,
+      // compare exponent bits and if they match, mantisa bits.
+
+      typedef mpl::int_< ::std::numeric_limits<S>::digits > S_mantisa ;
+      typedef mpl::int_< ::std::numeric_limits<T>::digits > T_mantisa ;
+
+      typedef mpl::int_< ::std::numeric_limits<S>::max_exponent > S_exponent ;
+      typedef mpl::int_< ::std::numeric_limits<T>::max_exponent > T_exponent ;
+
+      typedef typename mpl::less<T_exponent,S_exponent>::type T_smaller_exponent ;
+
+      typedef typename mpl::equal_to<T_exponent,S_exponent>::type equal_exponents ;
+
+      typedef mpl::less<T_mantisa,S_mantisa> T_smaller_mantisa ;
+
+      typedef mpl::eval_if<equal_exponents,T_smaller_mantisa,mpl::false_> not_bigger_exponent_case ;
+
+      typedef typename
+        mpl::eval_if<T_smaller_exponent,mpl::true_,not_bigger_exponent_case>::type
+          type ;
+    } ;
+
+    // for Udt to built-in conversions
+    template<class T,class S>
+    struct subranged_Udt2BuiltIn
+    {
+      typedef mpl::true_ type ;
+    } ;
+
+    // for built-in to Udt conversions
+    template<class T,class S>
+    struct subranged_BuiltIn2Udt
+    {
+      typedef mpl::false_ type ;
+    } ;
+
+    // for Udt to Udt conversions
+    template<class T,class S>
+    struct subranged_Udt2Udt
+    {
+      typedef mpl::false_ type ;
+    } ;
+
+  //-------------------------------------------------------------------
+  // Selectors for the implementations of the subranged predicate
+  //-------------------------------------------------------------------
+
+    template<class T,class S>
+    struct get_subranged_Int2Int
+    {
+      typedef subranged_SameSign<T,S>  Sig2Sig     ;
+      typedef subranged_Sig2Unsig<T,S> Sig2Unsig   ;
+      typedef subranged_Unsig2Sig<T,S> Unsig2Sig   ;
+      typedef Sig2Sig                  Unsig2Unsig ;
+
+      typedef typename get_sign_mixture<T,S>::type sign_mixture ;
+
+      typedef typename
+        for_sign_mixture<sign_mixture, Sig2Sig, Sig2Unsig, Unsig2Sig, Unsig2Unsig>::type
+           type ;
+    } ;
+
+    template<class T,class S>
+    struct get_subranged_BuiltIn2BuiltIn
+    {
+      typedef get_subranged_Int2Int<T,S> Int2IntQ ;
+
+      typedef subranged_Int2Float  <T,S> Int2Float   ;
+      typedef subranged_Float2Int  <T,S> Float2Int   ;
+      typedef subranged_Float2Float<T,S> Float2Float ;
+
+      typedef mpl::identity<Int2Float  > Int2FloatQ   ;
+      typedef mpl::identity<Float2Int  > Float2IntQ   ;
+      typedef mpl::identity<Float2Float> Float2FloatQ ;
+
+      typedef typename get_int_float_mixture<T,S>::type int_float_mixture ;
+
+      typedef for_int_float_mixture<int_float_mixture, Int2IntQ, Int2FloatQ, Float2IntQ, Float2FloatQ> for_ ;
+
+      typedef typename for_::type selected ;
+
+      typedef typename selected::type type ;
+    } ;
+
+    template<class T,class S>
+    struct get_subranged
+    {
+      typedef get_subranged_BuiltIn2BuiltIn<T,S> BuiltIn2BuiltInQ ;
+
+      typedef subranged_BuiltIn2Udt<T,S> BuiltIn2Udt ;
+      typedef subranged_Udt2BuiltIn<T,S> Udt2BuiltIn ;
+      typedef subranged_Udt2Udt<T,S>     Udt2Udt ;
+
+      typedef mpl::identity<BuiltIn2Udt> BuiltIn2UdtQ ;
+      typedef mpl::identity<Udt2BuiltIn> Udt2BuiltInQ ;
+      typedef mpl::identity<Udt2Udt    > Udt2UdtQ     ;
+
+      typedef typename get_udt_builtin_mixture<T,S>::type udt_builtin_mixture ;
+      
+      typedef typename
+        for_udt_builtin_mixture<udt_builtin_mixture, BuiltIn2BuiltInQ, BuiltIn2UdtQ, Udt2BuiltInQ, Udt2UdtQ>::type
+          selected ;
+
+      typedef typename selected::type selected2 ;
+ 
+      typedef typename selected2::type type ;
+    } ;
+
+
+  //-------------------------------------------------------------------
+  // Top level implementation selector.
+  //-------------------------------------------------------------------
+  template<class T, class S>
+  struct get_is_subranged
+  {
+    typedef get_subranged<T,S>         non_trivial_case ;
+    typedef mpl::identity<mpl::false_> trivial_case ;
+
+    typedef is_same<T,S> is_trivial ;
+   
+    typedef typename mpl::if_<is_trivial,trivial_case,non_trivial_case>::type selected ;
+    
+    typedef typename selected::type type ;
+  } ;
+
+} } } // namespace ndnboost::numeric::convdetail
+
+#endif
+
+
diff --git a/ndnboost/numeric/conversion/detail/meta.hpp b/ndnboost/numeric/conversion/detail/meta.hpp
new file mode 100644
index 0000000..a79d670
--- /dev/null
+++ b/ndnboost/numeric/conversion/detail/meta.hpp
@@ -0,0 +1,120 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_META_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_META_FLC_12NOV2002_HPP
+
+#include "ndnboost/type_traits/remove_cv.hpp"
+
+#include "ndnboost/mpl/if.hpp"
+#include "ndnboost/mpl/eval_if.hpp"
+#include "ndnboost/mpl/equal_to.hpp"
+#include "ndnboost/mpl/not.hpp"
+#include "ndnboost/mpl/and.hpp"
+#include "ndnboost/mpl/bool.hpp"
+#include "ndnboost/mpl/identity.hpp"
+
+namespace ndnboost { namespace numeric { namespace convdetail
+{
+   template< class T1, class T2>
+   struct equal_to
+   {
+   #if !defined(__BORLANDC__)
+   
+       enum { x = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value == BOOST_MPL_AUX_VALUE_WKND(T2)::value ) };
+           
+       BOOST_STATIC_CONSTANT(bool, value = x);
+           
+       typedef mpl::bool_<value> type;
+       
+   #else
+   
+       BOOST_STATIC_CONSTANT(bool, value = (
+             BOOST_MPL_AUX_VALUE_WKND(T1)::value 
+               == BOOST_MPL_AUX_VALUE_WKND(T2)::value
+           ));
+           
+       typedef mpl::bool_<(
+             BOOST_MPL_AUX_VALUE_WKND(T1)::value 
+               == BOOST_MPL_AUX_VALUE_WKND(T2)::value
+           )> type;
+   #endif
+   };
+    
+// Metafunction:
+  //
+  //   ct_switch4<Value,Case0Val,Case1Val,Case2Val,Case0Type,Case1Type,Case2Type,DefaultType>::type
+  //
+  // {Value,Case(X)Val} are Integral Constants (such as: mpl::int_<>)
+  // {Case(X)Type,DefaultType} are arbitrary types. (not metafunctions)
+  //
+  // Returns Case(X)Type if Val==Case(X)Val; DefaultType otherwise.
+  //
+  template<class Value,
+           class Case0Val,
+           class Case1Val,
+           class Case2Val,
+           class Case0Type,
+           class Case1Type,
+           class Case2Type,
+           class DefaultType
+          >
+  struct ct_switch4
+  {
+    typedef mpl::identity<Case0Type> Case0TypeQ ;
+    typedef mpl::identity<Case1Type> Case1TypeQ ;
+
+    typedef equal_to<Value,Case0Val> is_case0 ;
+    typedef equal_to<Value,Case1Val> is_case1 ;
+    typedef equal_to<Value,Case2Val> is_case2 ;
+
+    typedef mpl::if_<is_case2,Case2Type,DefaultType> choose_2_3Q ;
+    typedef mpl::eval_if<is_case1,Case1TypeQ,choose_2_3Q> choose_1_2_3Q ;
+
+    typedef typename
+      mpl::eval_if<is_case0,Case0TypeQ,choose_1_2_3Q>::type
+        type ;
+  } ;
+
+
+
+
+  // Metafunction:
+  //
+  //   for_both<expr0,expr1,TT,TF,FT,FF>::type
+  //
+  // {exp0,expr1} are Boolean Integral Constants
+  // {TT,TF,FT,FF} are aribtrary types. (not metafunctions)
+  //
+  // According to the combined boolean value of 'expr0 && expr1', selects the corresponding type.
+  //
+  template<class expr0, class expr1, class TT, class TF, class FT, class FF>
+  struct for_both
+  {
+    typedef mpl::identity<TF> TF_Q ;
+    typedef mpl::identity<TT> TT_Q ;
+
+    typedef typename mpl::not_<expr0>::type not_expr0 ;
+    typedef typename mpl::not_<expr1>::type not_expr1 ;
+
+    typedef typename mpl::and_<expr0,expr1>::type     caseTT ;
+    typedef typename mpl::and_<expr0,not_expr1>::type caseTF ;
+    typedef typename mpl::and_<not_expr0,expr1>::type caseFT ;
+
+    typedef mpl::if_<caseFT,FT,FF>                    choose_FT_FF_Q ;
+    typedef mpl::eval_if<caseTF,TF_Q,choose_FT_FF_Q> choose_TF_FT_FF_Q ;
+
+    typedef typename mpl::eval_if<caseTT,TT_Q,choose_TF_FT_FF_Q>::type type ;
+  } ;
+
+} } } // namespace ndnboost::numeric::convdetail
+
+#endif
+
+
diff --git a/ndnboost/numeric/conversion/detail/numeric_cast_traits.hpp b/ndnboost/numeric/conversion/detail/numeric_cast_traits.hpp
new file mode 100644
index 0000000..eaccf5c
--- /dev/null
+++ b/ndnboost/numeric/conversion/detail/numeric_cast_traits.hpp
@@ -0,0 +1,138 @@
+//
+//! Copyright (c) 2011-2012
+//! Brandon Kohn
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#if !defined(BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES)
+
+    #include <ndnboost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp>
+	
+	#if !defined(BOOST_NO_LONG_LONG)
+        #include <ndnboost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp>
+	#endif
+	
+#else
+#if !BOOST_PP_IS_ITERATING
+
+    #include <ndnboost/preprocessor/seq/elem.hpp>
+    #include <ndnboost/preprocessor/seq/size.hpp>
+    #include <ndnboost/preprocessor/iteration/iterate.hpp>
+    
+    #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+        #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits_common.hpp")
+    #endif
+//
+//! Copyright (c) 2011-2012
+//! Brandon Kohn
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+    #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+        #pragma wave option(preserve: 1)
+    #endif
+	
+	//! These are the assumed common built in fundamental types (not typedefs/macros.)
+	#define BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES() \
+        (char)                                            \
+        (signed char)                                     \
+        (unsigned char)                                   \
+        (short)                                           \
+        (unsigned short)                                  \
+        (int)                                             \
+        (unsigned int)                                    \
+        (long)                                            \
+        (unsigned long)                                   \
+        (float)                                           \
+        (double)                                          \
+        (long double)                                     \
+    /***/
+	
+    #define BOOST_NUMERIC_CONVERSION_SEQ_A() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()
+	#define BOOST_NUMERIC_CONVERSION_SEQ_B() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()
+
+namespace ndnboost { namespace numeric {
+
+    #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_A())), <ndnboost/numeric/conversion/detail/numeric_cast_traits.hpp>))
+    #include BOOST_PP_ITERATE()    
+
+}}//namespace ndnboost::numeric;
+
+    #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+        #pragma wave option(output: null)
+    #endif   
+	
+	#if ( defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) ) || !defined(BOOST_NO_LONG_LONG)
+	
+	    #undef BOOST_NUMERIC_CONVERSION_SEQ_A
+	    #undef BOOST_NUMERIC_CONVERSION_SEQ_B
+
+	    #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+            #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits_long_long.hpp")
+        #endif
+
+//
+//! Copyright (c) 2011-2012
+//! Brandon Kohn
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+        #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+            #pragma wave option(preserve: 1)
+        #endif
+
+namespace ndnboost { namespace numeric {
+
+    #define BOOST_NUMERIC_CONVERSION_SEQ_A() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()(ndnboost::long_long_type)(ndnboost::ulong_long_type)
+	#define BOOST_NUMERIC_CONVERSION_SEQ_B() (ndnboost::long_long_type)(ndnboost::ulong_long_type)
+    
+    #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_A())), <ndnboost/numeric/conversion/detail/numeric_cast_traits.hpp>))
+    #include BOOST_PP_ITERATE()    
+
+}}//namespace ndnboost::numeric;
+
+        #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+            #pragma wave option(output: null)
+        #endif   
+	
+	#endif
+		
+    #undef BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES
+	#undef BOOST_NUMERIC_CONVERSION_SEQ_A
+	#undef BOOST_NUMERIC_CONVERSION_SEQ_B
+    
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+
+    #define BOOST_PP_ITERATION_PARAMS_2 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_B())), <ndnboost/numeric/conversion/detail/numeric_cast_traits.hpp>))
+    #include BOOST_PP_ITERATE()
+
+#elif BOOST_PP_ITERATION_DEPTH() == 2
+
+    //! Generate default traits for the specified source and target.
+    #define BOOST_NUMERIC_CONVERSION_A BOOST_PP_FRAME_ITERATION(1)
+    #define BOOST_NUMERIC_CONVERSION_B BOOST_PP_FRAME_ITERATION(2)
+
+    template <>
+    struct numeric_cast_traits
+        <
+            BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_A, BOOST_NUMERIC_CONVERSION_SEQ_A())
+          , BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_B, BOOST_NUMERIC_CONVERSION_SEQ_B())
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_B, BOOST_NUMERIC_CONVERSION_SEQ_B())> rounding_policy;
+    };     
+
+    #undef BOOST_NUMERIC_CONVERSION_A
+    #undef BOOST_NUMERIC_CONVERSION_B
+
+#endif//! Depth 2.
+#endif// BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES
diff --git a/ndnboost/numeric/conversion/detail/old_numeric_cast.hpp b/ndnboost/numeric/conversion/detail/old_numeric_cast.hpp
new file mode 100644
index 0000000..10d9596
--- /dev/null
+++ b/ndnboost/numeric/conversion/detail/old_numeric_cast.hpp
@@ -0,0 +1,339 @@
+//  boost cast.hpp header file  ----------------------------------------------//
+
+//  (C) Copyright Kevlin Henney and Dave Abrahams 1999.
+//  Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/conversion for Documentation.
+
+//  Revision History
+//  23 JUN 05  Code extracted from /boost/cast.hpp into this new header.
+//             Keeps this legacy version of numeric_cast<> for old compilers
+//             wich can't compile the new version in /boost/numeric/conversion/cast.hpp
+//             (Fernando Cacciola)
+//  02 Apr 01  Removed BOOST_NO_LIMITS workarounds and included
+//             <ndnboost/limits.hpp> instead (the workaround did not
+//             actually compile when BOOST_NO_LIMITS was defined in
+//             any case, so we loose nothing). (John Maddock)
+//  21 Jan 01  Undid a bug I introduced yesterday. numeric_cast<> never
+//             worked with stock GCC; trying to get it to do that broke
+//             vc-stlport.
+//  20 Jan 01  Moved BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS to config.hpp.
+//             Removed unused BOOST_EXPLICIT_TARGET macro. Moved
+//             ndnboost::detail::type to boost/type.hpp. Made it compile with
+//             stock gcc again (Dave Abrahams)
+//  29 Nov 00  Remove nested namespace cast, cleanup spacing before Formal
+//             Review (Beman Dawes)
+//  19 Oct 00  Fix numeric_cast for floating-point types (Dave Abrahams)
+//  15 Jul 00  Suppress numeric_cast warnings for GCC, Borland and MSVC
+//             (Dave Abrahams)
+//  30 Jun 00  More MSVC6 wordarounds.  See comments below.  (Dave Abrahams)
+//  28 Jun 00  Removed implicit_cast<>.  See comment below. (Beman Dawes)
+//  27 Jun 00  More MSVC6 workarounds
+//  15 Jun 00  Add workarounds for MSVC6
+//   2 Feb 00  Remove bad_numeric_cast ";" syntax error (Doncho Angelov)
+//  26 Jan 00  Add missing throw() to bad_numeric_cast::what(0 (Adam Levar)
+//  29 Dec 99  Change using declarations so usages in other namespaces work
+//             correctly (Dave Abrahams)
+//  23 Sep 99  Change polymorphic_downcast assert to also detect M.I. errors
+//             as suggested Darin Adler and improved by Valentin Bonnard.
+//   2 Sep 99  Remove controversial asserts, simplify, rename.
+//  30 Aug 99  Move to cast.hpp, replace value_cast with numeric_cast,
+//             place in nested namespace.
+//   3 Aug 99  Initial version
+
+#ifndef BOOST_OLD_NUMERIC_CAST_HPP
+#define BOOST_OLD_NUMERIC_CAST_HPP
+
+# include <ndnboost/config.hpp>
+# include <cassert>
+# include <typeinfo>
+# include <ndnboost/type.hpp>
+# include <ndnboost/limits.hpp>
+# include <ndnboost/numeric/conversion/converter_policies.hpp>
+
+//  It has been demonstrated numerous times that MSVC 6.0 fails silently at link
+//  time if you use a template function which has template parameters that don't
+//  appear in the function's argument list.
+//
+//  TODO: Add this to config.hpp?
+//  FLC: This macro is repeated in boost/cast.hpp but only locally (is undefined at the bottom)
+//       so is OK to reproduce it here.
+# if defined(BOOST_MSVC) && BOOST_MSVC < 1300
+#  define BOOST_EXPLICIT_DEFAULT_TARGET , ::ndnboost::type<Target>* = 0
+# else
+#  define BOOST_EXPLICIT_DEFAULT_TARGET
+# endif
+
+namespace ndnboost
+{
+  using numeric::bad_numeric_cast;
+
+//  LEGACY numeric_cast [only for some old broken compilers] --------------------------------------//
+
+//  Contributed by Kevlin Henney
+
+//  numeric_cast  ------------------------------------------------------------//
+
+#if !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || defined(BOOST_SGI_CPP_LIMITS)
+
+    namespace detail
+    {
+      template <class T>
+      struct signed_numeric_limits : std::numeric_limits<T>
+      {
+             static inline T min BOOST_PREVENT_MACRO_SUBSTITUTION ()
+         {
+             return (std::numeric_limits<T>::min)() >= 0
+                     // unary minus causes integral promotion, thus the static_cast<>
+                     ? static_cast<T>(-(std::numeric_limits<T>::max)())
+                     : (std::numeric_limits<T>::min)();
+         };
+      };
+
+      // Move to namespace ndnboost in utility.hpp?
+      template <class T, bool specialized>
+      struct fixed_numeric_limits_base
+          : public if_true< std::numeric_limits<T>::is_signed >
+           ::BOOST_NESTED_TEMPLATE then< signed_numeric_limits<T>,
+                            std::numeric_limits<T>
+                   >::type
+      {};
+
+      template <class T>
+      struct fixed_numeric_limits
+          : fixed_numeric_limits_base<T,(std::numeric_limits<T>::is_specialized)>
+      {};
+
+# ifdef BOOST_HAS_LONG_LONG
+      // cover implementations which supply no specialization for long
+      // long / unsigned long long. Not intended to be full
+      // numeric_limits replacements, but good enough for numeric_cast<>
+      template <>
+      struct fixed_numeric_limits_base< ::ndnboost::long_long_type, false>
+      {
+          BOOST_STATIC_CONSTANT(bool, is_specialized = true);
+          BOOST_STATIC_CONSTANT(bool, is_signed = true);
+          static  ::ndnboost::long_long_type max BOOST_PREVENT_MACRO_SUBSTITUTION ()
+          {
+#  ifdef LONGLONG_MAX
+              return LONGLONG_MAX;
+#  else
+              return 9223372036854775807LL; // hope this is portable
+#  endif
+          }
+
+          static  ::ndnboost::long_long_type min BOOST_PREVENT_MACRO_SUBSTITUTION ()
+          {
+#  ifdef LONGLONG_MIN
+              return LONGLONG_MIN;
+#  else
+               return -( 9223372036854775807LL )-1; // hope this is portable
+#  endif
+          }
+      };
+
+      template <>
+      struct fixed_numeric_limits_base< ::ndnboost::ulong_long_type, false>
+      {
+          BOOST_STATIC_CONSTANT(bool, is_specialized = true);
+          BOOST_STATIC_CONSTANT(bool, is_signed = false);
+          static  ::ndnboost::ulong_long_type max BOOST_PREVENT_MACRO_SUBSTITUTION ()
+          {
+#  ifdef ULONGLONG_MAX
+              return ULONGLONG_MAX;
+#  else
+              return 0xffffffffffffffffULL; // hope this is portable
+#  endif
+          }
+
+          static  ::ndnboost::ulong_long_type min BOOST_PREVENT_MACRO_SUBSTITUTION () { return 0; }
+      };
+# endif
+    } // namespace detail
+
+// less_than_type_min -
+  //    x_is_signed should be numeric_limits<X>::is_signed
+  //    y_is_signed should be numeric_limits<Y>::is_signed
+  //    y_min should be numeric_limits<Y>::min()
+  //
+  //    check(x, y_min) returns true iff x < y_min without invoking comparisons
+  //    between signed and unsigned values.
+  //
+  //    "poor man's partial specialization" is in use here.
+    template <bool x_is_signed, bool y_is_signed>
+    struct less_than_type_min
+    {
+        template <class X, class Y>
+        static bool check(X x, Y y_min)
+            { return x < y_min; }
+    };
+
+    template <>
+    struct less_than_type_min<false, true>
+    {
+        template <class X, class Y>
+        static bool check(X, Y)
+            { return false; }
+    };
+
+    template <>
+    struct less_than_type_min<true, false>
+    {
+        template <class X, class Y>
+        static bool check(X x, Y)
+            { return x < 0; }
+    };
+
+  // greater_than_type_max -
+  //    same_sign should be:
+  //            numeric_limits<X>::is_signed == numeric_limits<Y>::is_signed
+  //    y_max should be numeric_limits<Y>::max()
+  //
+  //    check(x, y_max) returns true iff x > y_max without invoking comparisons
+  //    between signed and unsigned values.
+  //
+  //    "poor man's partial specialization" is in use here.
+    template <bool same_sign, bool x_is_signed>
+    struct greater_than_type_max;
+
+    template<>
+    struct greater_than_type_max<true, true>
+    {
+        template <class X, class Y>
+        static inline bool check(X x, Y y_max)
+            { return x > y_max; }
+    };
+
+    template <>
+    struct greater_than_type_max<false, true>
+    {
+        // What does the standard say about this? I think it's right, and it
+        // will work with every compiler I know of.
+        template <class X, class Y>
+        static inline bool check(X x, Y)
+            { return x >= 0 && static_cast<X>(static_cast<Y>(x)) != x; }
+
+# if defined(BOOST_MSVC) && BOOST_MSVC < 1300
+        // MSVC6 can't static_cast  unsigned __int64 -> floating types
+#  define BOOST_UINT64_CAST(src_type)                                   \
+        static inline bool check(src_type x, unsigned __int64)          \
+        {                                                               \
+            if (x < 0) return false;                                    \
+            unsigned __int64 y = static_cast<unsigned __int64>(x);      \
+            bool odd = y & 0x1;                                         \
+            __int64 div2 = static_cast<__int64>(y >> 1);                \
+            return ((static_cast<src_type>(div2) * 2.0) + odd) != x;    \
+        }
+
+        BOOST_UINT64_CAST(long double);
+        BOOST_UINT64_CAST(double);
+        BOOST_UINT64_CAST(float);
+#  undef BOOST_UINT64_CAST
+# endif
+    };
+
+    template<>
+    struct greater_than_type_max<true, false>
+    {
+        template <class X, class Y>
+        static inline bool check(X x, Y y_max)
+            { return x > y_max; }
+    };
+
+    template <>
+    struct greater_than_type_max<false, false>
+    {
+        // What does the standard say about this? I think it's right, and it
+        // will work with every compiler I know of.
+        template <class X, class Y>
+        static inline bool check(X x, Y)
+            { return static_cast<X>(static_cast<Y>(x)) != x; }
+    };
+
+#else // use #pragma hacks if available
+
+  namespace detail
+  {
+# if BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4018)
+#  pragma warning(disable : 4146)
+#elif defined(__BORLANDC__)
+#  pragma option push -w-8041
+# endif
+
+       // Move to namespace ndnboost in utility.hpp?
+       template <class T>
+       struct fixed_numeric_limits : public std::numeric_limits<T>
+       {
+           static inline T min BOOST_PREVENT_MACRO_SUBSTITUTION ()
+           {
+               return std::numeric_limits<T>::is_signed && (std::numeric_limits<T>::min)() >= 0
+                   ? T(-(std::numeric_limits<T>::max)()) : (std::numeric_limits<T>::min)();
+           }
+       };
+
+# if BOOST_MSVC
+#  pragma warning(pop)
+#elif defined(__BORLANDC__)
+#  pragma option pop
+# endif
+  } // namespace detail
+
+#endif
+
+    template<typename Target, typename Source>
+    inline Target numeric_cast(Source arg BOOST_EXPLICIT_DEFAULT_TARGET)
+    {
+        // typedefs abbreviating respective trait classes
+        typedef detail::fixed_numeric_limits<Source> arg_traits;
+        typedef detail::fixed_numeric_limits<Target> result_traits;
+
+#if defined(BOOST_STRICT_CONFIG) \
+    || (!defined(__HP_aCC) || __HP_aCC > 33900) \
+         && (!defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) \
+             || defined(BOOST_SGI_CPP_LIMITS))
+        // typedefs that act as compile time assertions
+        // (to be replaced by boost compile time assertions
+        // as and when they become available and are stable)
+        typedef bool argument_must_be_numeric[arg_traits::is_specialized];
+        typedef bool result_must_be_numeric[result_traits::is_specialized];
+
+        const bool arg_is_signed = arg_traits::is_signed;
+        const bool result_is_signed = result_traits::is_signed;
+        const bool same_sign = arg_is_signed == result_is_signed;
+
+        if (less_than_type_min<arg_is_signed, result_is_signed>::check(arg, (result_traits::min)())
+            || greater_than_type_max<same_sign, arg_is_signed>::check(arg, (result_traits::max)())
+            )
+
+#else // We need to use #pragma hacks if available
+
+# if BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4018)
+#elif defined(__BORLANDC__)
+#pragma option push -w-8012
+# endif
+        if ((arg < 0 && !result_traits::is_signed)  // loss of negative range
+             || (arg_traits::is_signed && arg < (result_traits::min)())  // underflow
+             || arg > (result_traits::max)())            // overflow
+# if BOOST_MSVC
+#  pragma warning(pop)
+#elif defined(__BORLANDC__)
+#pragma option pop
+# endif
+#endif
+        {
+            throw bad_numeric_cast();
+        }
+        return static_cast<Target>(arg);
+    } // numeric_cast
+
+#  undef BOOST_EXPLICIT_DEFAULT_TARGET
+
+} // namespace ndnboost
+
+#endif  // BOOST_OLD_NUMERIC_CAST_HPP
diff --git a/ndnboost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp b/ndnboost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp
new file mode 100644
index 0000000..48eee6a
--- /dev/null
+++ b/ndnboost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp
@@ -0,0 +1,1741 @@
+//
+//! Copyright (c) 2011-2012
+//! Brandon Kohn
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+	
+	
+	
+namespace ndnboost { namespace numeric {
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , signed char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<signed char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , unsigned char
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned char> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , unsigned short
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned short> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , unsigned int
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned int> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , unsigned long
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<unsigned long> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , float
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<float> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<double> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , long double
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<long double> rounding_policy;
+    }; 
+}}
diff --git a/ndnboost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp b/ndnboost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp
new file mode 100644
index 0000000..ef8d541
--- /dev/null
+++ b/ndnboost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp
@@ -0,0 +1,347 @@
+//
+//! Copyright (c) 2011-2012
+//! Brandon Kohn
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+namespace ndnboost { namespace numeric {
+    
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            char
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            signed char
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned char
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            short
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned short
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            int
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned int
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            unsigned long
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            float
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            double
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            long double
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            ndnboost::long_long_type
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            ndnboost::long_long_type
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            ndnboost::ulong_long_type
+          , ndnboost::long_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::long_long_type> rounding_policy;
+    }; 
+    
+    template <>
+    struct numeric_cast_traits
+        <
+            ndnboost::ulong_long_type
+          , ndnboost::ulong_long_type
+        >
+    {
+        typedef def_overflow_handler overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<ndnboost::ulong_long_type> rounding_policy;
+    }; 
+}}
diff --git a/ndnboost/numeric/conversion/detail/sign_mixture.hpp b/ndnboost/numeric/conversion/detail/sign_mixture.hpp
new file mode 100644
index 0000000..e49ad1d
--- /dev/null
+++ b/ndnboost/numeric/conversion/detail/sign_mixture.hpp
@@ -0,0 +1,72 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_SIGN_MIXTURE_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_SIGN_MIXTURE_FLC_12NOV2002_HPP
+
+#include "ndnboost/config.hpp"
+#include "ndnboost/limits.hpp"
+
+#include "ndnboost/numeric/conversion/sign_mixture_enum.hpp"
+#include "ndnboost/numeric/conversion/detail/meta.hpp"
+
+#include "ndnboost/mpl/integral_c.hpp"
+
+namespace ndnboost { namespace numeric { namespace convdetail
+{
+  // Integral Constants for 'SignMixture'
+  typedef mpl::integral_c<sign_mixture_enum, unsigned_to_unsigned> unsig2unsig_c ;
+  typedef mpl::integral_c<sign_mixture_enum, signed_to_signed>     sig2sig_c ;
+  typedef mpl::integral_c<sign_mixture_enum, signed_to_unsigned>   sig2unsig_c ;
+  typedef mpl::integral_c<sign_mixture_enum, unsigned_to_signed>   unsig2sig_c ;
+
+  // Metafunction:
+  //
+  //   get_sign_mixture<T,S>::type
+  //
+  // Selects the appropriate SignMixture Integral Constant for the combination T,S.
+  //
+  template<class T,class S>
+  struct get_sign_mixture
+  {
+    typedef mpl::bool_< ::std::numeric_limits<S>::is_signed > S_signed ;
+    typedef mpl::bool_< ::std::numeric_limits<T>::is_signed > T_signed ;
+
+    typedef typename
+      for_both<S_signed, T_signed, sig2sig_c, sig2unsig_c, unsig2sig_c, unsig2unsig_c>::type
+        type ;
+  } ;
+
+  // Metafunction:
+  //
+  //   for_sign_mixture<SignMixture,Sig2Sig,Sig2Unsig,Unsig2Sig,Unsig2Unsig>::type
+  //
+  // {SignMixture} is one of the Integral Constants for SignMixture, declared above.
+  // {Sig2Sig,Sig2Unsig,Unsig2Sig,Unsig2Unsig} are aribtrary types. (not metafunctions)
+  //
+  // According to the value of 'SignMixture', selects the corresponding type.
+  //
+  template<class SignMixture, class Sig2Sig, class Sig2Unsig, class Unsig2Sig, class Unsig2Unsig>
+  struct for_sign_mixture
+  {
+    typedef typename
+      ct_switch4<SignMixture
+                 , sig2sig_c, sig2unsig_c, unsig2sig_c  // default
+                 , Sig2Sig  , Sig2Unsig  , Unsig2Sig  , Unsig2Unsig
+                >::type
+        type ;
+  } ;
+
+} } } // namespace ndnboost::numeric::convdetail
+
+#endif
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/ndnboost/numeric/conversion/detail/udt_builtin_mixture.hpp b/ndnboost/numeric/conversion/detail/udt_builtin_mixture.hpp
new file mode 100644
index 0000000..6b1e282
--- /dev/null
+++ b/ndnboost/numeric/conversion/detail/udt_builtin_mixture.hpp
@@ -0,0 +1,69 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_UDT_BUILTIN_MIXTURE_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_DETAIL_UDT_BUILTIN_MIXTURE_FLC_12NOV2002_HPP
+
+#include "ndnboost/type_traits/is_arithmetic.hpp"
+
+#include "ndnboost/numeric/conversion/udt_builtin_mixture_enum.hpp"
+#include "ndnboost/numeric/conversion/detail/meta.hpp"
+
+#include "ndnboost/mpl/integral_c.hpp"
+
+namespace ndnboost { namespace numeric { namespace convdetail
+{
+  // Integral Constants for 'UdtMixture'
+  typedef mpl::integral_c<udt_builtin_mixture_enum, builtin_to_builtin> builtin2builtin_c ;
+  typedef mpl::integral_c<udt_builtin_mixture_enum, builtin_to_udt>     builtin2udt_c ;
+  typedef mpl::integral_c<udt_builtin_mixture_enum, udt_to_builtin>     udt2builtin_c ;
+  typedef mpl::integral_c<udt_builtin_mixture_enum, udt_to_udt>         udt2udt_c ;
+
+  // Metafunction:
+  //
+  //   for_udt_mixture<UdtMixture,BuiltIn2BuiltIn,BuiltIn2Udt,Udt2BuiltIn,Udt2Udt>::type
+  //
+  // {UdtMixture} is one of the Integral Constants for UdMixture, declared above.
+  // {BuiltIn2BuiltIn,BuiltIn2Udt,Udt2BuiltIn,Udt2Udt} are aribtrary types. (not metafunctions)
+  //
+  // According to the value of 'UdtMixture', selects the corresponding type.
+  //
+  template<class UdtMixture, class BuiltIn2BuiltIn, class BuiltIn2Udt, class Udt2BuiltIn, class Udt2Udt>
+  struct for_udt_builtin_mixture
+  {
+    typedef typename
+      ct_switch4<UdtMixture
+                 , builtin2builtin_c, builtin2udt_c, udt2builtin_c // default
+                 , BuiltIn2BuiltIn  , BuiltIn2Udt  , Udt2BuiltIn  , Udt2Udt
+                >::type
+        type ;
+  } ;
+
+  // Metafunction:
+  //
+  //   get_udt_mixture<T,S>::type
+  //
+  // Selects the appropriate UdtMixture Integral Constant for the combination T,S.
+  //
+  template<class T,class S>
+  struct get_udt_builtin_mixture
+  {
+    typedef is_arithmetic<S> S_builtin ;
+    typedef is_arithmetic<T> T_builtin ;
+
+    typedef typename
+      for_both<S_builtin, T_builtin, builtin2builtin_c, builtin2udt_c, udt2builtin_c, udt2udt_c>::type
+        type ;
+  } ;
+
+} } } // namespace ndnboost::numeric::convdetail
+
+#endif
+
+
diff --git a/ndnboost/numeric/conversion/int_float_mixture_enum.hpp b/ndnboost/numeric/conversion/int_float_mixture_enum.hpp
new file mode 100644
index 0000000..a733404
--- /dev/null
+++ b/ndnboost/numeric/conversion/int_float_mixture_enum.hpp
@@ -0,0 +1,29 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_INT_FLOAT_MIXTURE_ENUM_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_INT_FLOAT_MIXTURE_ENUM_FLC_12NOV2002_HPP
+
+namespace ndnboost { namespace numeric
+{
+  enum int_float_mixture_enum
+  {
+     integral_to_integral
+    ,integral_to_float
+    ,float_to_integral
+    ,float_to_float
+  } ;
+
+} } // namespace ndnboost::numeric
+
+#endif
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/ndnboost/numeric/conversion/numeric_cast_traits.hpp b/ndnboost/numeric/conversion/numeric_cast_traits.hpp
new file mode 100644
index 0000000..d482bfd
--- /dev/null
+++ b/ndnboost/numeric/conversion/numeric_cast_traits.hpp
@@ -0,0 +1,31 @@
+//
+//! Copyright (c) 2011
+//! Brandon Kohn
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef BOOST_NUMERIC_CAST_TRAITS_HPP
+#define BOOST_NUMERIC_CAST_TRAITS_HPP
+
+#include <ndnboost/numeric/conversion/converter_policies.hpp>
+
+namespace ndnboost { namespace numeric {
+
+    template <typename Target, typename Source, typename EnableIf = void>
+    struct numeric_cast_traits
+    {
+        typedef def_overflow_handler    overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<Source>           rounding_policy;
+    };
+
+}}//namespace ndnboost::numeric;
+
+#if !defined( BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS )
+#include <ndnboost/cstdint.hpp>
+#include <ndnboost/numeric/conversion/detail/numeric_cast_traits.hpp>
+#endif//!defined BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS
+
+#endif//BOOST_NUMERIC_CAST_TRAITS_HPP
diff --git a/ndnboost/numeric/conversion/sign_mixture_enum.hpp b/ndnboost/numeric/conversion/sign_mixture_enum.hpp
new file mode 100644
index 0000000..cfb7151
--- /dev/null
+++ b/ndnboost/numeric/conversion/sign_mixture_enum.hpp
@@ -0,0 +1,29 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_SIGN_MIXTURE_ENUM_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_SIGN_MIXTURE_ENUM_FLC_12NOV2002_HPP
+
+namespace ndnboost { namespace numeric
+{
+  enum sign_mixture_enum
+  {
+     unsigned_to_unsigned
+    ,signed_to_signed
+    ,signed_to_unsigned
+    ,unsigned_to_signed
+  } ;
+
+} } // namespace ndnboost::numeric
+
+#endif
+//
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/ndnboost/numeric/conversion/udt_builtin_mixture_enum.hpp b/ndnboost/numeric/conversion/udt_builtin_mixture_enum.hpp
new file mode 100644
index 0000000..6e5bf5d
--- /dev/null
+++ b/ndnboost/numeric/conversion/udt_builtin_mixture_enum.hpp
@@ -0,0 +1,26 @@
+//  (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
+//  Use, modification, and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See library home page at http://www.boost.org/libs/numeric/conversion
+//
+// Contact the author at: fernando_cacciola@hotmail.com
+// 
+#ifndef BOOST_NUMERIC_CONVERSION_UDT_BUILTIN_MIXTURE_ENUM_FLC_12NOV2002_HPP
+#define BOOST_NUMERIC_CONVERSION_UDT_BUILTIN_MIXTURE_ENUM_FLC_12NOV2002_HPP
+
+namespace ndnboost { namespace numeric
+{
+  enum udt_builtin_mixture_enum
+  {
+     builtin_to_builtin
+    ,builtin_to_udt
+    ,udt_to_builtin
+    ,udt_to_udt
+  } ;
+
+} } // namespace ndnboost::numeric
+
+#endif
+
diff --git a/ndnboost/optional.hpp b/ndnboost/optional.hpp
new file mode 100644
index 0000000..0eeecbe
--- /dev/null
+++ b/ndnboost/optional.hpp
@@ -0,0 +1,18 @@
+// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  fernando_cacciola@hotmail.com
+//
+#ifndef BOOST_OPTIONAL_FLC_19NOV2002_HPP
+#define BOOST_OPTIONAL_FLC_19NOV2002_HPP
+
+#include "ndnboost/optional/optional.hpp"
+
+#endif
+
diff --git a/ndnboost/optional/optional.hpp b/ndnboost/optional/optional.hpp
new file mode 100644
index 0000000..19dc46b
--- /dev/null
+++ b/ndnboost/optional/optional.hpp
@@ -0,0 +1,991 @@
+// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  fernando_cacciola@hotmail.com
+//
+// Revisions:
+// 27 Apr 2008 (improved swap) Fernando Cacciola, Niels Dekker, Thorsten Ottosen
+//
+#ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
+#define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
+
+#include <new>
+#include <algorithm>
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/assert.hpp>
+#include <ndnboost/type.hpp>
+#include <ndnboost/type_traits/alignment_of.hpp>
+#include <ndnboost/type_traits/has_nothrow_constructor.hpp>
+#include <ndnboost/type_traits/type_with_alignment.hpp>
+#include <ndnboost/type_traits/remove_reference.hpp>
+#include <ndnboost/type_traits/is_reference.hpp>
+#include <ndnboost/mpl/if.hpp>
+#include <ndnboost/mpl/bool.hpp>
+#include <ndnboost/mpl/not.hpp>
+#include <ndnboost/detail/reference_content.hpp>
+#include <ndnboost/none.hpp>
+#include <ndnboost/utility/swap.hpp>
+#include <ndnboost/utility/addressof.hpp>
+#include <ndnboost/utility/compare_pointees.hpp>
+#include <ndnboost/utility/in_place_factory.hpp>
+
+#include <ndnboost/optional/optional_fwd.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
+// VC6.0 has the following bug:
+//   When a templated assignment operator exist, an implicit conversion
+//   constructing an optional<T> is used when assigment of the form:
+//     optional<T> opt ; opt = T(...);
+//   is compiled.
+//   However, optional's ctor is _explicit_ and the assignemt shouldn't compile.
+//   Therefore, for VC6.0 templated assignment is disabled.
+//
+#define BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT
+#endif
+
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
+// VC7.0 has the following bug:
+//   When both a non-template and a template copy-ctor exist
+//   and the templated version is made 'explicit', the explicit is also
+//   given to the non-templated version, making the class non-implicitely-copyable.
+//
+#define BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR
+#endif
+
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION,<=700)
+// AFAICT only VC7.1 correctly resolves the overload set
+// that includes the in-place factory taking functions,
+// so for the other VC versions, in-place factory support
+// is disabled
+#define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+#endif
+
+#if BOOST_WORKAROUND(__BORLANDC__, <= 0x551)
+// BCB (5.5.1) cannot parse the nested template struct in an inplace factory.
+#define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+#endif
+
+#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) \
+    && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581) )
+// BCB (up to 5.64) has the following bug:
+//   If there is a member function/operator template of the form
+//     template<class Expr> mfunc( Expr expr ) ;
+//   some calls are resolved to this even if there are other better matches.
+//   The effect of this bug is that calls to converting ctors and assignments
+//   are incrorrectly sink to this general catch-all member function template as shown above.
+#define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
+#endif
+
+#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 302 \
+    && !defined(__INTEL_COMPILER)
+// GCC since 3.3 has may_alias attribute that helps to alleviate optimizer issues with
+// regard to violation of the strict aliasing rules. The optional< T > storage type is marked
+// with this attribute in order to let the compiler know that it will alias objects of type T
+// and silence compilation warnings.
+#define BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS
+#endif
+
+// Daniel Wallin discovered that bind/apply.hpp badly interacts with the apply<>
+// member template of a factory as used in the optional<> implementation.
+// He proposed this simple fix which is to move the call to apply<> outside
+// namespace ndnboost.
+namespace ndnboost_optional_detail
+{
+  template <class T, class Factory>
+  inline void construct(Factory const& factory, void* address)
+  {
+    factory.BOOST_NESTED_TEMPLATE apply<T>(address);
+  }
+}
+
+
+namespace ndnboost {
+
+class in_place_factory_base ;
+class typed_in_place_factory_base ;
+
+// This forward is needed to refer to namespace scope swap from the member swap
+template<class T> void swap ( optional<T>& x, optional<T>& y );
+
+namespace optional_detail {
+
+// This local class is used instead of that in "aligned_storage.hpp"
+// because I've found the 'official' class to ICE BCB5.5
+// when some types are used with optional<>
+// (due to sizeof() passed down as a non-type template parameter)
+template <class T>
+class aligned_storage
+{
+    // Borland ICEs if unnamed unions are used for this!
+    union
+    // This works around GCC warnings about breaking strict aliasing rules when casting storage address to T*
+#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
+    __attribute__((may_alias))
+#endif
+    dummy_u
+    {
+        char data[ sizeof(T) ];
+        BOOST_DEDUCED_TYPENAME type_with_alignment<
+          ::ndnboost::alignment_of<T>::value >::type aligner_;
+    } dummy_ ;
+
+  public:
+
+#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
+    void const* address() const { return &dummy_; }
+    void      * address()       { return &dummy_; }
+#else
+    void const* address() const { return dummy_.data; }
+    void      * address()       { return dummy_.data; }
+#endif
+} ;
+
+template<class T>
+struct types_when_isnt_ref
+{
+  typedef T const& reference_const_type ;
+  typedef T &      reference_type ;
+  typedef T const* pointer_const_type ;
+  typedef T *      pointer_type ;
+  typedef T const& argument_type ;
+} ;
+template<class T>
+struct types_when_is_ref
+{
+  typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type raw_type ;
+
+  typedef raw_type& reference_const_type ;
+  typedef raw_type& reference_type ;
+  typedef raw_type* pointer_const_type ;
+  typedef raw_type* pointer_type ;
+  typedef raw_type& argument_type ;
+} ;
+
+struct optional_tag {} ;
+
+template<class T>
+class optional_base : public optional_tag
+{
+  private :
+
+    typedef
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+    BOOST_DEDUCED_TYPENAME
+#endif
+    ::ndnboost::detail::make_reference_content<T>::type internal_type ;
+
+    typedef aligned_storage<internal_type> storage_type ;
+
+    typedef types_when_isnt_ref<T> types_when_not_ref ;
+    typedef types_when_is_ref<T>   types_when_ref   ;
+
+    typedef optional_base<T> this_type ;
+
+  protected :
+
+    typedef T value_type ;
+
+    typedef mpl::true_  is_reference_tag ;
+    typedef mpl::false_ is_not_reference_tag ;
+
+    typedef BOOST_DEDUCED_TYPENAME is_reference<T>::type is_reference_predicate ;
+
+  public:
+    typedef BOOST_DEDUCED_TYPENAME mpl::if_<is_reference_predicate,types_when_ref,types_when_not_ref>::type types ;
+
+  protected:
+    typedef bool (this_type::*unspecified_bool_type)() const;
+
+    typedef BOOST_DEDUCED_TYPENAME types::reference_type       reference_type ;
+    typedef BOOST_DEDUCED_TYPENAME types::reference_const_type reference_const_type ;
+    typedef BOOST_DEDUCED_TYPENAME types::pointer_type         pointer_type ;
+    typedef BOOST_DEDUCED_TYPENAME types::pointer_const_type   pointer_const_type ;
+    typedef BOOST_DEDUCED_TYPENAME types::argument_type        argument_type ;
+
+    // Creates an optional<T> uninitialized.
+    // No-throw
+    optional_base()
+      :
+      m_initialized(false) {}
+
+    // Creates an optional<T> uninitialized.
+    // No-throw
+    optional_base ( none_t )
+      :
+      m_initialized(false) {}
+
+    // Creates an optional<T> initialized with 'val'.
+    // Can throw if T::T(T const&) does
+    optional_base ( argument_type val )
+      :
+      m_initialized(false)
+    {
+      construct(val);
+    }
+
+    // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialzed optional<T>.
+    // Can throw if T::T(T const&) does
+    optional_base ( bool cond, argument_type val )
+      :
+      m_initialized(false)
+    {
+      if ( cond )
+        construct(val);
+    }
+
+    // Creates a deep copy of another optional<T>
+    // Can throw if T::T(T const&) does
+    optional_base ( optional_base const& rhs )
+      :
+      m_initialized(false)
+    {
+      if ( rhs.is_initialized() )
+        construct(rhs.get_impl());
+    }
+
+
+    // This is used for both converting and in-place constructions.
+    // Derived classes use the 'tag' to select the appropriate
+    // implementation (the correct 'construct()' overload)
+    template<class Expr>
+    explicit optional_base ( Expr const& expr, Expr const* tag )
+      :
+      m_initialized(false)
+    {
+      construct(expr,tag);
+    }
+
+
+
+    // No-throw (assuming T::~T() doesn't)
+    ~optional_base() { destroy() ; }
+
+    // Assigns from another optional<T> (deep-copies the rhs value)
+    void assign ( optional_base const& rhs )
+    {
+      if (is_initialized())
+      {
+        if ( rhs.is_initialized() )
+             assign_value(rhs.get_impl(), is_reference_predicate() );
+        else destroy();
+      }
+      else
+      {
+        if ( rhs.is_initialized() )
+          construct(rhs.get_impl());
+      }
+    }
+
+    // Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
+    template<class U>
+    void assign ( optional<U> const& rhs )
+    {
+      if (is_initialized())
+      {
+        if ( rhs.is_initialized() )
+             assign_value(static_cast<value_type>(rhs.get()), is_reference_predicate() );
+        else destroy();
+      }
+      else
+      {
+        if ( rhs.is_initialized() )
+          construct(static_cast<value_type>(rhs.get()));
+      }
+    }
+
+    // Assigns from a T (deep-copies the rhs value)
+    void assign ( argument_type val )
+    {
+      if (is_initialized())
+           assign_value(val, is_reference_predicate() );
+      else construct(val);
+    }
+
+    // Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED
+    // No-throw (assuming T::~T() doesn't)
+    void assign ( none_t ) { destroy(); }
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+    template<class Expr>
+    void assign_expr ( Expr const& expr, Expr const* tag )
+      {
+        if (is_initialized())
+             assign_expr_to_initialized(expr,tag);
+        else construct(expr,tag);
+      }
+#endif
+
+  public :
+
+    // Destroys the current value, if any, leaving this UNINITIALIZED
+    // No-throw (assuming T::~T() doesn't)
+    void reset() { destroy(); }
+
+    // Replaces the current value -if any- with 'val'
+    void reset ( argument_type val ) { assign(val); }
+
+    // Returns a pointer to the value if this is initialized, otherwise,
+    // returns NULL.
+    // No-throw
+    pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; }
+    pointer_type       get_ptr()       { return m_initialized ? get_ptr_impl() : 0 ; }
+
+    bool is_initialized() const { return m_initialized ; }
+
+  protected :
+
+    void construct ( argument_type val )
+     {
+       new (m_storage.address()) internal_type(val) ;
+       m_initialized = true ;
+     }
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+    // Constructs in-place using the given factory
+    template<class Expr>
+    void construct ( Expr const& factory, in_place_factory_base const* )
+     {
+       BOOST_STATIC_ASSERT ( ::ndnboost::mpl::not_<is_reference_predicate>::value ) ;
+       ndnboost_optional_detail::construct<value_type>(factory, m_storage.address());
+       m_initialized = true ;
+     }
+
+    // Constructs in-place using the given typed factory
+    template<class Expr>
+    void construct ( Expr const& factory, typed_in_place_factory_base const* )
+     {
+       BOOST_STATIC_ASSERT ( ::ndnboost::mpl::not_<is_reference_predicate>::value ) ;
+       factory.apply(m_storage.address()) ;
+       m_initialized = true ;
+     }
+
+    template<class Expr>
+    void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag )
+     {
+       destroy();
+       construct(factory,tag);
+     }
+
+    // Constructs in-place using the given typed factory
+    template<class Expr>
+    void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag )
+     {
+       destroy();
+       construct(factory,tag);
+     }
+#endif
+
+    // Constructs using any expression implicitely convertible to the single argument
+    // of a one-argument T constructor.
+    // Converting constructions of optional<T> from optional<U> uses this function with
+    // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
+    template<class Expr>
+    void construct ( Expr const& expr, void const* )
+     {
+       new (m_storage.address()) internal_type(expr) ;
+       m_initialized = true ;
+     }
+
+    // Assigns using a form any expression implicitely convertible to the single argument
+    // of a T's assignment operator.
+    // Converting assignments of optional<T> from optional<U> uses this function with
+    // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
+    template<class Expr>
+    void assign_expr_to_initialized ( Expr const& expr, void const* )
+     {
+       assign_value(expr, is_reference_predicate());
+     }
+
+#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
+    // BCB5.64 (and probably lower versions) workaround.
+    //   The in-place factories are supported by means of catch-all constructors
+    //   and assignment operators (the functions are parameterized in terms of
+    //   an arbitrary 'Expr' type)
+    //   This compiler incorrectly resolves the overload set and sinks optional<T> and optional<U>
+    //   to the 'Expr'-taking functions even though explicit overloads are present for them.
+    //   Thus, the following overload is needed to properly handle the case when the 'lhs'
+    //   is another optional.
+    //
+    // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error
+    // instead of choosing the wrong overload
+    //
+    // Notice that 'Expr' will be optional<T> or optional<U> (but not optional_base<..>)
+    template<class Expr>
+    void construct ( Expr const& expr, optional_tag const* )
+     {
+       if ( expr.is_initialized() )
+       {
+         // An exception can be thrown here.
+         // It it happens, THIS will be left uninitialized.
+         new (m_storage.address()) internal_type(expr.get()) ;
+         m_initialized = true ;
+       }
+     }
+#endif
+
+    void assign_value ( argument_type val, is_not_reference_tag ) { get_impl() = val; }
+    void assign_value ( argument_type val, is_reference_tag     ) { construct(val); }
+
+    void destroy()
+    {
+      if ( m_initialized )
+        destroy_impl(is_reference_predicate()) ;
+    }
+
+    unspecified_bool_type safe_bool() const { return m_initialized ? &this_type::is_initialized : 0 ; }
+
+    reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; }
+    reference_type       get_impl()       { return dereference(get_object(), is_reference_predicate() ) ; }
+
+    pointer_const_type get_ptr_impl() const { return cast_ptr(get_object(), is_reference_predicate() ) ; }
+    pointer_type       get_ptr_impl()       { return cast_ptr(get_object(), is_reference_predicate() ) ; }
+
+  private :
+
+    // internal_type can be either T or reference_content<T>
+#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
+    // This workaround is supposed to silence GCC warnings about broken strict aliasing rules
+    internal_type const* get_object() const
+    {
+        union { void const* ap_pvoid; internal_type const* as_ptype; } caster = { m_storage.address() };
+        return caster.as_ptype;
+    }
+    internal_type *      get_object()
+    {
+        union { void* ap_pvoid; internal_type* as_ptype; } caster = { m_storage.address() };
+        return caster.as_ptype;
+    }
+#else
+    internal_type const* get_object() const { return static_cast<internal_type const*>(m_storage.address()); }
+    internal_type *      get_object()       { return static_cast<internal_type *>     (m_storage.address()); }
+#endif
+
+    // reference_content<T> lacks an implicit conversion to T&, so the following is needed to obtain a proper reference.
+    reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; }
+    reference_type       dereference( internal_type*       p, is_not_reference_tag )       { return *p ; }
+    reference_const_type dereference( internal_type const* p, is_reference_tag     ) const { return p->get() ; }
+    reference_type       dereference( internal_type*       p, is_reference_tag     )       { return p->get() ; }
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
+    void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->internal_type::~internal_type() ; m_initialized = false ; }
+#else
+    void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->T::~T() ; m_initialized = false ; }
+#endif
+
+    void destroy_impl ( is_reference_tag     ) { m_initialized = false ; }
+
+    // If T is of reference type, trying to get a pointer to the held value must result in a compile-time error.
+    // Decent compilers should disallow conversions from reference_content<T>* to T*, but just in case,
+    // the following olverloads are used to filter out the case and guarantee an error in case of T being a reference.
+    pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; }
+    pointer_type       cast_ptr( internal_type *      p, is_not_reference_tag )       { return p ; }
+    pointer_const_type cast_ptr( internal_type const* p, is_reference_tag     ) const { return &p->get() ; }
+    pointer_type       cast_ptr( internal_type *      p, is_reference_tag     )       { return &p->get() ; }
+
+    bool m_initialized ;
+    storage_type m_storage ;
+} ;
+
+} // namespace optional_detail
+
+template<class T>
+class optional : public optional_detail::optional_base<T>
+{
+    typedef optional_detail::optional_base<T> base ;
+
+    typedef BOOST_DEDUCED_TYPENAME base::unspecified_bool_type  unspecified_bool_type ;
+
+  public :
+
+    typedef optional<T> this_type ;
+
+    typedef BOOST_DEDUCED_TYPENAME base::value_type           value_type ;
+    typedef BOOST_DEDUCED_TYPENAME base::reference_type       reference_type ;
+    typedef BOOST_DEDUCED_TYPENAME base::reference_const_type reference_const_type ;
+    typedef BOOST_DEDUCED_TYPENAME base::pointer_type         pointer_type ;
+    typedef BOOST_DEDUCED_TYPENAME base::pointer_const_type   pointer_const_type ;
+    typedef BOOST_DEDUCED_TYPENAME base::argument_type        argument_type ;
+
+    // Creates an optional<T> uninitialized.
+    // No-throw
+    optional() : base() {}
+
+    // Creates an optional<T> uninitialized.
+    // No-throw
+    optional( none_t none_ ) : base(none_) {}
+
+    // Creates an optional<T> initialized with 'val'.
+    // Can throw if T::T(T const&) does
+    optional ( argument_type val ) : base(val) {}
+
+    // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional.
+    // Can throw if T::T(T const&) does
+    optional ( bool cond, argument_type val ) : base(cond,val) {}
+
+#ifndef BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR
+    // NOTE: MSVC needs templated versions first
+
+    // Creates a deep copy of another convertible optional<U>
+    // Requires a valid conversion from U to T.
+    // Can throw if T::T(U const&) does
+    template<class U>
+    explicit optional ( optional<U> const& rhs )
+      :
+      base()
+    {
+      if ( rhs.is_initialized() )
+        this->construct(rhs.get());
+    }
+#endif
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+    // Creates an optional<T> with an expression which can be either
+    //  (a) An instance of InPlaceFactory (i.e. in_place(a,b,...,n);
+    //  (b) An instance of TypedInPlaceFactory ( i.e. in_place<T>(a,b,...,n);
+    //  (c) Any expression implicitely convertible to the single type
+    //      of a one-argument T's constructor.
+    //  (d*) Weak compilers (BCB) might also resolved Expr as optional<T> and optional<U>
+    //       even though explicit overloads are present for these.
+    // Depending on the above some T ctor is called.
+    // Can throw is the resolved T ctor throws.
+    template<class Expr>
+    explicit optional ( Expr const& expr ) : base(expr,ndnboost::addressof(expr)) {}
+#endif
+
+    // Creates a deep copy of another optional<T>
+    // Can throw if T::T(T const&) does
+    optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {}
+
+   // No-throw (assuming T::~T() doesn't)
+    ~optional() {}
+
+#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
+    // Assigns from an expression. See corresponding constructor.
+    // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED
+    template<class Expr>
+    optional& operator= ( Expr const& expr )
+      {
+        this->assign_expr(expr,ndnboost::addressof(expr));
+        return *this ;
+      }
+#endif
+
+
+#ifndef BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT
+    // Assigns from another convertible optional<U> (converts && deep-copies the rhs value)
+    // Requires a valid conversion from U to T.
+    // Basic Guarantee: If T::T( U const& ) throws, this is left UNINITIALIZED
+    template<class U>
+    optional& operator= ( optional<U> const& rhs )
+      {
+        this->assign(rhs);
+        return *this ;
+      }
+#endif
+
+    // Assigns from another optional<T> (deep-copies the rhs value)
+    // Basic Guarantee: If T::T( T const& ) throws, this is left UNINITIALIZED
+    //  (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw)
+    optional& operator= ( optional const& rhs )
+      {
+        this->assign( static_cast<base const&>(rhs) ) ;
+        return *this ;
+      }
+
+    // Assigns from a T (deep-copies the rhs value)
+    // Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED
+    optional& operator= ( argument_type val )
+      {
+        this->assign( val ) ;
+        return *this ;
+      }
+
+    // Assigns from a "none"
+    // Which destroys the current value, if any, leaving this UNINITIALIZED
+    // No-throw (assuming T::~T() doesn't)
+    optional& operator= ( none_t none_ )
+      {
+        this->assign( none_ ) ;
+        return *this ;
+      }
+
+    void swap( optional & arg )
+      {
+        // allow for Koenig lookup
+        using ndnboost::swap;
+        swap(*this, arg);
+      }
+
+
+    // Returns a reference to the value if this is initialized, otherwise,
+    // the behaviour is UNDEFINED
+    // No-throw
+    reference_const_type get() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
+    reference_type       get()       { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
+
+    // Returns a copy of the value if this is initialized, 'v' otherwise
+    reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; }
+    reference_type       get_value_or ( reference_type       v )       { return this->is_initialized() ? get() : v ; }
+
+    // Returns a pointer to the value if this is initialized, otherwise,
+    // the behaviour is UNDEFINED
+    // No-throw
+    pointer_const_type operator->() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; }
+    pointer_type       operator->()       { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; }
+
+    // Returns a reference to the value if this is initialized, otherwise,
+    // the behaviour is UNDEFINED
+    // No-throw
+    reference_const_type operator *() const { return this->get() ; }
+    reference_type       operator *()       { return this->get() ; }
+
+    // implicit conversion to "bool"
+    // No-throw
+    operator unspecified_bool_type() const { return this->safe_bool() ; }
+
+    // This is provided for those compilers which don't like the conversion to bool
+    // on some contexts.
+    bool operator!() const { return !this->is_initialized() ; }
+} ;
+
+// Returns optional<T>(v)
+template<class T>
+inline
+optional<T> make_optional ( T const& v  )
+{
+  return optional<T>(v);
+}
+
+// Returns optional<T>(cond,v)
+template<class T>
+inline
+optional<T> make_optional ( bool cond, T const& v )
+{
+  return optional<T>(cond,v);
+}
+
+// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED.
+// No-throw
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::reference_const_type
+get ( optional<T> const& opt )
+{
+  return opt.get() ;
+}
+
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::reference_type
+get ( optional<T>& opt )
+{
+  return opt.get() ;
+}
+
+// Returns a pointer to the value if this is initialized, otherwise, returns NULL.
+// No-throw
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::pointer_const_type
+get ( optional<T> const* opt )
+{
+  return opt->get_ptr() ;
+}
+
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::pointer_type
+get ( optional<T>* opt )
+{
+  return opt->get_ptr() ;
+}
+
+// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED.
+// No-throw
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::reference_const_type
+get_optional_value_or ( optional<T> const& opt, BOOST_DEDUCED_TYPENAME optional<T>::reference_const_type v )
+{
+  return opt.get_value_or(v) ;
+}
+
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::reference_type
+get_optional_value_or ( optional<T>& opt, BOOST_DEDUCED_TYPENAME optional<T>::reference_type v )
+{
+  return opt.get_value_or(v) ;
+}
+
+// Returns a pointer to the value if this is initialized, otherwise, returns NULL.
+// No-throw
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::pointer_const_type
+get_pointer ( optional<T> const& opt )
+{
+  return opt.get_ptr() ;
+}
+
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::pointer_type
+get_pointer ( optional<T>& opt )
+{
+  return opt.get_ptr() ;
+}
+
+// optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values).
+// WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead.
+
+
+//
+// optional<T> vs optional<T> cases
+//
+
+template<class T>
+inline
+bool operator == ( optional<T> const& x, optional<T> const& y )
+{ return equal_pointees(x,y); }
+
+template<class T>
+inline
+bool operator < ( optional<T> const& x, optional<T> const& y )
+{ return less_pointees(x,y); }
+
+template<class T>
+inline
+bool operator != ( optional<T> const& x, optional<T> const& y )
+{ return !( x == y ) ; }
+
+template<class T>
+inline
+bool operator > ( optional<T> const& x, optional<T> const& y )
+{ return y < x ; }
+
+template<class T>
+inline
+bool operator <= ( optional<T> const& x, optional<T> const& y )
+{ return !( y < x ) ; }
+
+template<class T>
+inline
+bool operator >= ( optional<T> const& x, optional<T> const& y )
+{ return !( x < y ) ; }
+
+
+//
+// optional<T> vs T cases
+//
+template<class T>
+inline
+bool operator == ( optional<T> const& x, T const& y )
+{ return equal_pointees(x, optional<T>(y)); }
+
+template<class T>
+inline
+bool operator < ( optional<T> const& x, T const& y )
+{ return less_pointees(x, optional<T>(y)); }
+
+template<class T>
+inline
+bool operator != ( optional<T> const& x, T const& y )
+{ return !( x == y ) ; }
+
+template<class T>
+inline
+bool operator > ( optional<T> const& x, T const& y )
+{ return y < x ; }
+
+template<class T>
+inline
+bool operator <= ( optional<T> const& x, T const& y )
+{ return !( y < x ) ; }
+
+template<class T>
+inline
+bool operator >= ( optional<T> const& x, T const& y )
+{ return !( x < y ) ; }
+
+//
+// T vs optional<T> cases
+//
+
+template<class T>
+inline
+bool operator == ( T const& x, optional<T> const& y )
+{ return equal_pointees( optional<T>(x), y ); }
+
+template<class T>
+inline
+bool operator < ( T const& x, optional<T> const& y )
+{ return less_pointees( optional<T>(x), y ); }
+
+template<class T>
+inline
+bool operator != ( T const& x, optional<T> const& y )
+{ return !( x == y ) ; }
+
+template<class T>
+inline
+bool operator > ( T const& x, optional<T> const& y )
+{ return y < x ; }
+
+template<class T>
+inline
+bool operator <= ( T const& x, optional<T> const& y )
+{ return !( y < x ) ; }
+
+template<class T>
+inline
+bool operator >= ( T const& x, optional<T> const& y )
+{ return !( x < y ) ; }
+
+
+//
+// optional<T> vs none cases
+//
+
+template<class T>
+inline
+bool operator == ( optional<T> const& x, none_t )
+{ return equal_pointees(x, optional<T>() ); }
+
+template<class T>
+inline
+bool operator < ( optional<T> const& x, none_t )
+{ return less_pointees(x,optional<T>() ); }
+
+template<class T>
+inline
+bool operator != ( optional<T> const& x, none_t y )
+{ return !( x == y ) ; }
+
+template<class T>
+inline
+bool operator > ( optional<T> const& x, none_t y )
+{ return y < x ; }
+
+template<class T>
+inline
+bool operator <= ( optional<T> const& x, none_t y )
+{ return !( y < x ) ; }
+
+template<class T>
+inline
+bool operator >= ( optional<T> const& x, none_t y )
+{ return !( x < y ) ; }
+
+//
+// none vs optional<T> cases
+//
+
+template<class T>
+inline
+bool operator == ( none_t , optional<T> const& y )
+{ return equal_pointees(optional<T>() ,y); }
+
+template<class T>
+inline
+bool operator < ( none_t , optional<T> const& y )
+{ return less_pointees(optional<T>() ,y); }
+
+template<class T>
+inline
+bool operator != ( none_t x, optional<T> const& y )
+{ return !( x == y ) ; }
+
+template<class T>
+inline
+bool operator > ( none_t x, optional<T> const& y )
+{ return y < x ; }
+
+template<class T>
+inline
+bool operator <= ( none_t x, optional<T> const& y )
+{ return !( y < x ) ; }
+
+template<class T>
+inline
+bool operator >= ( none_t x, optional<T> const& y )
+{ return !( x < y ) ; }
+
+namespace optional_detail {
+
+template<bool use_default_constructor> struct swap_selector;
+
+template<>
+struct swap_selector<true>
+{
+    template<class T>
+    static void optional_swap ( optional<T>& x, optional<T>& y )
+    {
+        const bool hasX = !!x;
+        const bool hasY = !!y;
+
+        if ( !hasX && !hasY )
+            return;
+
+        if( !hasX )
+            x = ndnboost::in_place();
+        else if ( !hasY )
+            y = ndnboost::in_place();
+
+        // Boost.Utility.Swap will take care of ADL and workarounds for broken compilers
+        ndnboost::swap(x.get(),y.get());
+
+        if( !hasX )
+            y = ndnboost::none ;
+        else if( !hasY )
+            x = ndnboost::none ;
+    }
+};
+
+template<>
+struct swap_selector<false>
+{
+    template<class T>
+    static void optional_swap ( optional<T>& x, optional<T>& y )
+    {
+        const bool hasX = !!x;
+        const bool hasY = !!y;
+
+        if ( !hasX && hasY )
+        {
+            x = y.get();
+            y = ndnboost::none ;
+        }
+        else if ( hasX && !hasY )
+        {
+            y = x.get();
+            x = ndnboost::none ;
+        }
+        else if ( hasX && hasY )
+        {
+            // Boost.Utility.Swap will take care of ADL and workarounds for broken compilers
+            ndnboost::swap(x.get(),y.get());
+        }
+    }
+};
+
+} // namespace optional_detail
+
+template<class T>
+struct optional_swap_should_use_default_constructor : has_nothrow_default_constructor<T> {} ;
+
+template<class T> inline void swap ( optional<T>& x, optional<T>& y )
+{
+    optional_detail::swap_selector<optional_swap_should_use_default_constructor<T>::value>::optional_swap(x, y);
+}
+
+} // namespace ndnboost
+
+#endif
diff --git a/ndnboost/optional/optional_fwd.hpp b/ndnboost/optional/optional_fwd.hpp
new file mode 100644
index 0000000..70fd54b
--- /dev/null
+++ b/ndnboost/optional/optional_fwd.hpp
@@ -0,0 +1,29 @@
+// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  fernando_cacciola@hotmail.com
+//
+// Revisions:
+// 10 May 2008 (added swap related forward declaration) Niels Dekker
+// 
+#ifndef BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
+#define BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
+
+namespace ndnboost {
+
+template<class T> class optional ;
+
+template<class T> void swap ( optional<T>& , optional<T>& ) ;
+
+template<class T> struct optional_swap_should_use_default_constructor ;
+
+} // namespace ndnboost
+
+#endif
+
diff --git a/ndnboost/preprocessor/arithmetic/detail/div_base.hpp b/ndnboost/preprocessor/arithmetic/detail/div_base.hpp
new file mode 100644
index 0000000..5f8e234
--- /dev/null
+++ b/ndnboost/preprocessor/arithmetic/detail/div_base.hpp
@@ -0,0 +1,61 @@
+# /* Copyright (C) 2001
+#  * Housemarque Oy
+#  * http://www.housemarque.com
+#  *
+#  * Distributed under the Boost Software License, Version 1.0. (See
+#  * accompanying file LICENSE_1_0.txt or copy at
+#  * http://www.boost.org/LICENSE_1_0.txt)
+#  */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP
+# define BOOST_PREPROCESSOR_ARITHMETIC_DETAIL_DIV_BASE_HPP
+#
+# include <ndnboost/preprocessor/arithmetic/inc.hpp>
+# include <ndnboost/preprocessor/arithmetic/sub.hpp>
+# include <ndnboost/preprocessor/comparison/less_equal.hpp>
+# include <ndnboost/preprocessor/config/config.hpp>
+# include <ndnboost/preprocessor/control/while.hpp>
+# include <ndnboost/preprocessor/tuple/elem.hpp>
+# include <ndnboost/preprocessor/tuple/rem.hpp>
+#
+# /* BOOST_PP_DIV_BASE */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+#    define BOOST_PP_DIV_BASE(x, y) BOOST_PP_WHILE(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
+# else
+#    define BOOST_PP_DIV_BASE(x, y) BOOST_PP_DIV_BASE_I(x, y)
+#    define BOOST_PP_DIV_BASE_I(x, y) BOOST_PP_WHILE(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
+# endif
+#
+# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
+#    define BOOST_PP_DIV_BASE_P(d, rxy) BOOST_PP_DIV_BASE_P_IM(d, BOOST_PP_TUPLE_REM_3 rxy)
+#    define BOOST_PP_DIV_BASE_P_IM(d, im) BOOST_PP_DIV_BASE_P_I(d, im)
+# else
+#    define BOOST_PP_DIV_BASE_P(d, rxy) BOOST_PP_DIV_BASE_P_I(d, BOOST_PP_TUPLE_ELEM(3, 0, rxy), BOOST_PP_TUPLE_ELEM(3, 1, rxy), BOOST_PP_TUPLE_ELEM(3, 2, rxy))
+# endif
+#
+# define BOOST_PP_DIV_BASE_P_I(d, r, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x)
+#
+# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
+#    define BOOST_PP_DIV_BASE_O(d, rxy) BOOST_PP_DIV_BASE_O_IM(d, BOOST_PP_TUPLE_REM_3 rxy)
+#    define BOOST_PP_DIV_BASE_O_IM(d, im) BOOST_PP_DIV_BASE_O_I(d, im)
+# else
+#    define BOOST_PP_DIV_BASE_O(d, rxy) BOOST_PP_DIV_BASE_O_I(d, BOOST_PP_TUPLE_ELEM(3, 0, rxy), BOOST_PP_TUPLE_ELEM(3, 1, rxy), BOOST_PP_TUPLE_ELEM(3, 2, rxy))
+# endif
+#
+# define BOOST_PP_DIV_BASE_O_I(d, r, x, y) (BOOST_PP_INC(r), BOOST_PP_SUB_D(d, x, y), y)
+#
+# /* BOOST_PP_DIV_BASE_D */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+#    define BOOST_PP_DIV_BASE_D(d, x, y) BOOST_PP_WHILE_ ## d(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
+# else
+#    define BOOST_PP_DIV_BASE_D(d, x, y) BOOST_PP_DIV_BASE_D_I(d, x, y)
+#    define BOOST_PP_DIV_BASE_D_I(d, x, y) BOOST_PP_WHILE_ ## d(BOOST_PP_DIV_BASE_P, BOOST_PP_DIV_BASE_O, (0, x, y))
+# endif
+#
+# endif
diff --git a/ndnboost/preprocessor/arithmetic/mod.hpp b/ndnboost/preprocessor/arithmetic/mod.hpp
new file mode 100644
index 0000000..aa85437
--- /dev/null
+++ b/ndnboost/preprocessor/arithmetic/mod.hpp
@@ -0,0 +1,39 @@
+# /* Copyright (C) 2001
+#  * Housemarque Oy
+#  * http://www.housemarque.com
+#  *
+#  * Distributed under the Boost Software License, Version 1.0. (See
+#  * accompanying file LICENSE_1_0.txt or copy at
+#  * http://www.boost.org/LICENSE_1_0.txt)
+#  */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_ARITHMETIC_MOD_HPP
+# define BOOST_PREPROCESSOR_ARITHMETIC_MOD_HPP
+#
+# include <ndnboost/preprocessor/arithmetic/detail/div_base.hpp>
+# include <ndnboost/preprocessor/config/config.hpp>
+# include <ndnboost/preprocessor/tuple/elem.hpp>
+#
+# /* BOOST_PP_MOD */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+#    define BOOST_PP_MOD(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y))
+# else
+#    define BOOST_PP_MOD(x, y) BOOST_PP_MOD_I(x, y)
+#    define BOOST_PP_MOD_I(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y))
+# endif
+#
+# /* BOOST_PP_MOD_D */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+#    define BOOST_PP_MOD_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y))
+# else
+#    define BOOST_PP_MOD_D(d, x, y) BOOST_PP_MOD_D_I(d, x, y)
+#    define BOOST_PP_MOD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y))
+# endif
+#
+# endif
diff --git a/ndnboost/preprocessor/comparison/greater.hpp b/ndnboost/preprocessor/comparison/greater.hpp
deleted file mode 100644
index 34e5a9e..0000000
--- a/ndnboost/preprocessor/comparison/greater.hpp
+++ /dev/null
@@ -1,38 +0,0 @@
-# /* Copyright (C) 2001
-#  * Housemarque Oy
-#  * http://www.housemarque.com
-#  *
-#  * Distributed under the Boost Software License, Version 1.0. (See
-#  * accompanying file LICENSE_1_0.txt or copy at
-#  * http://www.boost.org/LICENSE_1_0.txt)
-#  */
-#
-# /* Revised by Paul Mensonides (2002) */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_COMPARISON_GREATER_HPP
-# define BOOST_PREPROCESSOR_COMPARISON_GREATER_HPP
-#
-# include <ndnboost/preprocessor/comparison/less.hpp>
-# include <ndnboost/preprocessor/config/config.hpp>
-#
-# /* BOOST_PP_GREATER */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_GREATER(x, y) BOOST_PP_LESS(y, x)
-# else
-#    define BOOST_PP_GREATER(x, y) BOOST_PP_GREATER_I(x, y)
-#    define BOOST_PP_GREATER_I(x, y) BOOST_PP_LESS(y, x)
-# endif
-#
-# /* BOOST_PP_GREATER_D */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_GREATER_D(d, x, y) BOOST_PP_LESS_D(d, y, x)
-# else
-#    define BOOST_PP_GREATER_D(d, x, y) BOOST_PP_GREATER_D_I(d, x, y)
-#    define BOOST_PP_GREATER_D_I(d, x, y) BOOST_PP_LESS_D(d, y, x)
-# endif
-#
-# endif
diff --git a/ndnboost/preprocessor/comparison/less.hpp b/ndnboost/preprocessor/comparison/less.hpp
deleted file mode 100644
index 5f138cf..0000000
--- a/ndnboost/preprocessor/comparison/less.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-# /* Copyright (C) 2001
-#  * Housemarque Oy
-#  * http://www.housemarque.com
-#  *
-#  * Distributed under the Boost Software License, Version 1.0. (See
-#  * accompanying file LICENSE_1_0.txt or copy at
-#  * http://www.boost.org/LICENSE_1_0.txt)
-#  */
-#
-# /* Revised by Paul Mensonides (2002) */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_COMPARISON_LESS_HPP
-# define BOOST_PREPROCESSOR_COMPARISON_LESS_HPP
-#
-# include <ndnboost/preprocessor/comparison/less_equal.hpp>
-# include <ndnboost/preprocessor/comparison/not_equal.hpp>
-# include <ndnboost/preprocessor/config/config.hpp>
-# include <ndnboost/preprocessor/control/iif.hpp>
-# include <ndnboost/preprocessor/logical/bitand.hpp>
-# include <ndnboost/preprocessor/tuple/eat.hpp>
-#
-# /* BOOST_PP_LESS */
-#
-# if BOOST_PP_CONFIG_FLAGS() & (BOOST_PP_CONFIG_MWCC() | BOOST_PP_CONFIG_DMC())
-#    define BOOST_PP_LESS(x, y) BOOST_PP_BITAND(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL(x, y))
-# elif ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_LESS(x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL, 0 BOOST_PP_TUPLE_EAT_2)(x, y)
-# else
-#    define BOOST_PP_LESS(x, y) BOOST_PP_LESS_I(x, y)
-#    define BOOST_PP_LESS_I(x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL, 0 BOOST_PP_TUPLE_EAT_2)(x, y)
-# endif
-#
-# /* BOOST_PP_LESS_D */
-#
-# if BOOST_PP_CONFIG_FLAGS() & (BOOST_PP_CONFIG_MWCC() | BOOST_PP_CONFIG_DMC())
-#    define BOOST_PP_LESS_D(d, x, y) BOOST_PP_BITAND(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D(d, x, y))
-# elif ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_LESS_D(d, x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D, 0 BOOST_PP_TUPLE_EAT_3)(d, x, y)
-# else
-#    define BOOST_PP_LESS_D(d, x, y) BOOST_PP_LESS_D_I(d, x, y)
-#    define BOOST_PP_LESS_D_I(d, x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D, 0 BOOST_PP_TUPLE_EAT_3)(d, x, y)
-# endif
-#
-# endif
diff --git a/ndnboost/preprocessor/comparison/not_equal.hpp b/ndnboost/preprocessor/comparison/not_equal.hpp
deleted file mode 100644
index 9153890..0000000
--- a/ndnboost/preprocessor/comparison/not_equal.hpp
+++ /dev/null
@@ -1,814 +0,0 @@
-# /* Copyright (C) 2001
-#  * Housemarque Oy
-#  * http://www.housemarque.com
-#  *
-#  * Distributed under the Boost Software License, Version 1.0. (See
-#  * accompanying file LICENSE_1_0.txt or copy at
-#  * http://www.boost.org/LICENSE_1_0.txt)
-#  */
-#
-# /* Revised by Paul Mensonides (2002) */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_COMPARISON_NOT_EQUAL_HPP
-# define BOOST_PREPROCESSOR_COMPARISON_NOT_EQUAL_HPP
-#
-# include <ndnboost/preprocessor/cat.hpp>
-# include <ndnboost/preprocessor/config/config.hpp>
-# include <ndnboost/preprocessor/control/iif.hpp>
-#
-# /* BOOST_PP_NOT_EQUAL */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
-#    define BOOST_PP_NOT_EQUAL(x, y) BOOST_PP_NOT_EQUAL_I(x, y)
-# else
-#    define BOOST_PP_NOT_EQUAL(x, y) BOOST_PP_NOT_EQUAL_OO((x, y))
-#    define BOOST_PP_NOT_EQUAL_OO(par) BOOST_PP_NOT_EQUAL_I ## par
-# endif
-#
-# define BOOST_PP_NOT_EQUAL_I(x, y) BOOST_PP_CAT(BOOST_PP_NOT_EQUAL_CHECK_, BOOST_PP_NOT_EQUAL_ ## x(0, BOOST_PP_NOT_EQUAL_ ## y))
-#
-# /* BOOST_PP_NOT_EQUAL_D */
-#
-# define BOOST_PP_NOT_EQUAL_D(d, x, y) BOOST_PP_NOT_EQUAL(x, y)
-#
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NIL 1
-#
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_0(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_1(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_2(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_3(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_4(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_5(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_6(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_7(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_8(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_9(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_10(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_11(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_12(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_13(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_14(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_15(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_16(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_17(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_18(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_19(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_20(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_21(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_22(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_23(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_24(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_25(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_26(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_27(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_28(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_29(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_30(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_31(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_32(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_33(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_34(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_35(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_36(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_37(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_38(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_39(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_40(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_41(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_42(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_43(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_44(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_45(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_46(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_47(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_48(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_49(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_50(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_51(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_52(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_53(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_54(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_55(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_56(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_57(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_58(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_59(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_60(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_61(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_62(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_63(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_64(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_65(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_66(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_67(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_68(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_69(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_70(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_71(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_72(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_73(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_74(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_75(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_76(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_77(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_78(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_79(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_80(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_81(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_82(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_83(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_84(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_85(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_86(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_87(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_88(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_89(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_90(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_91(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_92(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_93(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_94(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_95(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_96(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_97(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_98(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_99(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_100(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_101(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_102(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_103(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_104(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_105(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_106(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_107(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_108(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_109(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_110(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_111(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_112(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_113(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_114(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_115(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_116(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_117(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_118(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_119(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_120(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_121(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_122(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_123(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_124(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_125(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_126(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_127(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_128(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_129(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_130(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_131(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_132(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_133(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_134(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_135(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_136(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_137(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_138(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_139(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_140(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_141(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_142(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_143(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_144(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_145(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_146(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_147(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_148(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_149(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_150(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_151(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_152(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_153(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_154(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_155(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_156(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_157(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_158(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_159(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_160(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_161(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_162(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_163(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_164(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_165(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_166(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_167(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_168(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_169(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_170(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_171(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_172(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_173(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_174(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_175(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_176(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_177(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_178(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_179(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_180(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_181(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_182(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_183(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_184(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_185(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_186(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_187(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_188(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_189(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_190(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_191(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_192(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_193(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_194(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_195(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_196(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_197(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_198(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_199(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_200(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_201(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_202(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_203(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_204(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_205(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_206(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_207(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_208(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_209(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_210(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_211(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_212(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_213(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_214(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_215(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_216(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_217(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_218(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_219(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_220(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_221(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_222(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_223(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_224(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_225(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_226(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_227(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_228(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_229(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_230(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_231(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_232(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_233(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_234(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_235(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_236(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_237(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_238(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_239(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_240(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_241(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_242(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_243(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_244(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_245(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_246(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_247(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_248(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_249(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_250(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_251(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_252(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_253(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_254(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_255(c, y) 0
-# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_256(c, y) 0
-#
-#if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC()
-#    define BOOST_PP_NOT_EQUAL_0(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_1(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_2(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_3(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_4(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_5(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_6(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_7(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_8(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_9(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_10(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_11(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_12(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_13(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_14(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_15(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_16(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_17(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_18(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_19(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_20(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_21(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_22(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_23(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_24(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_25(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_26(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_27(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_28(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_29(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_30(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_31(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_32(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_33(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_34(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_35(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_36(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_37(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_38(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_39(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_40(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_41(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_42(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_43(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_44(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_45(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_46(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_47(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_48(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_49(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_50(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_51(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_52(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_53(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_54(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_55(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_56(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_57(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_58(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_59(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_60(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_61(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_62(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_63(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_64(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_65(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_66(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_67(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_68(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_69(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_70(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_71(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_72(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_73(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_74(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_75(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_76(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_77(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_78(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_79(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_80(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_81(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_82(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_83(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_84(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_85(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_86(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_87(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_88(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_89(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_90(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_91(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_92(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_93(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_94(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_95(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_96(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_97(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_98(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_99(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_100(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_101(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_102(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_103(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_104(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_105(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_106(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_107(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_108(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_109(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_110(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_111(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_112(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_113(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_114(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_115(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_116(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_117(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_118(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_119(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_120(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_121(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_122(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_123(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_124(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_125(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_126(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_127(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_128(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_129(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_130(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_131(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_132(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_133(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_134(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_135(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_136(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_137(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_138(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_139(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_140(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_141(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_142(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_143(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_144(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_145(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_146(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_147(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_148(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_149(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_150(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_151(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_152(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_153(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_154(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_155(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_156(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_157(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_158(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_159(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_160(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_161(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_162(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_163(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_164(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_165(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_166(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_167(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_168(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_169(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_170(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_171(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_172(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_173(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_174(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_175(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_176(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_177(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_178(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_179(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_180(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_181(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_182(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_183(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_184(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_185(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_186(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_187(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_188(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_189(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_190(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_191(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_192(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_193(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_194(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_195(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_196(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_197(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_198(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_199(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_200(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_201(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_202(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_203(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_204(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_205(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_206(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_207(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_208(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_209(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_210(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_211(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_212(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_213(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_214(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_215(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_216(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_217(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_218(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_219(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_220(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_221(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_222(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_223(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_224(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_225(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_226(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_227(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_228(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_229(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_230(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_231(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_232(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_233(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_234(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_235(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_236(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_237(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_238(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_239(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_240(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_241(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_242(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_243(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_244(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_245(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_246(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_247(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_248(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_249(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_250(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_251(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_252(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_253(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_254(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_255(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_256(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
-# else
-#    define BOOST_PP_NOT_EQUAL_0(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_1(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_2(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_3(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_4(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_5(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_6(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_7(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_8(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_9(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_10(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_11(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_12(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_13(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_14(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_15(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_16(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_17(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_18(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_19(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_20(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_21(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_22(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_23(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_24(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_25(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_26(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_27(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_28(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_29(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_30(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_31(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_32(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_33(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_34(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_35(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_36(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_37(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_38(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_39(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_40(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_41(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_42(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_43(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_44(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_45(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_46(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_47(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_48(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_49(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_50(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_51(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_52(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_53(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_54(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_55(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_56(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_57(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_58(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_59(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_60(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_61(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_62(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_63(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_64(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_65(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_66(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_67(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_68(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_69(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_70(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_71(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_72(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_73(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_74(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_75(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_76(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_77(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_78(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_79(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_80(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_81(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_82(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_83(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_84(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_85(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_86(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_87(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_88(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_89(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_90(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_91(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_92(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_93(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_94(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_95(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_96(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_97(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_98(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_99(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_100(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_101(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_102(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_103(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_104(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_105(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_106(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_107(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_108(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_109(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_110(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_111(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_112(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_113(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_114(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_115(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_116(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_117(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_118(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_119(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_120(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_121(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_122(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_123(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_124(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_125(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_126(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_127(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_128(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_129(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_130(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_131(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_132(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_133(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_134(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_135(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_136(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_137(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_138(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_139(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_140(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_141(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_142(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_143(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_144(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_145(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_146(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_147(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_148(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_149(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_150(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_151(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_152(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_153(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_154(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_155(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_156(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_157(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_158(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_159(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_160(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_161(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_162(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_163(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_164(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_165(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_166(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_167(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_168(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_169(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_170(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_171(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_172(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_173(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_174(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_175(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_176(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_177(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_178(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_179(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_180(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_181(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_182(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_183(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_184(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_185(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_186(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_187(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_188(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_189(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_190(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_191(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_192(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_193(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_194(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_195(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_196(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_197(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_198(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_199(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_200(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_201(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_202(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_203(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_204(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_205(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_206(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_207(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_208(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_209(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_210(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_211(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_212(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_213(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_214(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_215(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_216(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_217(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_218(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_219(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_220(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_221(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_222(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_223(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_224(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_225(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_226(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_227(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_228(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_229(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_230(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_231(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_232(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_233(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_234(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_235(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_236(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_237(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_238(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_239(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_240(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_241(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_242(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_243(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_244(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_245(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_246(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_247(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_248(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_249(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_250(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_251(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_252(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_253(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_254(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_255(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-#    define BOOST_PP_NOT_EQUAL_256(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
-# endif
-#
-# endif
diff --git a/ndnboost/preprocessor/control/deduce_d.hpp b/ndnboost/preprocessor/control/deduce_d.hpp
new file mode 100644
index 0000000..1aba271
--- /dev/null
+++ b/ndnboost/preprocessor/control/deduce_d.hpp
@@ -0,0 +1,22 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP
+# define BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP
+#
+# include <ndnboost/preprocessor/control/while.hpp>
+# include <ndnboost/preprocessor/detail/auto_rec.hpp>
+#
+# /* BOOST_PP_DEDUCE_D */
+#
+# define BOOST_PP_DEDUCE_D() BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)
+#
+# endif
diff --git a/ndnboost/preprocessor/facilities/expand.hpp b/ndnboost/preprocessor/facilities/expand.hpp
deleted file mode 100644
index 6212830..0000000
--- a/ndnboost/preprocessor/facilities/expand.hpp
+++ /dev/null
@@ -1,28 +0,0 @@
-# /* Copyright (C) 2001
-#  * Housemarque Oy
-#  * http://www.housemarque.com
-#  *
-#  * Distributed under the Boost Software License, Version 1.0. (See
-#  * accompanying file LICENSE_1_0.txt or copy at
-#  * http://www.boost.org/LICENSE_1_0.txt)
-#  */
-#
-# /* Revised by Paul Mensonides (2002) */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP
-# define BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP
-#
-# include <ndnboost/preprocessor/config/config.hpp>
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC()
-#    define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_I(x)
-# else
-#    define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_OO((x))
-#    define BOOST_PP_EXPAND_OO(par) BOOST_PP_EXPAND_I ## par
-# endif
-#
-# define BOOST_PP_EXPAND_I(x) x
-#
-# endif
diff --git a/ndnboost/preprocessor/punctuation/paren_if.hpp b/ndnboost/preprocessor/punctuation/paren_if.hpp
deleted file mode 100644
index 1d1affd..0000000
--- a/ndnboost/preprocessor/punctuation/paren_if.hpp
+++ /dev/null
@@ -1,38 +0,0 @@
-# /* **************************************************************************
-#  *                                                                          *
-#  *     (C) Copyright Paul Mensonides 2002.
-#  *     Distributed under the Boost Software License, Version 1.0. (See
-#  *     accompanying file LICENSE_1_0.txt or copy at
-#  *     http://www.boost.org/LICENSE_1_0.txt)
-#  *                                                                          *
-#  ************************************************************************** */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_PUNCTUATION_PAREN_IF_HPP
-# define BOOST_PREPROCESSOR_PUNCTUATION_PAREN_IF_HPP
-#
-# include <ndnboost/preprocessor/config/config.hpp>
-# include <ndnboost/preprocessor/control/if.hpp>
-# include <ndnboost/preprocessor/facilities/empty.hpp>
-# include <ndnboost/preprocessor/punctuation/paren.hpp>
-#
-# /* BOOST_PP_LPAREN_IF */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_LPAREN_IF(cond) BOOST_PP_IF(cond, BOOST_PP_LPAREN, BOOST_PP_EMPTY)()
-# else
-#    define BOOST_PP_LPAREN_IF(cond) BOOST_PP_LPAREN_IF_I(cond)
-#    define BOOST_PP_LPAREN_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_LPAREN, BOOST_PP_EMPTY)()
-# endif
-#
-# /* BOOST_PP_RPAREN_IF */
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_RPAREN_IF(cond) BOOST_PP_IF(cond, BOOST_PP_RPAREN, BOOST_PP_EMPTY)()
-# else
-#    define BOOST_PP_RPAREN_IF(cond) BOOST_PP_RPAREN_IF_I(cond)
-#    define BOOST_PP_RPAREN_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_RPAREN, BOOST_PP_EMPTY)()
-# endif
-#
-# endif
diff --git a/ndnboost/preprocessor/repeat_2nd.hpp b/ndnboost/preprocessor/repeat_2nd.hpp
new file mode 100644
index 0000000..0bd00b6
--- /dev/null
+++ b/ndnboost/preprocessor/repeat_2nd.hpp
@@ -0,0 +1,17 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_REPEAT_2ND_HPP
+# define BOOST_PREPROCESSOR_REPEAT_2ND_HPP
+#
+# include <ndnboost/preprocessor/repetition/repeat.hpp>
+#
+# endif
diff --git a/ndnboost/preprocessor/repetition/enum_shifted.hpp b/ndnboost/preprocessor/repetition/enum_shifted.hpp
deleted file mode 100644
index 6ff4218..0000000
--- a/ndnboost/preprocessor/repetition/enum_shifted.hpp
+++ /dev/null
@@ -1,68 +0,0 @@
-# /* Copyright (C) 2001
-#  * Housemarque Oy
-#  * http://www.housemarque.com
-#  *
-#  * Distributed under the Boost Software License, Version 1.0. (See
-#  * accompanying file LICENSE_1_0.txt or copy at
-#  * http://www.boost.org/LICENSE_1_0.txt)
-#  */
-#
-# /* Revised by Paul Mensonides (2002) */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_HPP
-# define BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_HPP
-#
-# include <ndnboost/preprocessor/cat.hpp>
-# include <ndnboost/preprocessor/arithmetic/dec.hpp>
-# include <ndnboost/preprocessor/arithmetic/inc.hpp>
-# include <ndnboost/preprocessor/config/config.hpp>
-# include <ndnboost/preprocessor/debug/error.hpp>
-# include <ndnboost/preprocessor/detail/auto_rec.hpp>
-# include <ndnboost/preprocessor/punctuation/comma_if.hpp>
-# include <ndnboost/preprocessor/repetition/repeat.hpp>
-# include <ndnboost/preprocessor/tuple/elem.hpp>
-# include <ndnboost/preprocessor/tuple/rem.hpp>
-#
-# /* BOOST_PP_ENUM_SHIFTED */
-#
-# if 0
-#    define BOOST_PP_ENUM_SHIFTED(count, macro, data)
-# endif
-#
-# define BOOST_PP_ENUM_SHIFTED BOOST_PP_CAT(BOOST_PP_ENUM_SHIFTED_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4))
-#
-# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
-#    define BOOST_PP_ENUM_SHIFTED_1(c, m, d) BOOST_PP_REPEAT_1(BOOST_PP_DEC(c), BOOST_PP_ENUM_SHIFTED_M_1, (m, d))
-#    define BOOST_PP_ENUM_SHIFTED_2(c, m, d) BOOST_PP_REPEAT_2(BOOST_PP_DEC(c), BOOST_PP_ENUM_SHIFTED_M_2, (m, d))
-#    define BOOST_PP_ENUM_SHIFTED_3(c, m, d) BOOST_PP_REPEAT_3(BOOST_PP_DEC(c), BOOST_PP_ENUM_SHIFTED_M_3, (m, d))
-# else
-#    define BOOST_PP_ENUM_SHIFTED_1(c, m, d) BOOST_PP_ENUM_SHIFTED_1_I(c, m, d)
-#    define BOOST_PP_ENUM_SHIFTED_2(c, m, d) BOOST_PP_ENUM_SHIFTED_1_2(c, m, d)
-#    define BOOST_PP_ENUM_SHIFTED_3(c, m, d) BOOST_PP_ENUM_SHIFTED_1_3(c, m, d)
-#    define BOOST_PP_ENUM_SHIFTED_1_I(c, m, d) BOOST_PP_REPEAT_1(BOOST_PP_DEC(c), BOOST_PP_ENUM_SHIFTED_M_1, (m, d))
-#    define BOOST_PP_ENUM_SHIFTED_2_I(c, m, d) BOOST_PP_REPEAT_2(BOOST_PP_DEC(c), BOOST_PP_ENUM_SHIFTED_M_2, (m, d))
-#    define BOOST_PP_ENUM_SHIFTED_3_I(c, m, d) BOOST_PP_REPEAT_3(BOOST_PP_DEC(c), BOOST_PP_ENUM_SHIFTED_M_3, (m, d))
-# endif
-#
-# define BOOST_PP_ENUM_SHIFTED_4(c, m, d) BOOST_PP_ERROR(0x0003)
-#
-# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
-#    define BOOST_PP_ENUM_SHIFTED_M_1(z, n, md) BOOST_PP_ENUM_SHIFTED_M_1_IM(z, n, BOOST_PP_TUPLE_REM_2 md)
-#    define BOOST_PP_ENUM_SHIFTED_M_2(z, n, md) BOOST_PP_ENUM_SHIFTED_M_2_IM(z, n, BOOST_PP_TUPLE_REM_2 md)
-#    define BOOST_PP_ENUM_SHIFTED_M_3(z, n, md) BOOST_PP_ENUM_SHIFTED_M_3_IM(z, n, BOOST_PP_TUPLE_REM_2 md)
-#    define BOOST_PP_ENUM_SHIFTED_M_1_IM(z, n, im) BOOST_PP_ENUM_SHIFTED_M_1_I(z, n, im)
-#    define BOOST_PP_ENUM_SHIFTED_M_2_IM(z, n, im) BOOST_PP_ENUM_SHIFTED_M_2_I(z, n, im)
-#    define BOOST_PP_ENUM_SHIFTED_M_3_IM(z, n, im) BOOST_PP_ENUM_SHIFTED_M_3_I(z, n, im)
-# else
-#    define BOOST_PP_ENUM_SHIFTED_M_1(z, n, md) BOOST_PP_ENUM_SHIFTED_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md))
-#    define BOOST_PP_ENUM_SHIFTED_M_2(z, n, md) BOOST_PP_ENUM_SHIFTED_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md))
-#    define BOOST_PP_ENUM_SHIFTED_M_3(z, n, md) BOOST_PP_ENUM_SHIFTED_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md))
-# endif
-#
-# define BOOST_PP_ENUM_SHIFTED_M_1_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, BOOST_PP_INC(n), d)
-# define BOOST_PP_ENUM_SHIFTED_M_2_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, BOOST_PP_INC(n), d)
-# define BOOST_PP_ENUM_SHIFTED_M_3_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, BOOST_PP_INC(n), d)
-#
-# endif
diff --git a/ndnboost/preprocessor/seq/for_each.hpp b/ndnboost/preprocessor/seq/for_each.hpp
new file mode 100644
index 0000000..02a082a
--- /dev/null
+++ b/ndnboost/preprocessor/seq/for_each.hpp
@@ -0,0 +1,60 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_HPP
+# define BOOST_PREPROCESSOR_SEQ_FOR_EACH_HPP
+#
+# include <ndnboost/preprocessor/arithmetic/dec.hpp>
+# include <ndnboost/preprocessor/config/config.hpp>
+# include <ndnboost/preprocessor/repetition/for.hpp>
+# include <ndnboost/preprocessor/seq/seq.hpp>
+# include <ndnboost/preprocessor/seq/size.hpp>
+# include <ndnboost/preprocessor/tuple/elem.hpp>
+# include <ndnboost/preprocessor/tuple/rem.hpp>
+#
+# /* BOOST_PP_SEQ_FOR_EACH */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+#    define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
+# else
+#    define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq)
+#    define BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
+# endif
+#
+# define BOOST_PP_SEQ_FOR_EACH_P(r, x) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(3, 2, x)))
+#
+# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
+#    define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I x
+# else
+#    define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I(BOOST_PP_TUPLE_ELEM(3, 0, x), BOOST_PP_TUPLE_ELEM(3, 1, x), BOOST_PP_TUPLE_ELEM(3, 2, x))
+# endif
+#
+# define BOOST_PP_SEQ_FOR_EACH_O_I(macro, data, seq) (macro, data, BOOST_PP_SEQ_TAIL(seq))
+#
+# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
+#    define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_IM(r, BOOST_PP_TUPLE_REM_3 x)
+#    define BOOST_PP_SEQ_FOR_EACH_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_M_I(r, im)
+# else
+#    define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_I(r, BOOST_PP_TUPLE_ELEM(3, 0, x), BOOST_PP_TUPLE_ELEM(3, 1, x), BOOST_PP_TUPLE_ELEM(3, 2, x))
+# endif
+#
+# define BOOST_PP_SEQ_FOR_EACH_M_I(r, macro, data, seq) macro(r, data, BOOST_PP_SEQ_HEAD(seq))
+#
+# /* BOOST_PP_SEQ_FOR_EACH_R */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+#    define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
+# else
+#    define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq)
+#    define BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
+# endif
+#
+# endif
diff --git a/ndnboost/progress.hpp b/ndnboost/progress.hpp
new file mode 100644
index 0000000..6bd387f
--- /dev/null
+++ b/ndnboost/progress.hpp
@@ -0,0 +1,143 @@
+//  boost progress.hpp header file  ------------------------------------------//
+
+//  Copyright Beman Dawes 1994-99.  Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/timer for documentation.
+
+//  Revision History
+//   1 Dec 01  Add leading progress display strings (suggested by Toon Knapen)
+//  20 May 01  Introduce several static_casts<> to eliminate warning messages
+//             (Fixed by Beman, reported by Herve Bronnimann)
+//  12 Jan 01  Change to inline implementation to allow use without library
+//             builds. See docs for more rationale. (Beman Dawes) 
+//  22 Jul 99  Name changed to .hpp
+//  16 Jul 99  Second beta
+//   6 Jul 99  Initial boost version
+
+#ifndef BOOST_PROGRESS_HPP
+#define BOOST_PROGRESS_HPP
+
+#include <ndnboost/timer.hpp>
+#include <ndnboost/utility.hpp>  // for noncopyable
+#include <ndnboost/cstdint.hpp>  // for uintmax_t
+#include <iostream>           // for ostream, cout, etc
+#include <string>             // for string
+
+namespace ndnboost {
+
+//  progress_timer  ----------------------------------------------------------//
+
+//  A progress_timer behaves like a timer except that the destructor displays
+//  an elapsed time message at an appropriate place in an appropriate form.
+
+class progress_timer : public timer, private noncopyable
+{
+  
+ public:
+  explicit progress_timer( std::ostream & os = std::cout )
+     // os is hint; implementation may ignore, particularly in embedded systems
+     : m_os(os) {}
+  ~progress_timer()
+  {
+  //  A) Throwing an exception from a destructor is a Bad Thing.
+  //  B) The progress_timer destructor does output which may throw.
+  //  C) A progress_timer is usually not critical to the application.
+  //  Therefore, wrap the I/O in a try block, catch and ignore all exceptions.
+    try
+    {
+      // use istream instead of ios_base to workaround GNU problem (Greg Chicares)
+      std::istream::fmtflags old_flags = m_os.setf( std::istream::fixed,
+                                                   std::istream::floatfield );
+      std::streamsize old_prec = m_os.precision( 2 );
+      m_os << elapsed() << " s\n" // "s" is System International d'Unites std
+                        << std::endl;
+      m_os.flags( old_flags );
+      m_os.precision( old_prec );
+    }
+
+    catch (...) {} // eat any exceptions
+  } // ~progress_timer
+
+ private:
+  std::ostream & m_os;
+};
+
+
+//  progress_display  --------------------------------------------------------//
+
+//  progress_display displays an appropriate indication of 
+//  progress at an appropriate place in an appropriate form.
+
+// NOTE: (Jan 12, 2001) Tried to change unsigned long to ndnboost::uintmax_t, but
+// found some compilers couldn't handle the required conversion to double.
+// Reverted to unsigned long until the compilers catch up. 
+
+class progress_display : private noncopyable
+{
+ public:
+  explicit progress_display( unsigned long expected_count,
+                             std::ostream & os = std::cout,
+                             const std::string & s1 = "\n", //leading strings
+                             const std::string & s2 = "",
+                             const std::string & s3 = "" )
+   // os is hint; implementation may ignore, particularly in embedded systems
+   : m_os(os), m_s1(s1), m_s2(s2), m_s3(s3) { restart(expected_count); }
+
+  void           restart( unsigned long expected_count )
+  //  Effects: display appropriate scale
+  //  Postconditions: count()==0, expected_count()==expected_count
+  {
+    _count = _next_tic_count = _tic = 0;
+    _expected_count = expected_count;
+
+    m_os << m_s1 << "0%   10   20   30   40   50   60   70   80   90   100%\n"
+         << m_s2 << "|----|----|----|----|----|----|----|----|----|----|"
+         << std::endl  // endl implies flush, which ensures display
+         << m_s3;
+    if ( !_expected_count ) _expected_count = 1;  // prevent divide by zero
+  } // restart
+
+  unsigned long  operator+=( unsigned long increment )
+  //  Effects: Display appropriate progress tic if needed.
+  //  Postconditions: count()== original count() + increment
+  //  Returns: count().
+  {
+    if ( (_count += increment) >= _next_tic_count ) { display_tic(); }
+    return _count;
+  }
+
+  unsigned long  operator++()           { return operator+=( 1 ); }
+  unsigned long  count() const          { return _count; }
+  unsigned long  expected_count() const { return _expected_count; }
+
+  private:
+  std::ostream &     m_os;  // may not be present in all imps
+  const std::string  m_s1;  // string is more general, safer than 
+  const std::string  m_s2;  //  const char *, and efficiency or size are
+  const std::string  m_s3;  //  not issues
+
+  unsigned long _count, _expected_count, _next_tic_count;
+  unsigned int  _tic;
+  void display_tic()
+  {
+    // use of floating point ensures that both large and small counts
+    // work correctly.  static_cast<>() is also used several places
+    // to suppress spurious compiler warnings. 
+    unsigned int tics_needed =
+      static_cast<unsigned int>(
+        (static_cast<double>(_count)/_expected_count)*50.0 );
+    do { m_os << '*' << std::flush; } while ( ++_tic < tics_needed );
+    _next_tic_count = 
+      static_cast<unsigned long>((_tic/50.0)*_expected_count);
+    if ( _count == _expected_count ) {
+      if ( _tic < 51 ) m_os << '*';
+      m_os << std::endl;
+      }
+  } // display_tic
+};
+
+} // namespace ndnboost
+
+#endif  // BOOST_PROGRESS_HPP
diff --git a/ndnboost/range/algorithm/equal.hpp b/ndnboost/range/algorithm/equal.hpp
new file mode 100644
index 0000000..27b741d
--- /dev/null
+++ b/ndnboost/range/algorithm/equal.hpp
@@ -0,0 +1,198 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009.
+//  Use, modification and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/range/concepts.hpp>
+#include <iterator>
+
+namespace ndnboost
+{
+    namespace range_detail
+    {
+        // An implementation of equality comparison that is optimized for iterator
+        // traversal categories less than RandomAccessTraversal.
+        template< class SinglePassTraversalReadableIterator1,
+                  class SinglePassTraversalReadableIterator2,
+                  class IteratorCategoryTag1,
+                  class IteratorCategoryTag2 >
+        inline bool equal_impl( SinglePassTraversalReadableIterator1 first1,
+                                SinglePassTraversalReadableIterator1 last1,
+                                SinglePassTraversalReadableIterator2 first2,
+                                SinglePassTraversalReadableIterator2 last2,
+                                IteratorCategoryTag1,
+                                IteratorCategoryTag2 )
+        {
+            while (true)
+            {
+                // If we have reached the end of the left range then this is
+                // the end of the loop. They are equal if and only if we have
+                // simultaneously reached the end of the right range.
+                if (first1 == last1)
+                    return first2 == last2;
+
+                // If we have reached the end of the right range at this line
+                // it indicates that the right range is shorter than the left
+                // and hence the result is false.
+                if (first2 == last2)
+                    return false;
+
+                // continue looping if and only if the values are equal
+                if (*first1 != *first2)
+                    break;
+
+                ++first1;
+                ++first2;
+            }
+
+            // Reaching this line in the algorithm indicates that a value
+            // inequality has been detected.
+            return false;
+        }
+
+        template< class SinglePassTraversalReadableIterator1,
+                  class SinglePassTraversalReadableIterator2,
+                  class IteratorCategoryTag1,
+                  class IteratorCategoryTag2,
+                  class BinaryPredicate >
+        inline bool equal_impl( SinglePassTraversalReadableIterator1 first1,
+                                SinglePassTraversalReadableIterator1 last1,
+                                SinglePassTraversalReadableIterator2 first2,
+                                SinglePassTraversalReadableIterator2 last2,
+                                BinaryPredicate                      pred,
+                                IteratorCategoryTag1,
+                                IteratorCategoryTag2 )
+        {
+            while (true)
+            {
+                // If we have reached the end of the left range then this is
+                // the end of the loop. They are equal if and only if we have
+                // simultaneously reached the end of the right range.
+                if (first1 == last1)
+                    return first2 == last2;
+
+                // If we have reached the end of the right range at this line
+                // it indicates that the right range is shorter than the left
+                // and hence the result is false.
+                if (first2 == last2)
+                    return false;
+
+                // continue looping if and only if the values are equal
+                if (!pred(*first1, *first2))
+                    break;
+
+                ++first1;
+                ++first2;
+            }
+
+            // Reaching this line in the algorithm indicates that a value
+            // inequality has been detected.
+            return false;
+        }
+
+        // An implementation of equality comparison that is optimized for
+        // random access iterators.
+        template< class RandomAccessTraversalReadableIterator1,
+                  class RandomAccessTraversalReadableIterator2 >
+        inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1,
+                                RandomAccessTraversalReadableIterator1 last1,
+                                RandomAccessTraversalReadableIterator2 first2,
+                                RandomAccessTraversalReadableIterator2 last2,
+                                std::random_access_iterator_tag,
+                                std::random_access_iterator_tag )
+        {
+            return ((last1 - first1) == (last2 - first2))
+                && std::equal(first1, last1, first2);
+        }
+
+        template< class RandomAccessTraversalReadableIterator1,
+                  class RandomAccessTraversalReadableIterator2,
+                  class BinaryPredicate >
+        inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1,
+                                RandomAccessTraversalReadableIterator1 last1,
+                                RandomAccessTraversalReadableIterator2 first2,
+                                RandomAccessTraversalReadableIterator2 last2,
+                                BinaryPredicate                        pred )
+        {
+            return ((last1 - first1) == (last2 - first2))
+                && std::equal(first1, last1, first2, pred);
+        }
+
+        template< class SinglePassTraversalReadableIterator1,
+                  class SinglePassTraversalReadableIterator2 >
+        inline bool equal( SinglePassTraversalReadableIterator1 first1,
+                           SinglePassTraversalReadableIterator1 last1,
+                           SinglePassTraversalReadableIterator2 first2,
+                           SinglePassTraversalReadableIterator2 last2 )
+        {
+            BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1;
+            BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2;
+
+            return equal_impl(first1, last1, first2, last2, tag1, tag2);
+        }
+
+        template< class SinglePassTraversalReadableIterator1,
+                  class SinglePassTraversalReadableIterator2,
+                  class BinaryPredicate >
+        inline bool equal( SinglePassTraversalReadableIterator1 first1,
+                           SinglePassTraversalReadableIterator1 last1,
+                           SinglePassTraversalReadableIterator2 first2,
+                           SinglePassTraversalReadableIterator2 last2,
+                           BinaryPredicate                      pred )
+        {
+            BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1;
+            BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2;
+
+            return equal_impl(first1, last1, first2, last2, pred, tag1, tag2);
+        }
+
+    } // namespace range_detail
+
+    namespace range
+    {
+
+        /// \brief template function equal
+        ///
+        /// range-based version of the equal std algorithm
+        ///
+        /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+        /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+        /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+        template< class SinglePassRange1, class SinglePassRange2 >
+        inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2 )
+        {
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+            return ::ndnboost::range_detail::equal(
+                ::ndnboost::begin(rng1), ::ndnboost::end(rng1),
+                ::ndnboost::begin(rng2), ::ndnboost::end(rng2) );
+        }
+
+        /// \overload
+        template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+        inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2,
+                           BinaryPredicate pred )
+        {
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+            return ::ndnboost::range_detail::equal(
+                ::ndnboost::begin(rng1), ::ndnboost::end(rng1),
+                ::ndnboost::begin(rng2), ::ndnboost::end(rng2),
+                pred);
+        }
+
+    } // namespace range
+    using ::ndnboost::range::equal;
+} // namespace ndnboost
+
+#endif // include guard
diff --git a/ndnboost/range/as_literal.hpp b/ndnboost/range/as_literal.hpp
new file mode 100644
index 0000000..82babd8
--- /dev/null
+++ b/ndnboost/range/as_literal.hpp
@@ -0,0 +1,127 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2006. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_AS_LITERAL_HPP
+#define BOOST_RANGE_AS_LITERAL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+#include <ndnboost/range/detail/as_literal.hpp>
+#else
+
+#include <ndnboost/range/iterator_range.hpp>
+#include <ndnboost/range/detail/str_types.hpp>
+
+#include <ndnboost/detail/workaround.hpp>
+
+#include <cstring>
+#ifndef BOOST_NO_CWCHAR
+#include <cwchar>
+#endif
+
+namespace ndnboost
+{
+    namespace range_detail
+    {
+        inline std::size_t length( const char* s )
+        {
+            return strlen( s );
+        }
+
+#ifndef BOOST_NO_CWCHAR
+        inline std::size_t length( const wchar_t* s )
+        {
+            return wcslen( s );
+        }
+#endif
+
+        //
+        // Remark: the compiler cannot choose between T* and T[sz]
+        // overloads, so we must put the T* internal to the
+        // unconstrained version.
+        //
+
+        inline bool is_char_ptr( char* )
+        {
+            return true;
+        }
+
+        inline bool is_char_ptr( const char* )
+        {
+            return true;
+        }
+
+#ifndef BOOST_NO_CWCHAR
+        inline bool is_char_ptr( wchar_t* )
+        {
+            return true;
+        }
+
+        inline bool is_char_ptr( const wchar_t* )
+        {
+            return true;
+        }
+#endif
+
+        template< class T >
+        inline long is_char_ptr( const T& /* r */ )
+        {
+            return 0L;
+        }
+
+        template< class T >
+        inline iterator_range<T*>
+        make_range( T* const r, bool )
+        {
+            return iterator_range<T*>( r, r + length(r) );
+        }
+
+        template< class T >
+        inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<T>::type>
+        make_range( T& r, long )
+        {
+            return ndnboost::make_iterator_range( r );
+        }
+
+    }
+
+    template< class Range >
+    inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<Range>::type>
+    as_literal( Range& r )
+    {
+        return range_detail::make_range( r, range_detail::is_char_ptr(r) );
+    }
+
+    template< class Range >
+    inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type>
+    as_literal( const Range& r )
+    {
+        return range_detail::make_range( r, range_detail::is_char_ptr(r) );
+    }
+
+    template< class Char, std::size_t sz >
+    inline iterator_range<Char*> as_literal( Char (&arr)[sz] )
+    {
+        return range_detail::make_range( arr, range_detail::is_char_ptr(arr) );
+    }
+
+    template< class Char, std::size_t sz >
+    inline iterator_range<const Char*> as_literal( const Char (&arr)[sz] )
+    {
+        return range_detail::make_range( arr, range_detail::is_char_ptr(arr) );
+    }
+}
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+#endif
diff --git a/ndnboost/range/begin.hpp b/ndnboost/range/begin.hpp
new file mode 100644
index 0000000..0143261
--- /dev/null
+++ b/ndnboost/range/begin.hpp
@@ -0,0 +1,143 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_BEGIN_HPP
+#define BOOST_RANGE_BEGIN_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/config.hpp>
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+#include <ndnboost/range/detail/begin.hpp>
+#else
+
+#include <ndnboost/range/iterator.hpp>
+
+namespace ndnboost
+{
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+    !BOOST_WORKAROUND(__GNUC__, < 3) \
+    /**/
+namespace range_detail
+{
+#endif
+
+    //////////////////////////////////////////////////////////////////////
+    // primary template
+    //////////////////////////////////////////////////////////////////////
+
+    template< typename C >
+    inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
+    range_begin( C& c )
+    {
+        //
+        // If you get a compile-error here, it is most likely because
+        // you have not implemented range_begin() properly in
+        // the namespace of C
+        //
+        return c.begin();
+    }
+
+    //////////////////////////////////////////////////////////////////////
+    // pair
+    //////////////////////////////////////////////////////////////////////
+
+    template< typename Iterator >
+    inline Iterator range_begin( const std::pair<Iterator,Iterator>& p )
+    {
+        return p.first;
+    }
+
+    template< typename Iterator >
+    inline Iterator range_begin( std::pair<Iterator,Iterator>& p )
+    {
+        return p.first;
+    }
+
+    //////////////////////////////////////////////////////////////////////
+    // array
+    //////////////////////////////////////////////////////////////////////
+
+    //
+    // May this be discarded? Or is it needed for bad compilers?
+    //
+    template< typename T, std::size_t sz >
+    inline const T* range_begin( const T (&a)[sz] )
+    {
+        return a;
+    }
+
+    template< typename T, std::size_t sz >
+    inline T* range_begin( T (&a)[sz] )
+    {
+        return a;
+    }
+
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+    !BOOST_WORKAROUND(__GNUC__, < 3) \
+    /**/
+} // namespace 'range_detail'
+#endif
+
+// Use a ADL namespace barrier to avoid ambiguity with other unqualified
+// calls. This is particularly important with C++0x encouraging
+// unqualified calls to begin/end.
+namespace range_adl_barrier
+{
+
+template< class T >
+inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T& r )
+{
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+    !BOOST_WORKAROUND(__GNUC__, < 3) \
+    /**/
+    using namespace range_detail;
+#endif
+    return range_begin( r );
+}
+
+template< class T >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
+{
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+    !BOOST_WORKAROUND(__GNUC__, < 3) \
+    /**/
+    using namespace range_detail;
+#endif
+    return range_begin( r );
+}
+
+    } // namespace range_adl_barrier
+} // namespace ndnboost
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+namespace ndnboost
+{
+    namespace range_adl_barrier
+    {
+        template< class T >
+        inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
+        const_begin( const T& r )
+        {
+            return ndnboost::range_adl_barrier::begin( r );
+        }
+    } // namespace range_adl_barrier
+
+    using namespace range_adl_barrier;
+} // namespace ndnboost
+
+#endif
+
diff --git a/ndnboost/range/concepts.hpp b/ndnboost/range/concepts.hpp
new file mode 100644
index 0000000..a8d4790
--- /dev/null
+++ b/ndnboost/range/concepts.hpp
@@ -0,0 +1,366 @@
+// Boost.Range library concept checks
+//
+//  Copyright Neil Groves 2009. Use, modification and distribution
+//  are subject to the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  Copyright Daniel Walker 2006. Use, modification and distribution
+//  are subject to the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_CONCEPTS_HPP
+#define BOOST_RANGE_CONCEPTS_HPP
+
+#include <ndnboost/concept_check.hpp>
+#include <ndnboost/iterator/iterator_concepts.hpp>
+#include <ndnboost/range/begin.hpp>
+#include <ndnboost/range/end.hpp>
+#include <ndnboost/range/iterator.hpp>
+#include <ndnboost/range/value_type.hpp>
+#include <ndnboost/range/detail/misc_concept.hpp>
+
+/*!
+ * \file
+ * \brief Concept checks for the Boost Range library.
+ *
+ * The structures in this file may be used in conjunction with the
+ * Boost Concept Check library to insure that the type of a function
+ * parameter is compatible with a range concept. If not, a meaningful
+ * compile time error is generated. Checks are provided for the range
+ * concepts related to iterator traversal categories. For example, the
+ * following line checks that the type T models the ForwardRange
+ * concept.
+ *
+ * \code
+ * BOOST_CONCEPT_ASSERT((ForwardRangeConcept<T>));
+ * \endcode
+ *
+ * A different concept check is required to ensure writeable value
+ * access. For example to check for a ForwardRange that can be written
+ * to, the following code is required.
+ *
+ * \code
+ * BOOST_CONCEPT_ASSERT((WriteableForwardRangeConcept<T>));
+ * \endcode
+ *
+ * \see http://www.boost.org/libs/range/doc/range.html for details
+ * about range concepts.
+ * \see http://www.boost.org/libs/iterator/doc/iterator_concepts.html
+ * for details about iterator concepts.
+ * \see http://www.boost.org/libs/concept_check/concept_check.htm for
+ * details about concept checks.
+ */
+
+namespace ndnboost {
+
+    namespace range_detail {
+
+#ifndef BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+
+// List broken compiler versions here:
+    #ifdef __GNUC__
+        // GNUC 4.2 has strange issues correctly detecting compliance with the Concepts
+        // hence the least disruptive approach is to turn-off the concept checking for
+        // this version of the compiler.
+        #if __GNUC__ == 4 && __GNUC_MINOR__ == 2
+            #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0
+        #endif
+    #endif
+
+    #ifdef __BORLANDC__
+        #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0
+    #endif
+
+    #ifdef __PATHCC__
+        #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0
+    #endif
+
+// Default to using the concept asserts unless we have defined it off
+// during the search for black listed compilers.
+    #ifndef BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+        #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 1
+    #endif
+
+#endif
+
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+    #define BOOST_RANGE_CONCEPT_ASSERT( x ) BOOST_CONCEPT_ASSERT( x )
+#else
+    #define BOOST_RANGE_CONCEPT_ASSERT( x )
+#endif
+
+        // Rationale for the inclusion of redefined iterator concept
+        // classes:
+        //
+        // The Range algorithms often do not require that the iterators are
+        // Assignable or default constructable, but the correct standard
+        // conformant iterators do require the iterators to be a model of the
+        // Assignable concept.
+        // Iterators that contains a functor that is not assignable therefore
+        // are not correct models of the standard iterator concepts,
+        // despite being adequate for most algorithms. An example of this
+        // use case is the combination of the ndnboost::adaptors::filtered
+        // class with a ndnboost::lambda::bind generated functor.
+        // Ultimately modeling the range concepts using composition
+        // with the Boost.Iterator concepts would render the library
+        // incompatible with many common Boost.Lambda expressions.
+        template<class Iterator>
+        struct IncrementableIteratorConcept : CopyConstructible<Iterator>
+        {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+            typedef BOOST_DEDUCED_TYPENAME iterator_traversal<Iterator>::type traversal_category;
+
+            BOOST_RANGE_CONCEPT_ASSERT((
+                Convertible<
+                    traversal_category,
+                    incrementable_traversal_tag
+                >));
+
+            BOOST_CONCEPT_USAGE(IncrementableIteratorConcept)
+            {
+                ++i;
+                (void)i++;
+            }
+        private:
+            Iterator i;
+#endif
+        };
+
+        template<class Iterator>
+        struct SinglePassIteratorConcept
+            : IncrementableIteratorConcept<Iterator>
+            , EqualityComparable<Iterator>
+        {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+            BOOST_RANGE_CONCEPT_ASSERT((
+                Convertible<
+                    BOOST_DEDUCED_TYPENAME SinglePassIteratorConcept::traversal_category,
+                    single_pass_traversal_tag
+                >));
+
+            BOOST_CONCEPT_USAGE(SinglePassIteratorConcept)
+            {
+                Iterator i2(++i);
+                ndnboost::ignore_unused_variable_warning(i2);
+
+                // deliberately we are loose with the postfix version for the single pass
+                // iterator due to the commonly poor adherence to the specification means that
+                // many algorithms would be unusable, whereas actually without the check they
+                // work
+                (void)(i++);
+
+                BOOST_DEDUCED_TYPENAME ndnboost::detail::iterator_traits<Iterator>::reference r1(*i);
+                ndnboost::ignore_unused_variable_warning(r1);
+
+                BOOST_DEDUCED_TYPENAME ndnboost::detail::iterator_traits<Iterator>::reference r2(*(++i));
+                ndnboost::ignore_unused_variable_warning(r2);
+            }
+        private:
+            Iterator i;
+#endif
+        };
+
+        template<class Iterator>
+        struct ForwardIteratorConcept
+            : SinglePassIteratorConcept<Iterator>
+            , DefaultConstructible<Iterator>
+        {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+            typedef BOOST_DEDUCED_TYPENAME ndnboost::detail::iterator_traits<Iterator>::difference_type difference_type;
+
+            BOOST_MPL_ASSERT((is_integral<difference_type>));
+            BOOST_MPL_ASSERT_RELATION(std::numeric_limits<difference_type>::is_signed, ==, true);
+
+            BOOST_RANGE_CONCEPT_ASSERT((
+                Convertible<
+                    BOOST_DEDUCED_TYPENAME ForwardIteratorConcept::traversal_category,
+                    forward_traversal_tag
+                >));
+
+            BOOST_CONCEPT_USAGE(ForwardIteratorConcept)
+            {
+                // See the above note in the SinglePassIteratorConcept about the handling of the
+                // postfix increment. Since with forward and better iterators there is no need
+                // for a proxy, we can sensibly require that the dereference result
+                // is convertible to reference.
+                Iterator i2(i++);
+                ndnboost::ignore_unused_variable_warning(i2);
+                BOOST_DEDUCED_TYPENAME ndnboost::detail::iterator_traits<Iterator>::reference r(*(i++));
+                ndnboost::ignore_unused_variable_warning(r);
+            }
+        private:
+            Iterator i;
+#endif
+         };
+
+         template<class Iterator>
+         struct BidirectionalIteratorConcept
+             : ForwardIteratorConcept<Iterator>
+         {
+ #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+             BOOST_RANGE_CONCEPT_ASSERT((
+                 Convertible<
+                     BOOST_DEDUCED_TYPENAME BidirectionalIteratorConcept::traversal_category,
+                     bidirectional_traversal_tag
+                 >));
+
+             BOOST_CONCEPT_USAGE(BidirectionalIteratorConcept)
+             {
+                 --i;
+                 (void)i--;
+             }
+         private:
+             Iterator i;
+ #endif
+         };
+
+         template<class Iterator>
+         struct RandomAccessIteratorConcept
+             : BidirectionalIteratorConcept<Iterator>
+         {
+ #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+             BOOST_RANGE_CONCEPT_ASSERT((
+                 Convertible<
+                     BOOST_DEDUCED_TYPENAME RandomAccessIteratorConcept::traversal_category,
+                     random_access_traversal_tag
+                 >));
+
+             BOOST_CONCEPT_USAGE(RandomAccessIteratorConcept)
+             {
+                 i += n;
+                 i = i + n;
+                 i = n + i;
+                 i -= n;
+                 i = i - n;
+                 n = i - j;
+             }
+         private:
+             BOOST_DEDUCED_TYPENAME RandomAccessIteratorConcept::difference_type n;
+             Iterator i;
+             Iterator j;
+ #endif
+         };
+
+    } // namespace range_detail
+
+    //! Check if a type T models the SinglePassRange range concept.
+    template<class T>
+    struct SinglePassRangeConcept
+    {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+         typedef BOOST_DEDUCED_TYPENAME range_iterator<T const>::type  const_iterator;
+         typedef BOOST_DEDUCED_TYPENAME range_iterator<T>::type        iterator;
+
+         BOOST_RANGE_CONCEPT_ASSERT((range_detail::SinglePassIteratorConcept<iterator>));
+         BOOST_RANGE_CONCEPT_ASSERT((range_detail::SinglePassIteratorConcept<const_iterator>));
+
+         BOOST_CONCEPT_USAGE(SinglePassRangeConcept)
+         {
+            // This has been modified from assigning to this->i
+            // (where i was a member variable) to improve
+            // compatibility with Boost.Lambda
+            iterator i1 = ndnboost::begin(*m_range);
+            iterator i2 = ndnboost::end(*m_range);
+
+            ignore_unused_variable_warning(i1);
+            ignore_unused_variable_warning(i2);
+
+            const_constraints(*m_range);
+        }
+
+    private:
+        void const_constraints(const T& const_range)
+        {
+            const_iterator ci1 = ndnboost::begin(const_range);
+            const_iterator ci2 = ndnboost::end(const_range);
+
+            ignore_unused_variable_warning(ci1);
+            ignore_unused_variable_warning(ci2);
+        }
+
+       // Rationale:
+       // The type of m_range is T* rather than T because it allows
+       // T to be an abstract class. The other obvious alternative of
+       // T& produces a warning on some compilers.
+       T* m_range;
+#endif
+    };
+
+    //! Check if a type T models the ForwardRange range concept.
+    template<class T>
+    struct ForwardRangeConcept : SinglePassRangeConcept<T>
+    {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+        BOOST_RANGE_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept<BOOST_DEDUCED_TYPENAME ForwardRangeConcept::iterator>));
+        BOOST_RANGE_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept<BOOST_DEDUCED_TYPENAME ForwardRangeConcept::const_iterator>));
+#endif
+    };
+
+    template<class Range>
+    struct WriteableRangeConcept
+    {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+        typedef BOOST_DEDUCED_TYPENAME range_iterator<Range>::type iterator;
+
+        BOOST_CONCEPT_USAGE(WriteableRangeConcept)
+        {
+            *i = v;
+        }
+    private:
+        iterator i;
+        BOOST_DEDUCED_TYPENAME range_value<Range>::type v;
+#endif
+    };
+
+    //! Check if a type T models the WriteableForwardRange range concept.
+    template<class T>
+    struct WriteableForwardRangeConcept
+        : ForwardRangeConcept<T>
+        , WriteableRangeConcept<T>
+    {
+    };
+
+    //! Check if a type T models the BidirectionalRange range concept.
+    template<class T>
+    struct BidirectionalRangeConcept : ForwardRangeConcept<T>
+    {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+        BOOST_RANGE_CONCEPT_ASSERT((range_detail::BidirectionalIteratorConcept<BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::iterator>));
+        BOOST_RANGE_CONCEPT_ASSERT((range_detail::BidirectionalIteratorConcept<BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::const_iterator>));
+#endif
+    };
+
+    //! Check if a type T models the WriteableBidirectionalRange range concept.
+    template<class T>
+    struct WriteableBidirectionalRangeConcept
+        : BidirectionalRangeConcept<T>
+        , WriteableRangeConcept<T>
+    {
+    };
+
+    //! Check if a type T models the RandomAccessRange range concept.
+    template<class T>
+    struct RandomAccessRangeConcept : BidirectionalRangeConcept<T>
+    {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+        BOOST_RANGE_CONCEPT_ASSERT((range_detail::RandomAccessIteratorConcept<BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::iterator>));
+        BOOST_RANGE_CONCEPT_ASSERT((range_detail::RandomAccessIteratorConcept<BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::const_iterator>));
+#endif
+    };
+
+    //! Check if a type T models the WriteableRandomAccessRange range concept.
+    template<class T>
+    struct WriteableRandomAccessRangeConcept
+        : RandomAccessRangeConcept<T>
+        , WriteableRangeConcept<T>
+    {
+    };
+
+} // namespace ndnboost
+
+#endif // BOOST_RANGE_CONCEPTS_HPP
diff --git a/ndnboost/range/config.hpp b/ndnboost/range/config.hpp
new file mode 100644
index 0000000..449007c
--- /dev/null
+++ b/ndnboost/range/config.hpp
@@ -0,0 +1,54 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_CONFIG_HPP
+#define BOOST_RANGE_CONFIG_HPP
+
+#include <ndnboost/detail/workaround.hpp>
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/config.hpp>
+
+#ifdef BOOST_RANGE_DEDUCED_TYPENAME
+#error "macro already defined!"
+#endif
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+# define BOOST_RANGE_DEDUCED_TYPENAME typename
+#else
+# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) && !defined(_MSC_EXTENSIONS)
+#  define BOOST_RANGE_DEDUCED_TYPENAME typename
+# else
+#  define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME
+# endif
+#endif
+
+#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT
+#error "macro already defined!"
+#endif
+
+#if BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) || BOOST_WORKAROUND( __MWERKS__, <= 0x3003 )
+#define BOOST_RANGE_NO_ARRAY_SUPPORT 1
+#endif
+
+#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT
+#define BOOST_RANGE_ARRAY_REF() (boost_range_array)
+#define BOOST_RANGE_NO_STATIC_ASSERT
+#else
+#define BOOST_RANGE_ARRAY_REF() (&boost_range_array)
+#endif
+
+
+
+#endif
+
diff --git a/ndnboost/range/const_iterator.hpp b/ndnboost/range/const_iterator.hpp
new file mode 100644
index 0000000..2b78e60
--- /dev/null
+++ b/ndnboost/range/const_iterator.hpp
@@ -0,0 +1,67 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_CONST_ITERATOR_HPP
+#define BOOST_RANGE_CONST_ITERATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/config.hpp>
+
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#include <ndnboost/range/detail/const_iterator.hpp>
+#else
+
+#include <ndnboost/range/detail/extract_optional_type.hpp>
+#include <ndnboost/type_traits/remove_const.hpp>
+#include <cstddef>
+#include <utility>
+
+namespace ndnboost
+{
+    //////////////////////////////////////////////////////////////////////////
+    // default
+    //////////////////////////////////////////////////////////////////////////
+    
+    namespace range_detail {
+        BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator )
+    }
+
+    template< typename C >
+    struct range_const_iterator : range_detail::extract_const_iterator<C>
+    {};
+    
+    //////////////////////////////////////////////////////////////////////////
+    // pair
+    //////////////////////////////////////////////////////////////////////////
+
+    template< typename Iterator >
+    struct range_const_iterator< std::pair<Iterator,Iterator> >
+    {
+        typedef Iterator type;
+    };
+    
+    //////////////////////////////////////////////////////////////////////////
+    // array
+    //////////////////////////////////////////////////////////////////////////
+
+    template< typename T, std::size_t sz >
+    struct range_const_iterator< T[sz] >
+    {
+        typedef const T* type;
+    };
+
+} // namespace ndnboost
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif
diff --git a/ndnboost/range/detail/as_literal.hpp b/ndnboost/range/detail/as_literal.hpp
new file mode 100644
index 0000000..94b1b6e
--- /dev/null
+++ b/ndnboost/range/detail/as_literal.hpp
@@ -0,0 +1,33 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2006. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_AS_LITERAL_HPP
+#define BOOST_RANGE_DETAIL_AS_LITERAL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/detail/detail_str.hpp>
+#include <ndnboost/range/iterator_range.hpp>
+
+namespace ndnboost
+{
+    template< class Range >
+    inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<Range>::type> 
+    as_literal( Range& r )
+    {
+        return ::ndnboost::make_iterator_range( ::ndnboost::range_detail::str_begin(r),
+                                             ::ndnboost::range_detail::str_end(r) );
+    }
+
+}
+
+#endif
diff --git a/ndnboost/range/detail/begin.hpp b/ndnboost/range/detail/begin.hpp
new file mode 100644
index 0000000..aea43cf
--- /dev/null
+++ b/ndnboost/range/detail/begin.hpp
@@ -0,0 +1,94 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_BEGIN_HPP
+#define BOOST_RANGE_DETAIL_BEGIN_HPP
+
+#include <ndnboost/config.hpp> // BOOST_MSVC
+#include <ndnboost/detail/workaround.hpp>
+#include <ndnboost/range/iterator.hpp>
+#include <ndnboost/range/detail/common.hpp>
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1310)
+# include <ndnboost/range/value_type.hpp>
+#endif
+
+namespace ndnboost
+{
+
+    namespace range_detail
+    {
+        template< typename T >
+        struct range_begin;
+
+        //////////////////////////////////////////////////////////////////////
+        // default
+        //////////////////////////////////////////////////////////////////////
+
+        template<>
+        struct range_begin<std_container_>
+        {
+            template< typename C >
+            static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type fun( C& c )
+            {
+                return c.begin();
+            };
+        };
+
+        //////////////////////////////////////////////////////////////////////
+        // pair
+        //////////////////////////////////////////////////////////////////////
+
+        template<>
+        struct range_begin<std_pair_>
+        {
+            template< typename P >
+            static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type fun( const P& p )
+            {
+                return p.first;
+            }
+        };
+
+        //////////////////////////////////////////////////////////////////////
+        // array
+        //////////////////////////////////////////////////////////////////////
+
+        template<>
+        struct range_begin<array_>
+        {
+        #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
+            template< typename T, std::size_t sz >
+            static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] )
+            {
+                return boost_range_array;
+            }
+        #else
+            template<typename T>
+            static BOOST_RANGE_DEDUCED_TYPENAME range_value<T>::type* fun(T& t)
+            {
+                return t;
+            }
+        #endif
+        };
+
+    } // namespace 'range_detail'
+
+    namespace range_adl_barrier
+    {
+        template< typename C >
+        inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
+        begin( C& c )
+        {
+            return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
+        }
+    }
+} // namespace 'boost'
+
+
+#endif
diff --git a/ndnboost/range/detail/common.hpp b/ndnboost/range/detail/common.hpp
new file mode 100644
index 0000000..f607721
--- /dev/null
+++ b/ndnboost/range/detail/common.hpp
@@ -0,0 +1,117 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_COMMON_HPP
+#define BOOST_RANGE_DETAIL_COMMON_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/config.hpp>
+#include <ndnboost/range/detail/sfinae.hpp>
+#include <ndnboost/type_traits/is_void.hpp>
+#include <ndnboost/type_traits/detail/ice_or.hpp>
+#include <ndnboost/mpl/if.hpp>
+#include <ndnboost/mpl/int.hpp>
+#include <cstddef>
+
+//////////////////////////////////////////////////////////////////////////////
+// missing partial specialization  workaround.
+//////////////////////////////////////////////////////////////////////////////
+
+namespace ndnboost 
+{
+    namespace range_detail 
+    {        
+        // 1 = std containers
+        // 2 = std::pair
+        // 3 = const std::pair
+        // 4 = array
+        // 5 = const array
+        // 6 = char array
+        // 7 = wchar_t array
+        // 8 = char*
+        // 9 = const char*
+        // 10 = whar_t*
+        // 11 = const wchar_t*
+        // 12 = string
+        
+        typedef mpl::int_<1>::type    std_container_;
+        typedef mpl::int_<2>::type    std_pair_;
+        typedef mpl::int_<3>::type    const_std_pair_;
+        typedef mpl::int_<4>::type    array_;
+        typedef mpl::int_<5>::type    const_array_;
+        typedef mpl::int_<6>::type    char_array_;
+        typedef mpl::int_<7>::type    wchar_t_array_;
+        typedef mpl::int_<8>::type    char_ptr_;
+        typedef mpl::int_<9>::type    const_char_ptr_;
+        typedef mpl::int_<10>::type   wchar_t_ptr_;
+        typedef mpl::int_<11>::type   const_wchar_t_ptr_;
+        typedef mpl::int_<12>::type   string_;
+        
+        template< typename C >
+        struct range_helper
+        {
+            static C* c;
+            static C  ptr;
+
+            BOOST_STATIC_CONSTANT( bool, is_pair_                = sizeof( ndnboost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type ) );
+            BOOST_STATIC_CONSTANT( bool, is_char_ptr_            = sizeof( ndnboost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type ) );
+            BOOST_STATIC_CONSTANT( bool, is_const_char_ptr_      = sizeof( ndnboost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type ) );
+            BOOST_STATIC_CONSTANT( bool, is_wchar_t_ptr_         = sizeof( ndnboost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) );
+            BOOST_STATIC_CONSTANT( bool, is_const_wchar_t_ptr_   = sizeof( ndnboost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) );
+            BOOST_STATIC_CONSTANT( bool, is_char_array_          = sizeof( ndnboost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type ) );
+            BOOST_STATIC_CONSTANT( bool, is_wchar_t_array_       = sizeof( ndnboost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type ) );
+            BOOST_STATIC_CONSTANT( bool, is_string_              = (ndnboost::type_traits::ice_or<is_const_char_ptr_, is_const_wchar_t_ptr_>::value ));
+            BOOST_STATIC_CONSTANT( bool, is_array_               = ndnboost::is_array<C>::value );
+            
+        };
+        
+        template< typename C >
+        class range
+        {
+            typedef BOOST_RANGE_DEDUCED_TYPENAME   ndnboost::mpl::if_c< ::ndnboost::range_detail::range_helper<C>::is_pair_,
+                                                                  ndnboost::range_detail::std_pair_,
+                                                                  void >::type pair_t;
+            typedef BOOST_RANGE_DEDUCED_TYPENAME   ndnboost::mpl::if_c< ::ndnboost::range_detail::range_helper<C>::is_array_,
+                                                                    ndnboost::range_detail::array_,
+                                                                    pair_t >::type array_t;
+            typedef BOOST_RANGE_DEDUCED_TYPENAME   ndnboost::mpl::if_c< ::ndnboost::range_detail::range_helper<C>::is_string_,
+                                                                    ndnboost::range_detail::string_,
+                                                                    array_t >::type string_t;
+            typedef BOOST_RANGE_DEDUCED_TYPENAME   ndnboost::mpl::if_c< ::ndnboost::range_detail::range_helper<C>::is_const_char_ptr_,
+                                                                    ndnboost::range_detail::const_char_ptr_,
+                                                                    string_t >::type const_char_ptr_t;
+            typedef BOOST_RANGE_DEDUCED_TYPENAME   ndnboost::mpl::if_c< ::ndnboost::range_detail::range_helper<C>::is_char_ptr_,
+                                                                    ndnboost::range_detail::char_ptr_,
+                                                                    const_char_ptr_t >::type char_ptr_t;
+            typedef BOOST_RANGE_DEDUCED_TYPENAME   ndnboost::mpl::if_c< ::ndnboost::range_detail::range_helper<C>::is_const_wchar_t_ptr_,
+                                                                    ndnboost::range_detail::const_wchar_t_ptr_,
+                                                                    char_ptr_t >::type const_wchar_ptr_t;
+            typedef BOOST_RANGE_DEDUCED_TYPENAME   ndnboost::mpl::if_c< ::ndnboost::range_detail::range_helper<C>::is_wchar_t_ptr_,
+                                                                    ndnboost::range_detail::wchar_t_ptr_,
+                                                                    const_wchar_ptr_t >::type wchar_ptr_t;
+            typedef BOOST_RANGE_DEDUCED_TYPENAME   ndnboost::mpl::if_c< ::ndnboost::range_detail::range_helper<C>::is_wchar_t_array_,
+                                                                    ndnboost::range_detail::wchar_t_array_,
+                                                                    wchar_ptr_t >::type wchar_array_t;
+            typedef BOOST_RANGE_DEDUCED_TYPENAME   ndnboost::mpl::if_c< ::ndnboost::range_detail::range_helper<C>::is_char_array_,
+                                                                    ndnboost::range_detail::char_array_,
+                                                                    wchar_array_t >::type char_array_t;
+        public:
+            typedef BOOST_RANGE_DEDUCED_TYPENAME   ndnboost::mpl::if_c< ::ndnboost::is_void<char_array_t>::value,
+                                                                    ndnboost::range_detail::std_container_,
+                                                                    char_array_t >::type type;  
+        }; // class 'range' 
+    }
+}
+        
+#endif
+
diff --git a/ndnboost/range/detail/const_iterator.hpp b/ndnboost/range/detail/const_iterator.hpp
new file mode 100644
index 0000000..a23c25a
--- /dev/null
+++ b/ndnboost/range/detail/const_iterator.hpp
@@ -0,0 +1,71 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_CONST_ITERATOR_HPP
+#define BOOST_RANGE_DETAIL_CONST_ITERATOR_HPP
+
+#include <ndnboost/range/detail/common.hpp>
+#include <ndnboost/range/detail/remove_extent.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// missing partial specialization  workaround.
+//////////////////////////////////////////////////////////////////////////////
+
+namespace ndnboost 
+{
+    namespace range_detail 
+    {      
+        template< typename T >
+        struct range_const_iterator_;
+
+        template<>
+        struct range_const_iterator_<std_container_>
+        {
+            template< typename C >
+            struct pts
+            {
+                typedef BOOST_RANGE_DEDUCED_TYPENAME C::const_iterator type;
+            };
+        };
+
+        template<>
+        struct range_const_iterator_<std_pair_>
+        {
+            template< typename P >
+            struct pts
+            {
+                typedef BOOST_RANGE_DEDUCED_TYPENAME P::first_type type;
+            };
+        };
+
+
+        template<>
+        struct range_const_iterator_<array_>
+        { 
+            template< typename T >
+            struct pts
+            {
+                typedef const BOOST_RANGE_DEDUCED_TYPENAME 
+                    remove_extent<T>::type* type;
+            };
+        };
+    } 
+    
+    template< typename C >
+    class range_const_iterator
+    {
+        typedef BOOST_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
+    public:
+        typedef BOOST_DEDUCED_TYPENAME range_detail::range_const_iterator_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type; 
+    };
+
+}
+
+#endif
diff --git a/ndnboost/range/detail/detail_str.hpp b/ndnboost/range/detail/detail_str.hpp
new file mode 100644
index 0000000..5519996
--- /dev/null
+++ b/ndnboost/range/detail/detail_str.hpp
@@ -0,0 +1,376 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_DETAIL_STR_HPP
+#define BOOST_RANGE_DETAIL_DETAIL_STR_HPP
+
+#include <ndnboost/config.hpp> // BOOST_MSVC
+#include <ndnboost/range/iterator.hpp>
+
+namespace ndnboost 
+{
+    
+    namespace range_detail
+    {
+        //
+        // iterator
+        //
+        
+        template<>
+        struct range_iterator_<char_array_>
+        { 
+            template< typename T >
+            struct pts
+            {
+                 typedef BOOST_RANGE_DEDUCED_TYPENAME 
+                    remove_extent<T>::type* type;
+            };
+        };
+
+        template<>
+        struct range_iterator_<char_ptr_>
+        {
+            template< typename S >
+            struct pts
+            {
+                typedef char* type; 
+            };         
+        };
+
+        template<>
+        struct range_iterator_<const_char_ptr_>
+        {
+            template< typename S >
+            struct pts
+            {
+                typedef const char* type;
+            };         
+        };
+
+        template<>
+        struct range_iterator_<wchar_t_ptr_>
+        {
+            template< typename S >
+            struct pts
+            {
+                typedef wchar_t* type; 
+            };         
+        };
+
+        template<>
+        struct range_iterator_<const_wchar_t_ptr_>
+        {
+             template< typename S >
+             struct pts
+             {
+                 typedef const wchar_t* type; 
+             };         
+        };
+
+
+        //
+        // const iterator
+        //
+
+        template<>
+        struct range_const_iterator_<char_array_>
+        { 
+            template< typename T >
+            struct pts
+            {
+                typedef const BOOST_RANGE_DEDUCED_TYPENAME 
+                    remove_extent<T>::type* type;
+            };
+        };
+
+        template<>
+        struct range_const_iterator_<char_ptr_>
+        {
+            template< typename S >
+            struct pts
+            {
+                typedef const char* type; 
+            };         
+        };
+
+        template<>
+        struct range_const_iterator_<const_char_ptr_>
+        {
+            template< typename S >
+            struct pts
+            {
+                typedef const char* type; 
+            };         
+        };
+
+        template<>
+        struct range_const_iterator_<wchar_t_ptr_>
+        {
+            template< typename S >
+            struct pts
+            {
+                typedef const wchar_t* type; 
+            };         
+        };
+
+        template<>
+        struct range_const_iterator_<const_wchar_t_ptr_>
+        {
+             template< typename S >
+             struct pts
+             {
+                 typedef const wchar_t* type; 
+             };         
+        };
+    }
+}
+
+#include <ndnboost/range/detail/begin.hpp>
+#include <ndnboost/range/detail/end.hpp>
+#include <ndnboost/range/detail/size_type.hpp>
+#include <ndnboost/range/detail/value_type.hpp>
+#include <ndnboost/range/detail/common.hpp>
+
+namespace ndnboost 
+{
+    
+    namespace range_detail
+    {
+        //
+        // str_begin()
+        //
+        template<>
+        struct range_begin<char_ptr_>
+        {
+            static char* fun( char* s )
+            {
+                return s;
+            }
+        };
+
+        template<>
+        struct range_begin<const_char_ptr_>
+        {
+            static const char* fun( const char* s )
+            {
+                return s;
+            }
+        };
+        
+        template<>
+        struct range_begin<wchar_t_ptr_>
+        {
+            
+            static wchar_t* fun( wchar_t* s )
+            {
+                return s;
+            }
+        };
+
+        template<>
+        struct range_begin<const_wchar_t_ptr_>
+        {
+            static const wchar_t* fun( const wchar_t* s )
+            {
+                return s;
+            }
+        };
+        
+        template< typename C >
+        inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type 
+        str_begin( C& c )
+        {
+            return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME 
+                range_detail::range<C>::type >::fun( c );
+        }
+
+        //
+        // str_end()
+        //
+
+        template<>
+        struct range_end<char_array_>
+        {
+            template< typename T, std::size_t sz >
+            static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] )
+            {
+                return ndnboost::range_detail::array_end( boost_range_array );
+            }
+        };
+        
+        template<>
+        struct range_end<wchar_t_array_>
+        {
+            template< typename T, std::size_t sz >
+            static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] )
+            {
+                return ndnboost::range_detail::array_end( boost_range_array );
+            }
+        };
+        
+        template<>
+        struct range_end<char_ptr_>
+        {
+            static char* fun( char* s )
+            {
+                return ndnboost::range_detail::str_end( s );
+            }
+        };
+
+        template<>
+        struct range_end<const_char_ptr_>
+        {
+            static const char* fun( const char* s )
+            {
+                return ndnboost::range_detail::str_end( s );
+            }
+        };
+
+        template<>
+        struct range_end<wchar_t_ptr_>
+        {
+            static wchar_t* fun( wchar_t* s )
+            {
+                return ndnboost::range_detail::str_end( s );
+            }
+        };
+
+
+        template<>
+        struct range_end<const_wchar_t_ptr_>
+        {
+            static const wchar_t* fun( const wchar_t* s )
+            {
+                return ndnboost::range_detail::str_end( s );
+            }
+        };
+
+        template< typename C >
+        inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type 
+        str_end( C& c )
+        {
+            return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME 
+                range_detail::range<C>::type >::fun( c );
+        }
+
+        //
+        // size_type
+        //
+
+        template<>
+        struct range_size_type_<char_array_>
+        { 
+            template< typename A >
+            struct pts
+            {
+                typedef std::size_t type;
+            };
+        };
+
+        template<>
+        struct range_size_type_<char_ptr_>
+        {
+            template< typename S >
+            struct pts
+            {
+                typedef std::size_t type;
+            };         
+        };
+        
+        template<>
+        struct range_size_type_<const_char_ptr_>
+        {
+            template< typename S >
+            struct pts
+            {
+                typedef std::size_t type;
+            };         
+        };
+        
+        template<>
+        struct range_size_type_<wchar_t_ptr_>
+        {
+            template< typename S >
+            struct pts
+            {
+                typedef std::size_t type;
+            };         
+        };
+        
+        template<>
+        struct range_size_type_<const_wchar_t_ptr_>
+        {
+            template< typename S >
+            struct pts
+            {
+                typedef std::size_t type;
+            };         
+        };  
+
+        //
+        // value_type
+        //
+        
+        template<>
+        struct range_value_type_<char_array_>
+        { 
+            template< typename T >
+            struct pts
+            {
+                typedef char type;
+            };
+        };
+
+        template<>
+        struct range_value_type_<char_ptr_>
+        {
+             template< typename S >
+             struct pts
+             {
+                 typedef char type; 
+             };         
+        };
+        
+        template<>
+        struct range_value_type_<const_char_ptr_>
+        {
+             template< typename S >
+             struct pts
+             {
+                 typedef const char type;
+             };         
+        };
+        
+        template<>
+        struct range_value_type_<wchar_t_ptr_>
+        {
+             template< typename S >
+             struct pts
+             {
+                 typedef wchar_t type;
+             };         
+        };
+        
+        template<>
+        struct range_value_type_<const_wchar_t_ptr_>
+        {
+            template< typename S >
+            struct pts
+            {
+                typedef const wchar_t type;
+            };         
+        };
+
+    } // namespace 'range_detail'
+
+} // namespace 'boost'
+
+
+#endif
diff --git a/ndnboost/range/detail/end.hpp b/ndnboost/range/detail/end.hpp
new file mode 100644
index 0000000..a16cf73
--- /dev/null
+++ b/ndnboost/range/detail/end.hpp
@@ -0,0 +1,101 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_END_HPP
+#define BOOST_RANGE_DETAIL_END_HPP
+
+#include <ndnboost/config.hpp> // BOOST_MSVC
+#include <ndnboost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+# include <ndnboost/range/detail/vc6/end.hpp>
+#else
+# include <ndnboost/range/detail/implementation_help.hpp>
+# include <ndnboost/range/iterator.hpp>
+# include <ndnboost/range/detail/common.hpp>
+# if BOOST_WORKAROUND(BOOST_MSVC, < 1310)
+#  include <ndnboost/range/detail/remove_extent.hpp>
+# endif
+
+namespace ndnboost
+{
+    namespace range_detail
+    {
+        template< typename T >
+        struct range_end;
+
+        //////////////////////////////////////////////////////////////////////
+        // default
+        //////////////////////////////////////////////////////////////////////
+
+        template<>
+        struct range_end<std_container_>
+        {
+            template< typename C >
+            static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
+            fun( C& c )
+            {
+                return c.end();
+            };
+        };
+
+        //////////////////////////////////////////////////////////////////////
+        // pair
+        //////////////////////////////////////////////////////////////////////
+
+        template<>
+        struct range_end<std_pair_>
+        {
+            template< typename P >
+            static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type
+            fun( const P& p )
+            {
+                return p.second;
+            }
+        };
+
+        //////////////////////////////////////////////////////////////////////
+        // array
+        //////////////////////////////////////////////////////////////////////
+
+        template<>
+        struct range_end<array_>
+        {
+        #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
+            template< typename T, std::size_t sz >
+            static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] )
+            {
+                return ndnboost::range_detail::array_end( boost_range_array );
+            }
+        #else
+            template<typename T>
+            static BOOST_RANGE_DEDUCED_TYPENAME remove_extent<T>::type* fun(T& t)
+            {
+                return t + remove_extent<T>::size;
+            }
+        #endif
+        };
+
+    } // namespace 'range_detail'
+
+    namespace range_adl_barrier
+    {
+        template< typename C >
+        inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
+        end( C& c )
+        {
+            return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
+        }
+    } // namespace range_adl_barrier
+
+} // namespace 'boost'
+
+# endif // VC6
+#endif
diff --git a/ndnboost/range/detail/extract_optional_type.hpp b/ndnboost/range/detail/extract_optional_type.hpp
new file mode 100644
index 0000000..e77f37c
--- /dev/null
+++ b/ndnboost/range/detail/extract_optional_type.hpp
@@ -0,0 +1,52 @@
+// Boost.Range library
+//
+//  Copyright Arno Schoedl & Neil Groves 2009.
+//  Use, modification and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/config.hpp>
+
+#ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
+
+#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef )                         \
+    template< typename C >                                                     \
+    struct extract_ ## a_typedef                                               \
+    {                                                                          \
+        typedef BOOST_DEDUCED_TYPENAME C::a_typedef type;                      \
+    };
+
+#else
+
+namespace ndnboost {
+    namespace range_detail {
+        template< typename T > struct exists { typedef void type; };
+    }
+}
+
+// Defines extract_some_typedef<T> which exposes T::some_typedef as
+// extract_some_typedef<T>::type if T::some_typedef exists. Otherwise
+// extract_some_typedef<T> is empty.
+#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef )                         \
+    template< typename C, typename Enable=void >                               \
+    struct extract_ ## a_typedef                                               \
+    {};                                                                        \
+    template< typename C >                                                     \
+    struct extract_ ## a_typedef< C                                            \
+    , BOOST_DEDUCED_TYPENAME ndnboost::range_detail::exists< BOOST_DEDUCED_TYPENAME C::a_typedef >::type \
+    > {                                                                        \
+        typedef BOOST_DEDUCED_TYPENAME C::a_typedef type;                      \
+    };
+
+#endif
+
+#endif // include guard
diff --git a/ndnboost/range/detail/implementation_help.hpp b/ndnboost/range/detail/implementation_help.hpp
new file mode 100644
index 0000000..9e80d6b
--- /dev/null
+++ b/ndnboost/range/detail/implementation_help.hpp
@@ -0,0 +1,103 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_IMPLEMENTATION_HELP_HPP
+#define BOOST_RANGE_DETAIL_IMPLEMENTATION_HELP_HPP
+
+#include <ndnboost/range/config.hpp>
+#include <ndnboost/range/detail/common.hpp>
+#include <ndnboost/type_traits/is_same.hpp>
+#include <cstddef>
+#include <string.h>
+
+#ifndef BOOST_NO_CWCHAR
+#include <wchar.h>
+#endif
+
+namespace ndnboost
+{
+    namespace range_detail
+    {
+        template <typename T>
+        inline void boost_range_silence_warning( const T& ) { }
+
+        /////////////////////////////////////////////////////////////////////
+        // end() help
+        /////////////////////////////////////////////////////////////////////
+
+        inline const char* str_end( const char* s, const char* )
+        {
+            return s + strlen( s );
+        }
+
+#ifndef BOOST_NO_CWCHAR
+        inline const wchar_t* str_end( const wchar_t* s, const wchar_t* )
+        {
+            return s + wcslen( s );
+        }
+#else
+        inline const wchar_t* str_end( const wchar_t* s, const wchar_t* )
+        {
+            if( s == 0 || s[0] == 0 )
+                return s;
+            while( *++s != 0 )
+                ;
+            return s;
+        }
+#endif
+
+        template< class Char >
+        inline Char* str_end( Char* s )
+        {
+            return const_cast<Char*>( str_end( s, s ) );
+        }
+
+        template< class T, std::size_t sz >
+        inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz] )
+        {
+            return boost_range_array + sz;
+        }
+
+        template< class T, std::size_t sz >
+        inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz] )
+        {
+            return boost_range_array + sz;
+        }
+
+        /////////////////////////////////////////////////////////////////////
+        // size() help
+        /////////////////////////////////////////////////////////////////////
+
+        template< class Char >
+        inline std::size_t str_size( const Char* const& s )
+        {
+            return str_end( s ) - s;
+        }
+
+        template< class T, std::size_t sz >
+        inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz] )
+        {
+            boost_range_silence_warning( boost_range_array );
+            return sz;
+        }
+
+        template< class T, std::size_t sz >
+        inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[sz] )
+        {
+            boost_range_silence_warning( boost_range_array );
+            return sz;
+        }
+
+    } // namespace 'range_detail'
+
+} // namespace 'boost'
+
+
+#endif
diff --git a/ndnboost/range/detail/iterator.hpp b/ndnboost/range/detail/iterator.hpp
new file mode 100644
index 0000000..c58b5ad
--- /dev/null
+++ b/ndnboost/range/detail/iterator.hpp
@@ -0,0 +1,78 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_ITERATOR_HPP
+#define BOOST_RANGE_DETAIL_ITERATOR_HPP
+
+#include <ndnboost/range/detail/common.hpp>
+#include <ndnboost/range/detail/remove_extent.hpp>
+
+#include <ndnboost/static_assert.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// missing partial specialization  workaround.
+//////////////////////////////////////////////////////////////////////////////
+
+namespace ndnboost 
+{
+    namespace range_detail 
+    {        
+        template< typename T >
+        struct range_iterator_ {
+            template< typename C >
+            struct pts
+            {
+                typedef int type;
+            };
+        };
+
+        template<>
+        struct range_iterator_<std_container_>
+        {
+            template< typename C >
+            struct pts
+            {
+                typedef BOOST_RANGE_DEDUCED_TYPENAME C::iterator type;
+            };
+        };
+
+        template<>
+        struct range_iterator_<std_pair_>
+        {
+            template< typename P >
+            struct pts
+            {
+                typedef BOOST_RANGE_DEDUCED_TYPENAME P::first_type type;
+            };
+        };
+
+        template<>
+        struct range_iterator_<array_>
+        { 
+            template< typename T >
+            struct pts
+            {
+                typedef BOOST_RANGE_DEDUCED_TYPENAME 
+                    remove_extent<T>::type* type;
+            };
+        };
+        
+    } 
+
+    template< typename C >
+    class range_mutable_iterator
+    {
+        typedef BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
+    public:
+        typedef typename range_detail::range_iterator_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type; 
+    };
+}
+
+#endif
diff --git a/ndnboost/range/detail/misc_concept.hpp b/ndnboost/range/detail/misc_concept.hpp
new file mode 100644
index 0000000..fb2a39c
--- /dev/null
+++ b/ndnboost/range/detail/misc_concept.hpp
@@ -0,0 +1,33 @@
+// Boost.Range library concept checks
+//
+//  Copyright Neil Groves 2009. Use, modification and distribution
+//  are subject to the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED
+
+#include <ndnboost/concept_check.hpp>
+
+namespace ndnboost
+{
+    namespace range_detail
+    {
+        template<typename T1, typename T2>
+        class SameTypeConcept
+        {
+        public:
+            BOOST_CONCEPT_USAGE(SameTypeConcept)
+            {
+                same_type(a,b);
+            }
+        private:
+            template<typename T> void same_type(T,T) {}
+            T1 a;
+            T2 b;
+        };
+    }
+}
+
+#endif // include guard
diff --git a/ndnboost/range/detail/remove_extent.hpp b/ndnboost/range/detail/remove_extent.hpp
new file mode 100644
index 0000000..9d89ed7
--- /dev/null
+++ b/ndnboost/range/detail/remove_extent.hpp
@@ -0,0 +1,157 @@
+// Boost.Range library
+//
+//  Copyright Jonathan Turkanis 2005. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+
+#ifndef BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP
+#define BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP
+
+#include <ndnboost/config.hpp>  // MSVC, NO_INTRINSIC_WCHAR_T, put size_t in std.
+#include <cstddef>
+#include <ndnboost/mpl/eval_if.hpp>
+#include <ndnboost/mpl/identity.hpp>
+#include <ndnboost/type_traits/is_same.hpp>
+
+namespace ndnboost 
+{
+    namespace range_detail
+    {
+        
+        template< typename Case1 = mpl::true_,
+                  typename Type1 = mpl::void_,
+                  typename Case2 = mpl::true_,
+                  typename Type2 = mpl::void_,
+                  typename Case3 = mpl::true_,
+                  typename Type3 = mpl::void_,
+                  typename Case4 = mpl::true_,
+                  typename Type4 = mpl::void_,
+                  typename Case5 = mpl::true_,
+                  typename Type5 = mpl::void_,
+                  typename Case6 = mpl::true_,
+                  typename Type6 = mpl::void_,
+                  typename Case7 = mpl::true_,
+                  typename Type7 = mpl::void_,
+                  typename Case8 = mpl::true_,
+                  typename Type8 = mpl::void_,
+                  typename Case9 = mpl::true_,
+                  typename Type9 = mpl::void_,
+                  typename Case10 = mpl::true_,
+                  typename Type10 = mpl::void_,
+                  typename Case11 = mpl::true_,
+                  typename Type11 = mpl::void_,
+                  typename Case12 = mpl::true_,
+                  typename Type12 = mpl::void_,
+                  typename Case13 = mpl::true_,
+                  typename Type13 = mpl::void_,
+                  typename Case14 = mpl::true_,
+                  typename Type14 = mpl::void_,
+                  typename Case15 = mpl::true_,
+                  typename Type15 = mpl::void_,
+                  typename Case16 = mpl::true_,
+                  typename Type16 = mpl::void_,
+                  typename Case17 = mpl::true_,
+                  typename Type17 = mpl::void_,
+                  typename Case18 = mpl::true_,
+                  typename Type18 = mpl::void_,
+                  typename Case19 = mpl::true_,
+                  typename Type19 = mpl::void_,
+                  typename Case20 = mpl::true_,
+                  typename Type20 = mpl::void_>
+        struct select {
+            typedef typename
+                    mpl::eval_if<
+                        Case1, mpl::identity<Type1>, mpl::eval_if<
+                        Case2, mpl::identity<Type2>, mpl::eval_if<
+                        Case3, mpl::identity<Type3>, mpl::eval_if<
+                        Case4, mpl::identity<Type4>, mpl::eval_if<
+                        Case5, mpl::identity<Type5>, mpl::eval_if<
+                        Case6, mpl::identity<Type6>, mpl::eval_if<
+                        Case7, mpl::identity<Type7>, mpl::eval_if<
+                        Case8, mpl::identity<Type8>, mpl::eval_if<
+                        Case9, mpl::identity<Type9>, mpl::if_<
+                        Case10, Type10, mpl::void_ > > > > > > > > >
+                    >::type result1;
+            typedef typename
+                    mpl::eval_if<
+                        Case11, mpl::identity<Type11>, mpl::eval_if<
+                        Case12, mpl::identity<Type12>, mpl::eval_if<
+                        Case13, mpl::identity<Type13>, mpl::eval_if<
+                        Case14, mpl::identity<Type14>, mpl::eval_if<
+                        Case15, mpl::identity<Type15>, mpl::eval_if<
+                        Case16, mpl::identity<Type16>, mpl::eval_if<
+                        Case17, mpl::identity<Type17>, mpl::eval_if<
+                        Case18, mpl::identity<Type18>, mpl::eval_if<
+                        Case19, mpl::identity<Type19>, mpl::if_<
+                        Case20, Type20, mpl::void_ > > > > > > > > >
+                    > result2;
+            typedef typename    
+                    mpl::eval_if<
+                        is_same<result1, mpl::void_>,
+                        result2,
+                        mpl::identity<result1>
+                    >::type type;
+        };
+
+        template<typename T>
+        struct remove_extent {
+            static T* ar;
+            BOOST_STATIC_CONSTANT(std::size_t, size = sizeof(*ar) / sizeof((*ar)[0]));
+
+            typedef typename
+                    select<
+                        is_same<T, bool[size]>,                  bool,
+                        is_same<T, char[size]>,                  char,
+                        is_same<T, signed char[size]>,           signed char,
+                        is_same<T, unsigned char[size]>,         unsigned char,
+                    #ifndef BOOST_NO_INTRINSIC_WCHAR_T
+                        is_same<T, wchar_t[size]>,               wchar_t,
+                    #endif
+                        is_same<T, short[size]>,                 short,
+                        is_same<T, unsigned short[size]>,        unsigned short,
+                        is_same<T, int[size]>,                   int,
+                        is_same<T, unsigned int[size]>,          unsigned int,
+                        is_same<T, long[size]>,                  long,
+                        is_same<T, unsigned long[size]>,         unsigned long,
+                        is_same<T, float[size]>,                 float,
+                        is_same<T, double[size]>,                double,
+                        is_same<T, long double[size]>,           long double
+                    >::type result1;
+            typedef typename
+                    select<
+                        is_same<T, const bool[size]>,            const bool,
+                        is_same<T, const char[size]>,            const char,
+                        is_same<T, const signed char[size]>,     const signed char,
+                        is_same<T, const unsigned char[size]>,   const unsigned char,
+                    #ifndef BOOST_NO_INTRINSIC_WCHAR_T
+                        is_same<T, const wchar_t[size]>,         const wchar_t,
+                    #endif
+                        is_same<T, const short[size]>,           const short,
+                        is_same<T, const unsigned short[size]>,  const unsigned short,
+                        is_same<T, const int[size]>,             const int,
+                        is_same<T, const unsigned int[size]>,    const unsigned int,
+                        is_same<T, const long[size]>,            const long,
+                        is_same<T, const unsigned long[size]>,   const unsigned long,
+                        is_same<T, const float[size]>,           const float,
+                        is_same<T, const double[size]>,          const double,
+                        is_same<T, const long double[size]>,     const long double
+                    > result2;
+            typedef typename
+                    mpl::eval_if<
+                        is_same<result1, mpl::void_>,
+                        result2,
+                        mpl::identity<result1>
+                    >::type type;
+        };
+
+    } // namespace 'range_detail'
+
+} // namespace 'boost'
+
+
+#endif
diff --git a/ndnboost/range/detail/safe_bool.hpp b/ndnboost/range/detail/safe_bool.hpp
new file mode 100644
index 0000000..fad34c4
--- /dev/null
+++ b/ndnboost/range/detail/safe_bool.hpp
@@ -0,0 +1,72 @@
+//  This header intentionally has no include guards.
+//
+//  Copyright (c) 2010 Neil Groves
+//  Distributed under the Boost Software License, Version 1.0.
+//  See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt
+//
+// This code utilises the experience gained during the evolution of
+// <ndnboost/smart_ptr/operator_bool.hpp>
+#ifndef BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP
+#define BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/range/config.hpp>
+
+namespace ndnboost
+{
+    namespace range_detail
+    {
+
+template<class DataMemberPtr>
+class safe_bool
+{
+public:
+    typedef safe_bool this_type;
+
+#if (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570)) || defined(__CINT_)
+    typedef bool unspecified_bool_type;
+    static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr)
+    {
+        return x;
+    }
+#elif defined(_MANAGED)
+    static void unspecified_bool(this_type***)
+    {
+    }
+    typedef void(*unspecified_bool_type)(this_type***);
+    static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr)
+    {
+        return x ? unspecified_bool : 0;
+    }
+#elif \
+    ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \
+    ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \
+    ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) )
+
+    typedef bool (this_type::*unspecified_bool_type)() const;
+
+    static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr)
+    {
+        return x ? &this_type::detail_safe_bool_member_fn : 0;
+    }
+private:
+    bool detail_safe_bool_member_fn() const { return false; }
+#else
+    typedef DataMemberPtr unspecified_bool_type;
+    static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr p)
+    {
+        return x ? p : 0;
+    }
+#endif
+private:
+    safe_bool();
+    safe_bool(const safe_bool&);
+    void operator=(const safe_bool&);
+    ~safe_bool();
+};
+
+    } // namespace range_detail
+} // namespace ndnboost
+
+#endif // include guard
diff --git a/ndnboost/range/detail/sfinae.hpp b/ndnboost/range/detail/sfinae.hpp
new file mode 100644
index 0000000..d940c3a
--- /dev/null
+++ b/ndnboost/range/detail/sfinae.hpp
@@ -0,0 +1,77 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_SFINAE_HPP
+#define BOOST_RANGE_DETAIL_SFINAE_HPP
+
+#include <ndnboost/range/config.hpp>
+#include <ndnboost/type_traits/is_array.hpp>
+#include <ndnboost/type_traits/detail/yes_no_type.hpp>
+#include <utility>
+
+
+namespace ndnboost 
+{
+    namespace range_detail
+    {          
+        using type_traits::yes_type;
+        using type_traits::no_type;
+
+        //////////////////////////////////////////////////////////////////////
+        // string
+        //////////////////////////////////////////////////////////////////////
+        
+        yes_type is_string_impl( const char* const );
+        yes_type is_string_impl( const wchar_t* const );
+        no_type  is_string_impl( ... );
+        
+        template< std::size_t sz >
+        yes_type is_char_array_impl( char BOOST_RANGE_ARRAY_REF()[sz] );
+        template< std::size_t sz >
+        yes_type is_char_array_impl( const char BOOST_RANGE_ARRAY_REF()[sz] );
+        no_type  is_char_array_impl( ... );
+        
+        template< std::size_t sz >
+        yes_type is_wchar_t_array_impl( wchar_t BOOST_RANGE_ARRAY_REF()[sz] );
+        template< std::size_t sz >
+        yes_type is_wchar_t_array_impl( const wchar_t BOOST_RANGE_ARRAY_REF()[sz] );
+        no_type  is_wchar_t_array_impl( ... );
+                                     
+        yes_type is_char_ptr_impl( char* const );
+        no_type  is_char_ptr_impl( ... );
+        
+        yes_type is_const_char_ptr_impl( const char* const );
+        no_type  is_const_char_ptr_impl( ... );
+
+        yes_type is_wchar_t_ptr_impl( wchar_t* const );
+        no_type  is_wchar_t_ptr_impl( ... );
+        
+        yes_type is_const_wchar_t_ptr_impl( const wchar_t* const );
+        no_type  is_const_wchar_t_ptr_impl( ... );
+        
+        //////////////////////////////////////////////////////////////////////
+        // pair
+        //////////////////////////////////////////////////////////////////////
+
+        template< typename Iterator >
+        yes_type is_pair_impl( const std::pair<Iterator,Iterator>* );
+        no_type  is_pair_impl( ... );
+
+        //////////////////////////////////////////////////////////////////////
+        // tags
+        //////////////////////////////////////////////////////////////////////
+
+        struct char_or_wchar_t_array_tag {};
+        
+    } // namespace 'range_detail'
+    
+} // namespace 'boost'
+
+#endif
diff --git a/ndnboost/range/detail/size_type.hpp b/ndnboost/range/detail/size_type.hpp
new file mode 100644
index 0000000..3314922
--- /dev/null
+++ b/ndnboost/range/detail/size_type.hpp
@@ -0,0 +1,55 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_SIZE_TYPE_HPP
+#define BOOST_RANGE_DETAIL_SIZE_TYPE_HPP
+
+#include <ndnboost/range/detail/common.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// missing partial specialization  workaround.
+//////////////////////////////////////////////////////////////////////////////
+
+namespace ndnboost
+{
+    namespace range_detail
+    {
+        template< typename T >
+        struct range_size_type_
+        {
+            template< typename C >
+            struct pts
+            {
+                typedef std::size_t type;
+            };
+        };
+
+        template<>
+        struct range_size_type_<std_container_>
+        {
+            template< typename C >
+            struct pts
+            {
+                typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type;
+            };
+        };
+    }
+
+    template< typename C >
+    class range_size
+    {
+        typedef typename range_detail::range<C>::type c_type;
+    public:
+        typedef typename range_detail::range_size_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;
+    };
+}
+
+#endif
+
diff --git a/ndnboost/range/detail/str_types.hpp b/ndnboost/range/detail/str_types.hpp
new file mode 100644
index 0000000..1829762
--- /dev/null
+++ b/ndnboost/range/detail/str_types.hpp
@@ -0,0 +1,38 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2006. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_STR_TYPES_HPP
+#define BOOST_RANGE_DETAIL_STR_TYPES_HPP
+
+#include <ndnboost/range/size_type.hpp>
+#include <ndnboost/range/iterator.hpp>
+
+namespace ndnboost
+{
+    template< class T >
+    struct range_mutable_iterator<T*>
+    {
+        typedef T* type;
+    };
+
+    template< class T >
+    struct range_const_iterator<T*>
+    {
+        typedef const T* type;
+    };
+
+    template< class T >
+    struct range_size<T*>
+    {
+       typedef std::size_t type;
+    };    
+}
+
+#endif
diff --git a/ndnboost/range/detail/value_type.hpp b/ndnboost/range/detail/value_type.hpp
new file mode 100644
index 0000000..f5c919b
--- /dev/null
+++ b/ndnboost/range/detail/value_type.hpp
@@ -0,0 +1,72 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_VALUE_TYPE_HPP
+#define BOOST_RANGE_DETAIL_VALUE_TYPE_HPP
+
+#include <ndnboost/range/detail/common.hpp>
+#include <ndnboost/range/detail/remove_extent.hpp>
+#include <ndnboost/iterator/iterator_traits.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// missing partial specialization  workaround.
+//////////////////////////////////////////////////////////////////////////////
+
+namespace ndnboost 
+{
+    namespace range_detail 
+    {        
+        template< typename T >
+        struct range_value_type_;
+
+        template<>
+        struct range_value_type_<std_container_>
+        {
+            template< typename C >
+            struct pts
+            {
+                typedef BOOST_RANGE_DEDUCED_TYPENAME C::value_type type;
+            };
+        };
+
+        template<>
+        struct range_value_type_<std_pair_>
+        {
+            template< typename P >
+            struct pts
+            {
+                typedef BOOST_RANGE_DEDUCED_TYPENAME ndnboost::iterator_value< BOOST_RANGE_DEDUCED_TYPENAME P::first_type >::type type;
+            };
+        };
+
+        template<>
+        struct range_value_type_<array_>
+        { 
+            template< typename T >
+            struct pts
+            {
+                typedef BOOST_DEDUCED_TYPENAME remove_extent<T>::type type;
+            };
+        };
+        
+    } 
+    
+    template< typename C >
+    class range_value
+    {
+        typedef BOOST_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
+    public:
+        typedef BOOST_DEDUCED_TYPENAME range_detail::range_value_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type; 
+    };
+
+}
+
+#endif
+
diff --git a/ndnboost/range/detail/vc6/end.hpp b/ndnboost/range/detail/vc6/end.hpp
new file mode 100644
index 0000000..1853de8
--- /dev/null
+++ b/ndnboost/range/detail/vc6/end.hpp
@@ -0,0 +1,170 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_VC6_END_HPP
+#define BOOST_RANGE_DETAIL_VC6_END_HPP
+
+#include <ndnboost/range/detail/implementation_help.hpp>
+#include <ndnboost/range/detail/implementation_help.hpp>
+#include <ndnboost/range/result_iterator.hpp>
+#include <ndnboost/range/detail/common.hpp>
+#include <ndnboost/range/detail/remove_extent.hpp>
+
+namespace ndnboost 
+{
+    namespace range_detail
+    {
+        template< typename T >
+        struct range_end;
+
+        //////////////////////////////////////////////////////////////////////
+        // default
+        //////////////////////////////////////////////////////////////////////
+        
+        template<>
+        struct range_end<std_container_>
+        {
+            template< typename C >
+            struct inner {
+                static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator<C>::type 
+                fun( C& c )
+                {
+                    return c.end();
+                };
+            };
+        };
+                    
+        //////////////////////////////////////////////////////////////////////
+        // pair
+        //////////////////////////////////////////////////////////////////////
+        
+        template<>
+        struct range_end<std_pair_>
+        {
+            template< typename P >
+            struct inner {
+                static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator<P>::type 
+                fun( const P& p )
+                {
+                    return p.second;
+                }
+            };
+        };
+ 
+        //////////////////////////////////////////////////////////////////////
+        // array
+        //////////////////////////////////////////////////////////////////////
+        
+        template<>
+        struct range_end<array_>  
+        {
+            template< typename T >
+            struct inner {
+                static BOOST_DEDUCED_TYPENAME remove_extent<T>::type*
+                fun(T& t)
+                {
+                    return t + remove_extent<T>::size;
+                }
+            };
+        };
+
+                
+        template<>
+        struct range_end<char_array_>
+        {
+            template< typename T >
+            struct inner {
+                static BOOST_DEDUCED_TYPENAME remove_extent<T>::type*
+                fun(T& t)
+                {
+                    return t + remove_extent<T>::size;
+                }
+            };
+        };
+        
+        template<>
+        struct range_end<wchar_t_array_>
+        {
+            template< typename T >
+            struct inner {
+                static BOOST_DEDUCED_TYPENAME remove_extent<T>::type*
+                fun(T& t)
+                {
+                    return t + remove_extent<T>::size;
+                }
+            };
+        };
+
+        //////////////////////////////////////////////////////////////////////
+        // string
+        //////////////////////////////////////////////////////////////////////
+        
+        template<>
+        struct range_end<char_ptr_>
+        {
+            template< typename T >
+            struct inner {
+                static char* fun( char* s )
+                {
+                    return ndnboost::range_detail::str_end( s );
+                }
+            };
+        };
+
+        template<>
+        struct range_end<const_char_ptr_>
+        {
+            template< typename T >
+            struct inner {
+                static const char* fun( const char* s )
+                {
+                    return ndnboost::range_detail::str_end( s );
+                }
+            };
+        };
+
+        template<>
+        struct range_end<wchar_t_ptr_>
+        {
+            template< typename T >
+            struct inner {
+                static wchar_t* fun( wchar_t* s )
+                {
+                    return ndnboost::range_detail::str_end( s );
+                }
+            };
+        };
+
+
+        template<>
+        struct range_end<const_wchar_t_ptr_>
+        {
+            template< typename T >
+            struct inner {
+                static const wchar_t* fun( const wchar_t* s )
+                {
+                    return ndnboost::range_detail::str_end( s );
+                }
+            };
+        };
+        
+    } // namespace 'range_detail'
+    
+    template< typename C >
+    inline BOOST_DEDUCED_TYPENAME range_result_iterator<C>::type 
+    end( C& c )
+    {
+        return range_detail::range_end<range_detail::range<C>::type>::inner<C>::fun( c );
+    }
+    
+} // namespace 'boost'
+
+
+#endif
diff --git a/ndnboost/range/difference_type.hpp b/ndnboost/range/difference_type.hpp
new file mode 100644
index 0000000..b26058a
--- /dev/null
+++ b/ndnboost/range/difference_type.hpp
@@ -0,0 +1,29 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DIFFERENCE_TYPE_HPP
+#define BOOST_RANGE_DIFFERENCE_TYPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/config.hpp>
+#include <ndnboost/range/iterator.hpp>
+#include <ndnboost/iterator/iterator_traits.hpp>
+
+namespace ndnboost
+{
+    template< class T >
+    struct range_difference : iterator_difference< typename range_iterator<T>::type >
+    { };
+}
+
+#endif
diff --git a/ndnboost/range/distance.hpp b/ndnboost/range/distance.hpp
new file mode 100644
index 0000000..12d93fa
--- /dev/null
+++ b/ndnboost/range/distance.hpp
@@ -0,0 +1,34 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2006. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DISTANCE_HPP
+#define BOOST_RANGE_DISTANCE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/begin.hpp>
+#include <ndnboost/range/end.hpp>
+#include <ndnboost/range/difference_type.hpp>
+
+namespace ndnboost 
+{
+
+    template< class T >
+    inline BOOST_DEDUCED_TYPENAME range_difference<T>::type 
+    distance( const T& r )
+    {
+        return std::distance( ndnboost::begin( r ), ndnboost::end( r ) );
+    }
+
+} // namespace 'boost'
+
+#endif
diff --git a/ndnboost/range/empty.hpp b/ndnboost/range/empty.hpp
new file mode 100644
index 0000000..6fdd177
--- /dev/null
+++ b/ndnboost/range/empty.hpp
@@ -0,0 +1,34 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_EMPTY_HPP
+#define BOOST_RANGE_EMPTY_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/config.hpp>
+#include <ndnboost/range/begin.hpp>
+#include <ndnboost/range/end.hpp>
+
+namespace ndnboost 
+{ 
+
+    template< class T >
+    inline bool empty( const T& r )
+    {
+        return ndnboost::begin( r ) == ndnboost::end( r );
+    }
+
+} // namespace 'boost'
+
+
+#endif
diff --git a/ndnboost/range/end.hpp b/ndnboost/range/end.hpp
new file mode 100644
index 0000000..9a7cb11
--- /dev/null
+++ b/ndnboost/range/end.hpp
@@ -0,0 +1,136 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_END_HPP
+#define BOOST_RANGE_END_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/config.hpp>
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+#include <ndnboost/range/detail/end.hpp>
+#else
+
+#include <ndnboost/range/detail/implementation_help.hpp>
+#include <ndnboost/range/iterator.hpp>
+#include <ndnboost/range/const_iterator.hpp>
+
+namespace ndnboost
+{
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+    !BOOST_WORKAROUND(__GNUC__, < 3) \
+    /**/
+namespace range_detail
+{
+#endif
+
+        //////////////////////////////////////////////////////////////////////
+        // primary template
+        //////////////////////////////////////////////////////////////////////
+        template< typename C >
+        inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
+        range_end( C& c )
+        {
+            //
+            // If you get a compile-error here, it is most likely because
+            // you have not implemented range_begin() properly in
+            // the namespace of C
+            //
+            return c.end();
+        }
+
+        //////////////////////////////////////////////////////////////////////
+        // pair
+        //////////////////////////////////////////////////////////////////////
+
+        template< typename Iterator >
+        inline Iterator range_end( const std::pair<Iterator,Iterator>& p )
+        {
+            return p.second;
+        }
+
+        template< typename Iterator >
+        inline Iterator range_end( std::pair<Iterator,Iterator>& p )
+        {
+            return p.second;
+        }
+
+        //////////////////////////////////////////////////////////////////////
+        // array
+        //////////////////////////////////////////////////////////////////////
+
+        template< typename T, std::size_t sz >
+        inline const T* range_end( const T (&a)[sz] )
+        {
+            return range_detail::array_end<T,sz>( a );
+        }
+
+        template< typename T, std::size_t sz >
+        inline T* range_end( T (&a)[sz] )
+        {
+            return range_detail::array_end<T,sz>( a );
+        }
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+    !BOOST_WORKAROUND(__GNUC__, < 3) \
+    /**/
+} // namespace 'range_detail'
+#endif
+
+namespace range_adl_barrier
+{
+
+template< class T >
+inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
+{
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+    !BOOST_WORKAROUND(__GNUC__, < 3) \
+    /**/
+    using namespace range_detail;
+#endif
+    return range_end( r );
+}
+
+template< class T >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
+{
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+    !BOOST_WORKAROUND(__GNUC__, < 3) \
+    /**/
+    using namespace range_detail;
+#endif
+    return range_end( r );
+}
+
+    } // namespace range_adl_barrier
+} // namespace 'boost'
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+namespace ndnboost
+{
+    namespace range_adl_barrier
+    {
+        template< class T >
+        inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
+        const_end( const T& r )
+        {
+            return ndnboost::range_adl_barrier::end( r );
+        }
+    } // namespace range_adl_barrier
+    using namespace range_adl_barrier;
+} // namespace ndnboost
+
+#endif
+
diff --git a/ndnboost/range/functions.hpp b/ndnboost/range/functions.hpp
new file mode 100644
index 0000000..7fa535f
--- /dev/null
+++ b/ndnboost/range/functions.hpp
@@ -0,0 +1,27 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2006. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_FUNCTIONS_HPP
+#define BOOST_RANGE_FUNCTIONS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/begin.hpp>
+#include <ndnboost/range/end.hpp>
+#include <ndnboost/range/size.hpp>
+#include <ndnboost/range/distance.hpp>
+#include <ndnboost/range/empty.hpp>
+#include <ndnboost/range/rbegin.hpp>
+#include <ndnboost/range/rend.hpp>
+
+#endif
+
diff --git a/ndnboost/range/iterator.hpp b/ndnboost/range/iterator.hpp
new file mode 100644
index 0000000..8710a2e
--- /dev/null
+++ b/ndnboost/range/iterator.hpp
@@ -0,0 +1,72 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ITERATOR_HPP
+#define BOOST_RANGE_ITERATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <ndnboost/range/config.hpp>
+#include <ndnboost/range/mutable_iterator.hpp>
+#include <ndnboost/range/const_iterator.hpp>
+#include <ndnboost/type_traits/is_const.hpp>
+#include <ndnboost/type_traits/remove_const.hpp>
+#include <ndnboost/mpl/eval_if.hpp>
+
+namespace ndnboost
+{
+
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+
+    namespace range_detail_vc7_1
+    {
+       template< typename C, typename Sig = void(C) >
+       struct range_iterator
+       {
+           typedef BOOST_RANGE_DEDUCED_TYPENAME
+               mpl::eval_if_c< is_const<C>::value,
+                               range_const_iterator< typename remove_const<C>::type >,
+                               range_mutable_iterator<C> >::type type;
+       };
+
+       template< typename C, typename T >
+       struct range_iterator< C, void(T[]) >
+       {
+           typedef T* type;
+       };
+    }
+
+#endif
+
+    template< typename C >
+    struct range_iterator
+    {
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+
+        typedef BOOST_RANGE_DEDUCED_TYPENAME
+               range_detail_vc7_1::range_iterator<C>::type type;
+
+#else
+
+        typedef BOOST_RANGE_DEDUCED_TYPENAME
+            mpl::eval_if_c< is_const<C>::value,
+                            range_const_iterator< typename remove_const<C>::type >,
+                            range_mutable_iterator<C> >::type type;
+
+#endif
+    };
+
+} // namespace ndnboost
+
+//#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif
diff --git a/ndnboost/range/iterator_range.hpp b/ndnboost/range/iterator_range.hpp
new file mode 100644
index 0000000..26a9016
--- /dev/null
+++ b/ndnboost/range/iterator_range.hpp
@@ -0,0 +1,16 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009.
+//  Use, modification and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ITERATOR_RANGE_HPP_INCLUDED
+#define BOOST_RANGE_ITERATOR_RANGE_HPP_INCLUDED
+
+#include "ndnboost/range/iterator_range_core.hpp"
+#include "ndnboost/range/iterator_range_io.hpp"
+
+#endif // include guard
diff --git a/ndnboost/range/iterator_range_core.hpp b/ndnboost/range/iterator_range_core.hpp
new file mode 100644
index 0000000..e4ca4ea
--- /dev/null
+++ b/ndnboost/range/iterator_range_core.hpp
@@ -0,0 +1,653 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves & Thorsten Ottosen & Pavol Droba 2003-2004.
+//  Use, modification and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED
+#define BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED
+
+#include <ndnboost/config.hpp> // Define __STL_CONFIG_H, if appropriate.
+#include <ndnboost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+    #pragma warning( push )
+    #pragma warning( disable : 4996 )
+#endif
+
+#include <ndnboost/assert.hpp>
+#include <ndnboost/iterator/iterator_traits.hpp>
+#include <ndnboost/iterator/iterator_facade.hpp>
+#include <ndnboost/mpl/or.hpp>
+#include <ndnboost/type_traits/is_abstract.hpp>
+#include <ndnboost/type_traits/is_array.hpp>
+#include <ndnboost/type_traits/is_pointer.hpp>
+#include <ndnboost/range/functions.hpp>
+#include <ndnboost/range/iterator.hpp>
+#include <ndnboost/range/difference_type.hpp>
+#include <ndnboost/range/algorithm/equal.hpp>
+#include <ndnboost/range/detail/safe_bool.hpp>
+#include <ndnboost/utility/enable_if.hpp>
+#include <iterator>
+#include <algorithm>
+#include <cstddef>
+
+/*! \file
+    Defines the \c iterator_class and related functions.
+    \c iterator_range is a simple wrapper of iterator pair idiom. It provides
+    a rich subset of Container interface.
+*/
+
+
+namespace ndnboost
+{
+    namespace iterator_range_detail
+    {
+        //
+        // The functions adl_begin and adl_end are implemented in a separate
+        // class for gcc-2.9x
+        //
+        template<class IteratorT>
+        struct iterator_range_impl {
+            template< class ForwardRange >
+            static IteratorT adl_begin( ForwardRange& r )
+            {
+                return static_cast<IteratorT>( ndnboost::begin( r ) );
+            }
+
+            template< class ForwardRange >
+            static IteratorT adl_end( ForwardRange& r )
+            {
+                return static_cast<IteratorT>( ndnboost::end( r ) );
+            }
+        };
+
+        template< class Left, class Right >
+        inline bool less_than( const Left& l, const Right& r )
+        {
+            return std::lexicographical_compare( ndnboost::begin(l),
+                                                 ndnboost::end(l),
+                                                 ndnboost::begin(r),
+                                                 ndnboost::end(r) );
+        }
+        
+        template< class Left, class Right >
+        inline bool greater_than( const Left& l, const Right& r )
+        {
+            return less_than(r,l);
+        }
+        
+        template< class Left, class Right >
+        inline bool less_or_equal_than( const Left& l, const Right& r )
+        {
+            return !iterator_range_detail::less_than(r,l);
+        }
+        
+        template< class Left, class Right >
+        inline bool greater_or_equal_than( const Left& l, const Right& r )
+        {
+            return !iterator_range_detail::less_than(l,r);
+        }
+
+        // This version is maintained since it is used in other boost libraries
+        // such as Boost.Assign
+        template< class Left, class Right >
+        inline bool equal(const Left& l, const Right& r)
+        {
+            return ndnboost::equal(l, r);
+        }
+
+        struct range_tag { };
+        struct const_range_tag { };
+    }
+
+//  iterator range template class -----------------------------------------//
+
+        //! iterator_range class
+        /*!
+            An \c iterator_range delimits a range in a sequence by beginning and ending iterators.
+            An iterator_range can be passed to an algorithm which requires a sequence as an input.
+            For example, the \c toupper() function may be used most frequently on strings,
+            but can also be used on iterator_ranges:
+
+            \code
+                ndnboost::tolower( find( s, "UPPERCASE STRING" ) );
+            \endcode
+
+            Many algorithms working with sequences take a pair of iterators,
+            delimiting a working range, as an arguments. The \c iterator_range class is an
+            encapsulation of a range identified by a pair of iterators.
+            It provides a collection interface,
+            so it is possible to pass an instance to an algorithm requiring a collection as an input.
+        */
+        template<class IteratorT>
+        class iterator_range
+        {
+            typedef range_detail::safe_bool< IteratorT iterator_range<IteratorT>::* > safe_bool_t;
+        protected: // Used by sub_range
+            //! implementation class
+            typedef iterator_range_detail::iterator_range_impl<IteratorT> impl;
+        public:
+            //! this type
+            typedef iterator_range<IteratorT> type;
+            typedef BOOST_DEDUCED_TYPENAME safe_bool_t::unspecified_bool_type unspecified_bool_type;
+            //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type);
+
+            //! Encapsulated value type
+            typedef BOOST_DEDUCED_TYPENAME
+                iterator_value<IteratorT>::type value_type;
+
+            //! Difference type
+            typedef BOOST_DEDUCED_TYPENAME
+                iterator_difference<IteratorT>::type difference_type;
+
+            //! Size type
+            typedef std::size_t size_type; // note: must be unsigned
+
+            //! This type
+            typedef iterator_range<IteratorT> this_type;
+
+            //! Reference type
+            //
+            // Needed because value-type is the same for
+            // const and non-const iterators
+            //
+            typedef BOOST_DEDUCED_TYPENAME
+                iterator_reference<IteratorT>::type reference;
+
+            //! const_iterator type
+            /*!
+                There is no distinction between const_iterator and iterator.
+                These typedefs are provides to fulfill container interface
+            */
+            typedef IteratorT const_iterator;
+            //! iterator type
+            typedef IteratorT iterator;
+
+        private: // for return value of operator()()
+            typedef BOOST_DEDUCED_TYPENAME
+                ndnboost::mpl::if_< ndnboost::mpl::or_< ndnboost::is_abstract< value_type >, 
+                                                  ndnboost::is_array< value_type > >,
+                                 reference, value_type >::type abstract_value_type;
+
+        public:
+            iterator_range() : m_Begin( iterator() ), m_End( iterator() )
+            { }
+
+            //! Constructor from a pair of iterators
+            template< class Iterator >
+            iterator_range( Iterator Begin, Iterator End ) :
+                m_Begin(Begin), m_End(End)
+            {}
+
+            //! Constructor from a Range
+            template< class Range >
+            iterator_range( const Range& r ) :
+                m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+            {}
+
+            //! Constructor from a Range
+            template< class Range >
+            iterator_range( Range& r ) :
+                m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+            {}
+
+            //! Constructor from a Range
+            template< class Range >
+            iterator_range( const Range& r, iterator_range_detail::const_range_tag ) :
+                m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+            {}
+
+            //! Constructor from a Range
+            template< class Range >
+            iterator_range( Range& r, iterator_range_detail::range_tag ) :
+                m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+            {}
+
+            #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+            this_type& operator=( const this_type& r )
+            {
+                m_Begin  = r.begin();
+                m_End    = r.end();
+                return *this;
+            }
+            #endif
+
+            template< class Iterator >
+            iterator_range& operator=( const iterator_range<Iterator>& r )
+            {
+                m_Begin  = r.begin();
+                m_End    = r.end();
+                return *this;
+            }
+
+            template< class ForwardRange >
+            iterator_range& operator=( ForwardRange& r )
+            {
+                m_Begin  = impl::adl_begin( r );
+                m_End    = impl::adl_end( r );
+                return *this;
+            }
+
+            template< class ForwardRange >
+            iterator_range& operator=( const ForwardRange& r )
+            {
+                m_Begin  = impl::adl_begin( r );
+                m_End    = impl::adl_end( r );
+                return *this;
+            }
+
+            IteratorT begin() const
+            {
+                return m_Begin;
+            }
+
+            IteratorT end() const
+            {
+                return m_End;
+            }
+
+            difference_type size() const
+            {
+                return m_End - m_Begin;
+            }
+
+            bool empty() const
+            {
+                return m_Begin == m_End;
+            }
+
+            operator unspecified_bool_type() const
+            {
+                return safe_bool_t::to_unspecified_bool(m_Begin != m_End, &iterator_range::m_Begin);
+            }
+
+            bool operator!() const
+            {
+                return empty();
+            }
+
+            bool equal( const iterator_range& r ) const
+            {
+                return m_Begin == r.m_Begin && m_End == r.m_End;
+            }
+
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+            bool operator==( const iterator_range& r ) const
+            {
+                return ndnboost::equal( *this, r );
+            }
+
+            bool operator!=( const iterator_range& r ) const
+            {
+                return !operator==(r);
+            }
+
+           bool operator<( const iterator_range& r ) const
+           {
+               return iterator_range_detail::less_than( *this, r );
+           }
+           
+           bool operator>( const iterator_range& r ) const
+           {
+               return iterator_range_detail::greater_than( *this, r );
+           }
+           
+           bool operator<=( const iterator_range& r ) const
+           {
+               return iterator_range_detail::less_or_equal_than( *this, r );
+           }
+           
+           bool operator>=( const iterator_range& r ) const
+           {
+               return iterator_range_detail::greater_or_equal_than( *this, r );
+           }
+
+#endif
+
+        public: // convenience
+           reference front() const
+           {
+               BOOST_ASSERT( !empty() );
+               return *m_Begin;
+           }
+
+           reference back() const
+           {
+               BOOST_ASSERT( !empty() );
+               IteratorT last( m_End );
+               return *--last;
+           }
+
+           // pop_front() - added to model the SinglePassRangePrimitiveConcept
+           void pop_front()
+           {
+               BOOST_ASSERT( !empty() );
+               ++m_Begin;
+           }
+
+           // pop_back() - added to model the BidirectionalRangePrimitiveConcept
+           void pop_back()
+           {
+               BOOST_ASSERT( !empty() );
+               --m_End;
+           }
+
+           reference operator[]( difference_type at ) const
+           {
+               BOOST_ASSERT( at >= 0 && at < size() );
+               return m_Begin[at];
+           }
+
+           //
+           // When storing transform iterators, operator[]()
+           // fails because it returns by reference. Therefore
+           // operator()() is provided for these cases.
+           //
+           abstract_value_type operator()( difference_type at ) const
+           {
+               BOOST_ASSERT( at >= 0 && at < size() );
+               return m_Begin[at];
+           }
+
+           iterator_range& advance_begin( difference_type n )
+           {
+               std::advance( m_Begin, n );
+               return *this;
+           }
+
+           iterator_range& advance_end( difference_type n )
+           {
+               std::advance( m_End, n );
+               return *this;
+           }
+
+        private:
+            // begin and end iterators
+            IteratorT m_Begin;
+            IteratorT m_End;
+
+        protected:
+            //
+            // Allow subclasses an easy way to access the
+            // base type
+            //
+            typedef iterator_range iterator_range_;
+        };
+
+//  iterator range free-standing operators ---------------------------//
+
+        /////////////////////////////////////////////////////////////////////
+        // comparison operators
+        /////////////////////////////////////////////////////////////////////
+
+        template< class IteratorT, class ForwardRange >
+        inline bool operator==( const ForwardRange& l,
+                                const iterator_range<IteratorT>& r )
+        {
+            return ndnboost::equal( l, r );
+        }
+
+        template< class IteratorT, class ForwardRange >
+        inline bool operator!=( const ForwardRange& l,
+                                const iterator_range<IteratorT>& r )
+        {
+            return !ndnboost::equal( l, r );
+        }
+
+        template< class IteratorT, class ForwardRange >
+        inline bool operator<( const ForwardRange& l,
+                               const iterator_range<IteratorT>& r )
+        {
+            return iterator_range_detail::less_than( l, r );
+        }
+        
+        template< class IteratorT, class ForwardRange >
+        inline bool operator<=( const ForwardRange& l,
+                                const iterator_range<IteratorT>& r )
+        {
+            return iterator_range_detail::less_or_equal_than( l, r );
+        }
+        
+        template< class IteratorT, class ForwardRange >
+        inline bool operator>( const ForwardRange& l,
+                               const iterator_range<IteratorT>& r )
+        {
+            return iterator_range_detail::greater_than( l, r );
+        }
+        
+        template< class IteratorT, class ForwardRange >
+        inline bool operator>=( const ForwardRange& l,
+                                const iterator_range<IteratorT>& r )
+        {
+            return iterator_range_detail::greater_or_equal_than( l, r );
+        }
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+#else
+        template< class Iterator1T, class Iterator2T >
+        inline bool operator==( const iterator_range<Iterator1T>& l,
+                                const iterator_range<Iterator2T>& r )
+        {
+            return ndnboost::equal( l, r );
+        }
+
+        template< class IteratorT, class ForwardRange >
+        inline bool operator==( const iterator_range<IteratorT>& l,
+                                const ForwardRange& r )
+        {
+            return ndnboost::equal( l, r );
+        }
+
+
+        template< class Iterator1T, class Iterator2T >
+        inline bool operator!=( const iterator_range<Iterator1T>& l,
+                                const iterator_range<Iterator2T>& r )
+        {
+            return !ndnboost::equal( l, r );
+        }
+
+        template< class IteratorT, class ForwardRange >
+        inline bool operator!=( const iterator_range<IteratorT>& l,
+                                const ForwardRange& r )
+        {
+            return !ndnboost::equal( l, r );
+        }
+
+
+        template< class Iterator1T, class Iterator2T >
+        inline bool operator<( const iterator_range<Iterator1T>& l,
+                               const iterator_range<Iterator2T>& r )
+        {
+            return iterator_range_detail::less_than( l, r );
+        }
+
+        template< class IteratorT, class ForwardRange >
+        inline bool operator<( const iterator_range<IteratorT>& l,
+                               const ForwardRange& r )
+        {
+            return iterator_range_detail::less_than( l, r );
+        }
+        
+        template< class Iterator1T, class Iterator2T >
+        inline bool operator<=( const iterator_range<Iterator1T>& l,
+                                const iterator_range<Iterator2T>& r )
+        {
+            return iterator_range_detail::less_or_equal_than( l, r );
+        }
+        
+        template< class IteratorT, class ForwardRange >
+        inline bool operator<=( const iterator_range<IteratorT>& l,
+                                const ForwardRange& r )
+        {
+            return iterator_range_detail::less_or_equal_than( l, r );
+        }
+        
+        template< class Iterator1T, class Iterator2T >
+        inline bool operator>( const iterator_range<Iterator1T>& l,
+                               const iterator_range<Iterator2T>& r )
+        {
+            return iterator_range_detail::greater_than( l, r );
+        }
+        
+        template< class IteratorT, class ForwardRange >
+        inline bool operator>( const iterator_range<IteratorT>& l,
+                               const ForwardRange& r )
+        {
+            return iterator_range_detail::greater_than( l, r );
+        }
+        
+        template< class Iterator1T, class Iterator2T >
+        inline bool operator>=( const iterator_range<Iterator1T>& l,
+                                const iterator_range<Iterator2T>& r )
+        {
+            return iterator_range_detail::greater_or_equal_than( l, r );
+        }
+        
+        template< class IteratorT, class ForwardRange >
+        inline bool operator>=( const iterator_range<IteratorT>& l,
+                                const ForwardRange& r )
+        {
+            return iterator_range_detail::greater_or_equal_than( l, r );
+        }
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+//  iterator range utilities -----------------------------------------//
+
+        //! iterator_range construct helper
+        /*!
+            Construct an \c iterator_range from a pair of iterators
+
+            \param Begin A begin iterator
+            \param End An end iterator
+            \return iterator_range object
+        */
+        template< typename IteratorT >
+        inline iterator_range< IteratorT >
+        make_iterator_range( IteratorT Begin, IteratorT End )
+        {
+            return iterator_range<IteratorT>( Begin, End );
+        }
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+        template< typename Range >
+        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+        make_iterator_range( Range& r )
+        {
+            return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+                ( ndnboost::begin( r ), ndnboost::end( r ) );
+        }
+
+#else
+        //! iterator_range construct helper
+        /*!
+            Construct an \c iterator_range from a \c Range containing the begin
+            and end iterators.
+        */
+        template< class ForwardRange >
+        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
+        make_iterator_range( ForwardRange& r )
+        {
+           return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
+                ( r, iterator_range_detail::range_tag() );
+        }
+
+        template< class ForwardRange >
+        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type >
+        make_iterator_range( const ForwardRange& r )
+        {
+           return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type >
+                ( r, iterator_range_detail::const_range_tag() );
+        }
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+        namespace iterator_range_detail
+        {
+            template< class Range >
+            inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+            make_range_impl( Range& r,
+                             BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+                             BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+            {
+                //
+                // Not worth the effort
+                //
+                //if( advance_begin == 0 && advance_end == 0 )
+                //    return make_iterator_range( r );
+                //
+
+                BOOST_DEDUCED_TYPENAME range_iterator<Range>::type
+                    new_begin = ndnboost::begin( r ),
+                    new_end   = ndnboost::end( r );
+                std::advance( new_begin, advance_begin );
+                std::advance( new_end, advance_end );
+                return make_iterator_range( new_begin, new_end );
+            }
+        }
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+        template< class Range >
+        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+        make_iterator_range( Range& r,
+                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+        {
+            //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
+            return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+        }
+
+#else
+
+        template< class Range >
+        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+        make_iterator_range( Range& r,
+                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+        {
+            //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
+            return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+        }
+
+        template< class Range >
+        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type >
+        make_iterator_range( const Range& r,
+                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+        {
+            //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
+            return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+        }
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+        //! copy a range into a sequence
+        /*!
+            Construct a new sequence of the specified type from the elements
+            in the given range
+
+            \param Range An input range
+            \return New sequence
+        */
+        template< typename SeqT, typename Range >
+        inline SeqT copy_range( const Range& r )
+        {
+            return SeqT( ndnboost::begin( r ), ndnboost::end( r ) );
+        }
+
+} // namespace 'boost'
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+    #pragma warning( pop )
+#endif
+
+#endif
+
diff --git a/ndnboost/range/iterator_range_io.hpp b/ndnboost/range/iterator_range_io.hpp
new file mode 100644
index 0000000..78ed7d6
--- /dev/null
+++ b/ndnboost/range/iterator_range_io.hpp
@@ -0,0 +1,93 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009.
+//  Use, modification and distribution is subject to the Boost Software
+//  License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED
+#define BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+    #pragma warning( push )
+    #pragma warning( disable : 4996 )
+#endif
+
+// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch.
+#ifndef BOOST_OLD_IOSTREAMS 
+# if defined(__STL_CONFIG_H) && \
+    !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \
+    /**/
+#  define BOOST_OLD_IOSTREAMS
+# endif
+#endif // #ifndef BOOST_OLD_IOSTREAMS
+
+#ifndef _STLP_NO_IOSTREAMS
+# ifndef BOOST_OLD_IOSTREAMS
+#  include <ostream>
+# else
+#  include <ostream.h>
+# endif
+#endif // _STLP_NO_IOSTREAMS
+
+#include <ndnboost/range/iterator_range_core.hpp>
+#include <iterator>
+#include <algorithm>
+#include <cstddef>
+
+namespace ndnboost
+{
+
+#ifndef _STLP_NO_IOSTREAMS
+# ifndef BOOST_OLD_IOSTREAMS   
+
+        //! iterator_range output operator
+        /*!
+            Output the range to an ostream. Elements are outputted
+            in a sequence without separators.
+        */
+        template< typename IteratorT, typename Elem, typename Traits >
+        inline std::basic_ostream<Elem,Traits>& operator<<( 
+                    std::basic_ostream<Elem, Traits>& Os,
+                    const iterator_range<IteratorT>& r )
+        {
+            std::copy( r.begin(), r.end(), 
+                       std::ostream_iterator< BOOST_DEDUCED_TYPENAME 
+                                              iterator_value<IteratorT>::type, 
+                                              Elem, Traits>(Os) );
+            return Os;
+        }
+
+# else
+
+        //! iterator_range output operator
+        /*!
+            Output the range to an ostream. Elements are outputted
+            in a sequence without separators.
+        */
+        template< typename IteratorT >
+        inline std::ostream& operator<<( 
+                    std::ostream& Os,
+                    const iterator_range<IteratorT>& r )
+        {
+            std::copy( r.begin(), r.end(), std::ostream_iterator<char>(Os));
+            return Os;
+        }
+
+# endif
+#endif // _STLP_NO_IOSTREAMS
+
+} // namespace ndnboost
+
+#undef BOOST_OLD_IOSTREAMS
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+    #pragma warning(pop)
+#endif
+
+#endif // include guard
diff --git a/ndnboost/range/mutable_iterator.hpp b/ndnboost/range/mutable_iterator.hpp
new file mode 100644
index 0000000..e45d86d
--- /dev/null
+++ b/ndnboost/range/mutable_iterator.hpp
@@ -0,0 +1,67 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_MUTABLE_ITERATOR_HPP
+#define BOOST_RANGE_MUTABLE_ITERATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/config.hpp>
+
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#include <ndnboost/range/detail/iterator.hpp>
+#else
+
+#include <ndnboost/range/detail/extract_optional_type.hpp>
+#include <ndnboost/iterator/iterator_traits.hpp>
+#include <cstddef>
+#include <utility>
+
+namespace ndnboost
+{
+    //////////////////////////////////////////////////////////////////////////
+    // default
+    //////////////////////////////////////////////////////////////////////////
+    
+    namespace range_detail {
+        BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator )
+    }
+
+    template< typename C >
+    struct range_mutable_iterator : range_detail::extract_iterator<C>
+    {};
+    
+    //////////////////////////////////////////////////////////////////////////
+    // pair
+    //////////////////////////////////////////////////////////////////////////
+
+    template< typename Iterator >
+    struct range_mutable_iterator< std::pair<Iterator,Iterator> >
+    {
+        typedef Iterator type;
+    };
+
+    //////////////////////////////////////////////////////////////////////////
+    // array
+    //////////////////////////////////////////////////////////////////////////
+
+    template< typename T, std::size_t sz >
+    struct range_mutable_iterator< T[sz] >
+    {
+        typedef T* type;
+    };
+
+} // namespace ndnboost
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif
diff --git a/ndnboost/range/rbegin.hpp b/ndnboost/range/rbegin.hpp
new file mode 100644
index 0000000..8ab2456
--- /dev/null
+++ b/ndnboost/range/rbegin.hpp
@@ -0,0 +1,65 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_RBEGIN_HPP
+#define BOOST_RANGE_RBEGIN_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/end.hpp>
+#include <ndnboost/range/reverse_iterator.hpp>
+
+namespace ndnboost
+{
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+template< class C >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
+rbegin( C& c )
+{
+    return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( ndnboost::end( c ) );
+}
+
+#else
+
+template< class C >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
+rbegin( C& c )
+{
+    typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
+        iter_type;
+    return iter_type( ndnboost::end( c ) );
+}
+
+template< class C >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
+rbegin( const C& c )
+{
+    typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
+        iter_type;
+    return iter_type( ndnboost::end( c ) );
+}
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+template< class T >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
+const_rbegin( const T& r )
+{
+    return ndnboost::rbegin( r );
+}
+
+} // namespace 'boost'
+
+#endif
+
diff --git a/ndnboost/range/rend.hpp b/ndnboost/range/rend.hpp
new file mode 100644
index 0000000..715ae6b
--- /dev/null
+++ b/ndnboost/range/rend.hpp
@@ -0,0 +1,65 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_REND_HPP
+#define BOOST_RANGE_REND_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/begin.hpp>
+#include <ndnboost/range/reverse_iterator.hpp>
+
+namespace ndnboost
+{
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+template< class C >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
+rend( C& c )
+{
+    return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( ndnboost::begin( c ) );
+}
+
+#else
+
+template< class C >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
+rend( C& c )
+{
+    typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
+               iter_type;
+    return iter_type( ndnboost::begin( c ) );
+}
+
+template< class C >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
+rend( const C& c )
+{
+    typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
+        iter_type;
+    return iter_type( ndnboost::begin( c ) );
+}
+
+#endif
+
+template< class T >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
+const_rend( const T& r )
+{
+    return ndnboost::rend( r );
+}
+
+} // namespace 'boost'
+
+#endif
+
diff --git a/ndnboost/range/result_iterator.hpp b/ndnboost/range/result_iterator.hpp
new file mode 100644
index 0000000..5c0dd75
--- /dev/null
+++ b/ndnboost/range/result_iterator.hpp
@@ -0,0 +1,33 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_RESULT_ITERATOR_HPP
+#define BOOST_RANGE_RESULT_ITERATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <ndnboost/range/iterator.hpp>
+
+namespace ndnboost
+{
+    //
+    // This interface is deprecated, use range_iterator<T>
+    //
+    
+    template< typename C >
+    struct range_result_iterator : range_iterator<C>
+    { };
+    
+} // namespace ndnboost
+
+
+#endif
diff --git a/ndnboost/range/reverse_iterator.hpp b/ndnboost/range/reverse_iterator.hpp
new file mode 100644
index 0000000..68fe03d
--- /dev/null
+++ b/ndnboost/range/reverse_iterator.hpp
@@ -0,0 +1,40 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_REVERSE_ITERATOR_HPP
+#define BOOST_RANGE_REVERSE_ITERATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/config.hpp>
+#include <ndnboost/range/iterator.hpp>
+#include <ndnboost/iterator/reverse_iterator.hpp>
+
+
+namespace ndnboost
+{
+    //////////////////////////////////////////////////////////////////////////
+    // default
+    //////////////////////////////////////////////////////////////////////////
+    
+    template< typename C >
+    struct range_reverse_iterator
+    {
+        typedef reverse_iterator< 
+            BOOST_DEDUCED_TYPENAME range_iterator<C>::type > type;
+    };
+    
+
+} // namespace ndnboost
+
+
+#endif
diff --git a/ndnboost/range/size.hpp b/ndnboost/range/size.hpp
new file mode 100644
index 0000000..9164e02
--- /dev/null
+++ b/ndnboost/range/size.hpp
@@ -0,0 +1,52 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_SIZE_HPP
+#define BOOST_RANGE_SIZE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/config.hpp>
+#include <ndnboost/range/begin.hpp>
+#include <ndnboost/range/end.hpp>
+#include <ndnboost/range/size_type.hpp>
+#include <ndnboost/assert.hpp>
+
+namespace ndnboost
+{
+    namespace range_detail
+    {
+        template<class SinglePassRange>
+        inline BOOST_DEDUCED_TYPENAME range_size<const SinglePassRange>::type
+        range_calculate_size(const SinglePassRange& rng)
+        {
+            BOOST_ASSERT( (ndnboost::end(rng) - ndnboost::begin(rng)) >= 0 &&
+                          "reachability invariant broken!" );
+            return ndnboost::end(rng) - ndnboost::begin(rng);
+        }
+    }
+
+    template<class SinglePassRange>
+    inline BOOST_DEDUCED_TYPENAME range_size<const SinglePassRange>::type
+    size(const SinglePassRange& rng)
+    {
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+    !BOOST_WORKAROUND(__GNUC__, < 3) \
+    /**/
+        using namespace range_detail;
+#endif
+        return range_calculate_size(rng);
+    }
+
+} // namespace 'boost'
+
+#endif
diff --git a/ndnboost/range/size_type.hpp b/ndnboost/range/size_type.hpp
new file mode 100644
index 0000000..0ae8a87
--- /dev/null
+++ b/ndnboost/range/size_type.hpp
@@ -0,0 +1,89 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_SIZE_TYPE_HPP
+#define BOOST_RANGE_SIZE_TYPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <ndnboost/range/config.hpp>
+#include <ndnboost/range/difference_type.hpp>
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#include <ndnboost/range/detail/size_type.hpp>
+#else
+
+#include <ndnboost/utility/enable_if.hpp>
+#include <ndnboost/type_traits/make_unsigned.hpp>
+#include <ndnboost/type_traits/remove_const.hpp>
+#include <cstddef>
+#include <utility>
+
+namespace ndnboost
+{
+    namespace detail
+    {
+
+        //////////////////////////////////////////////////////////////////////////
+        // default
+        //////////////////////////////////////////////////////////////////////////
+
+        template<typename T>
+        class has_size_type
+        {
+            typedef char no_type;
+            struct yes_type { char dummy[2]; };
+
+            template<typename C>
+            static yes_type test(BOOST_DEDUCED_TYPENAME C::size_type x);
+
+            template<typename C, typename Arg>
+            static no_type test(Arg x);
+
+        public:
+            static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);
+        };
+
+        template<typename C, typename Enabler=void>
+        struct range_size
+        {
+            typedef BOOST_DEDUCED_TYPENAME make_unsigned<
+                BOOST_DEDUCED_TYPENAME range_difference<C>::type
+            >::type type;
+        };
+
+        template<typename C>
+        struct range_size<
+            C,
+            BOOST_DEDUCED_TYPENAME enable_if<has_size_type<C>, void>::type
+        >
+        {
+            typedef BOOST_DEDUCED_TYPENAME C::size_type type;
+        };
+
+    }
+
+    template< class T >
+    struct range_size :
+        detail::range_size<T>
+    { };
+
+    template< class T >
+    struct range_size<const T >
+        : detail::range_size<T>
+    { };
+
+} // namespace ndnboost
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+
+#endif
diff --git a/ndnboost/range/value_type.hpp b/ndnboost/range/value_type.hpp
new file mode 100644
index 0000000..855ed05
--- /dev/null
+++ b/ndnboost/range/value_type.hpp
@@ -0,0 +1,34 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
+//  distribution is subject to the Boost Software License, Version
+//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_VALUE_TYPE_HPP
+#define BOOST_RANGE_VALUE_TYPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <ndnboost/range/config.hpp>
+#include <ndnboost/range/iterator.hpp>
+
+//#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+//#include <ndnboost/range/detail/value_type.hpp>
+//#else
+
+#include <ndnboost/iterator/iterator_traits.hpp>
+
+namespace ndnboost
+{
+    template< class T >
+    struct range_value : iterator_value< typename range_iterator<T>::type >
+    { };
+}
+
+#endif
diff --git a/ndnboost/scoped_array.hpp b/ndnboost/scoped_array.hpp
new file mode 100644
index 0000000..260b52d
--- /dev/null
+++ b/ndnboost/scoped_array.hpp
@@ -0,0 +1,16 @@
+#ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED
+#define BOOST_SCOPED_ARRAY_HPP_INCLUDED
+
+//  (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
+//  Copyright (c) 2001, 2002 Peter Dimov
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  http://www.boost.org/libs/smart_ptr/scoped_array.htm
+//
+
+#include <ndnboost/smart_ptr/scoped_array.hpp>
+
+#endif  // #ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED
diff --git a/ndnboost/scoped_ptr.hpp b/ndnboost/scoped_ptr.hpp
new file mode 100644
index 0000000..c2178d1
--- /dev/null
+++ b/ndnboost/scoped_ptr.hpp
@@ -0,0 +1,16 @@
+#ifndef BOOST_SCOPED_PTR_HPP_INCLUDED
+#define BOOST_SCOPED_PTR_HPP_INCLUDED
+
+//  (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
+//  Copyright (c) 2001, 2002 Peter Dimov
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  http://www.boost.org/libs/smart_ptr/scoped_ptr.htm
+//
+
+#include <ndnboost/smart_ptr/scoped_ptr.hpp>
+
+#endif // #ifndef BOOST_SCOPED_PTR_HPP_INCLUDED
diff --git a/ndnboost/shared_array.hpp b/ndnboost/shared_array.hpp
new file mode 100644
index 0000000..3da084d
--- /dev/null
+++ b/ndnboost/shared_array.hpp
@@ -0,0 +1,19 @@
+#ifndef BOOST_SHARED_ARRAY_HPP_INCLUDED
+#define BOOST_SHARED_ARRAY_HPP_INCLUDED
+
+//
+//  shared_array.hpp
+//
+//  (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
+//  Copyright (c) 2001, 2002 Peter Dimov
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  See http://www.boost.org/libs/smart_ptr/shared_array.htm for documentation.
+//
+
+#include <ndnboost/smart_ptr/shared_array.hpp>
+
+#endif  // #ifndef BOOST_SHARED_ARRAY_HPP_INCLUDED
diff --git a/ndnboost/smart_ptr/detail/shared_array_nmt.hpp b/ndnboost/smart_ptr/detail/shared_array_nmt.hpp
new file mode 100644
index 0000000..4d53afa
--- /dev/null
+++ b/ndnboost/smart_ptr/detail/shared_array_nmt.hpp
@@ -0,0 +1,151 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SHARED_ARRAY_NMT_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SHARED_ARRAY_NMT_HPP_INCLUDED
+
+//
+//  detail/shared_array_nmt.hpp - shared_array.hpp without member templates
+//
+//  (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
+//  Copyright (c) 2001, 2002 Peter Dimov
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  See http://www.boost.org/libs/smart_ptr/shared_array.htm for documentation.
+//
+
+#include <ndnboost/assert.hpp>
+#include <ndnboost/checked_delete.hpp>
+#include <ndnboost/throw_exception.hpp>
+#include <ndnboost/smart_ptr/detail/atomic_count.hpp>
+
+#include <cstddef>          // for std::ptrdiff_t
+#include <algorithm>        // for std::swap
+#include <functional>       // for std::less
+#include <new>              // for std::bad_alloc
+
+namespace ndnboost
+{
+
+template<class T> class shared_array
+{
+private:
+
+    typedef detail::atomic_count count_type;
+
+public:
+
+    typedef T element_type;
+      
+    explicit shared_array(T * p = 0): px(p)
+    {
+#ifndef BOOST_NO_EXCEPTIONS
+
+        try  // prevent leak if new throws
+        {
+            pn = new count_type(1);
+        }
+        catch(...)
+        {
+            ndnboost::checked_array_delete(p);
+            throw;
+        }
+
+#else
+
+        pn = new count_type(1);
+
+        if(pn == 0)
+        {
+            ndnboost::checked_array_delete(p);
+            ndnboost::throw_exception(std::bad_alloc());
+        }
+
+#endif
+    }
+
+    ~shared_array()
+    {
+        if(--*pn == 0)
+        {
+            ndnboost::checked_array_delete(px);
+            delete pn;
+        }
+    }
+
+    shared_array(shared_array const & r) : px(r.px)  // never throws
+    {
+        pn = r.pn;
+        ++*pn;
+    }
+
+    shared_array & operator=(shared_array const & r)
+    {
+        shared_array(r).swap(*this);
+        return *this;
+    }
+
+    void reset(T * p = 0)
+    {
+        BOOST_ASSERT(p == 0 || p != px);
+        shared_array(p).swap(*this);
+    }
+
+    T * get() const  // never throws
+    {
+        return px;
+    }
+
+    T & operator[](std::ptrdiff_t i) const  // never throws
+    {
+        BOOST_ASSERT(px != 0);
+        BOOST_ASSERT(i >= 0);
+        return px[i];
+    }
+
+    long use_count() const  // never throws
+    {
+        return *pn;
+    }
+
+    bool unique() const  // never throws
+    {
+        return *pn == 1;
+    }
+
+    void swap(shared_array<T> & other)  // never throws
+    {
+        std::swap(px, other.px);
+        std::swap(pn, other.pn);
+    }
+
+private:
+
+    T * px;            // contained pointer
+    count_type * pn;   // ptr to reference counter
+      
+};  // shared_array
+
+template<class T, class U> inline bool operator==(shared_array<T> const & a, shared_array<U> const & b)
+{
+    return a.get() == b.get();
+}
+
+template<class T, class U> inline bool operator!=(shared_array<T> const & a, shared_array<U> const & b)
+{
+    return a.get() != b.get();
+}
+
+template<class T> inline bool operator<(shared_array<T> const & a, shared_array<T> const & b)
+{
+    return std::less<T*>()(a.get(), b.get());
+}
+
+template<class T> void swap(shared_array<T> & a, shared_array<T> & b)
+{
+    a.swap(b);
+}
+
+} // namespace ndnboost
+
+#endif  // #ifndef BOOST_SMART_PTR_DETAIL_SHARED_ARRAY_NMT_HPP_INCLUDED
diff --git a/ndnboost/smart_ptr/scoped_array.hpp b/ndnboost/smart_ptr/scoped_array.hpp
new file mode 100644
index 0000000..7584d27
--- /dev/null
+++ b/ndnboost/smart_ptr/scoped_array.hpp
@@ -0,0 +1,132 @@
+#ifndef BOOST_SMART_PTR_SCOPED_ARRAY_HPP_INCLUDED
+#define BOOST_SMART_PTR_SCOPED_ARRAY_HPP_INCLUDED
+
+//  (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
+//  Copyright (c) 2001, 2002 Peter Dimov
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  http://www.boost.org/libs/smart_ptr/scoped_array.htm
+//
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/assert.hpp>
+#include <ndnboost/checked_delete.hpp>
+#include <ndnboost/smart_ptr/detail/sp_nullptr_t.hpp>
+
+#include <ndnboost/detail/workaround.hpp>
+
+#include <cstddef>            // for std::ptrdiff_t
+
+namespace ndnboost
+{
+
+// Debug hooks
+
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+
+void sp_array_constructor_hook(void * p);
+void sp_array_destructor_hook(void * p);
+
+#endif
+
+//  scoped_array extends scoped_ptr to arrays. Deletion of the array pointed to
+//  is guaranteed, either on destruction of the scoped_array or via an explicit
+//  reset(). Use shared_array or std::vector if your needs are more complex.
+
+template<class T> class scoped_array // noncopyable
+{
+private:
+
+    T * px;
+
+    scoped_array(scoped_array const &);
+    scoped_array & operator=(scoped_array const &);
+
+    typedef scoped_array<T> this_type;
+
+    void operator==( scoped_array const& ) const;
+    void operator!=( scoped_array const& ) const;
+
+public:
+
+    typedef T element_type;
+
+    explicit scoped_array( T * p = 0 ) BOOST_NOEXCEPT : px( p )
+    {
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+        ndnboost::sp_array_constructor_hook( px );
+#endif
+    }
+
+    ~scoped_array() // never throws
+    {
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+        ndnboost::sp_array_destructor_hook( px );
+#endif
+        ndnboost::checked_array_delete( px );
+    }
+
+    void reset(T * p = 0) // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
+    {
+        BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
+        this_type(p).swap(*this);
+    }
+
+    T & operator[](std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
+    {
+        BOOST_ASSERT( px != 0 );
+        BOOST_ASSERT( i >= 0 );
+        return px[i];
+    }
+
+    T * get() const BOOST_NOEXCEPT
+    {
+        return px;
+    }
+
+// implicit conversion to "bool"
+#include <ndnboost/smart_ptr/detail/operator_bool.hpp>
+
+    void swap(scoped_array & b) BOOST_NOEXCEPT
+    {
+        T * tmp = b.px;
+        b.px = px;
+        px = tmp;
+    }
+};
+
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+template<class T> inline bool operator==( scoped_array<T> const & p, ndnboost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+    return p.get() == 0;
+}
+
+template<class T> inline bool operator==( ndnboost::detail::sp_nullptr_t, scoped_array<T> const & p ) BOOST_NOEXCEPT
+{
+    return p.get() == 0;
+}
+
+template<class T> inline bool operator!=( scoped_array<T> const & p, ndnboost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+    return p.get() != 0;
+}
+
+template<class T> inline bool operator!=( ndnboost::detail::sp_nullptr_t, scoped_array<T> const & p ) BOOST_NOEXCEPT
+{
+    return p.get() != 0;
+}
+
+#endif
+
+template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) BOOST_NOEXCEPT
+{
+    a.swap(b);
+}
+
+} // namespace ndnboost
+
+#endif  // #ifndef BOOST_SMART_PTR_SCOPED_ARRAY_HPP_INCLUDED
diff --git a/ndnboost/smart_ptr/scoped_ptr.hpp b/ndnboost/smart_ptr/scoped_ptr.hpp
new file mode 100644
index 0000000..7ee252b
--- /dev/null
+++ b/ndnboost/smart_ptr/scoped_ptr.hpp
@@ -0,0 +1,157 @@
+#ifndef BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED
+#define BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED
+
+//  (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
+//  Copyright (c) 2001, 2002 Peter Dimov
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  http://www.boost.org/libs/smart_ptr/scoped_ptr.htm
+//
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/assert.hpp>
+#include <ndnboost/checked_delete.hpp>
+#include <ndnboost/smart_ptr/detail/sp_nullptr_t.hpp>
+#include <ndnboost/detail/workaround.hpp>
+
+#ifndef BOOST_NO_AUTO_PTR
+# include <memory>          // for std::auto_ptr
+#endif
+
+namespace ndnboost
+{
+
+// Debug hooks
+
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+
+void sp_scalar_constructor_hook(void * p);
+void sp_scalar_destructor_hook(void * p);
+
+#endif
+
+//  scoped_ptr mimics a built-in pointer except that it guarantees deletion
+//  of the object pointed to, either on destruction of the scoped_ptr or via
+//  an explicit reset(). scoped_ptr is a simple solution for simple needs;
+//  use shared_ptr or std::auto_ptr if your needs are more complex.
+
+template<class T> class scoped_ptr // noncopyable
+{
+private:
+
+    T * px;
+
+    scoped_ptr(scoped_ptr const &);
+    scoped_ptr & operator=(scoped_ptr const &);
+
+    typedef scoped_ptr<T> this_type;
+
+    void operator==( scoped_ptr const& ) const;
+    void operator!=( scoped_ptr const& ) const;
+
+public:
+
+    typedef T element_type;
+
+    explicit scoped_ptr( T * p = 0 ): px( p ) // never throws
+    {
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+        ndnboost::sp_scalar_constructor_hook( px );
+#endif
+    }
+
+#ifndef BOOST_NO_AUTO_PTR
+
+    explicit scoped_ptr( std::auto_ptr<T> p ) BOOST_NOEXCEPT : px( p.release() )
+    {
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+        ndnboost::sp_scalar_constructor_hook( px );
+#endif
+    }
+
+#endif
+
+    ~scoped_ptr() // never throws
+    {
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+        ndnboost::sp_scalar_destructor_hook( px );
+#endif
+        ndnboost::checked_delete( px );
+    }
+
+    void reset(T * p = 0) // never throws
+    {
+        BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
+        this_type(p).swap(*this);
+    }
+
+    T & operator*() const // never throws
+    {
+        BOOST_ASSERT( px != 0 );
+        return *px;
+    }
+
+    T * operator->() const // never throws
+    {
+        BOOST_ASSERT( px != 0 );
+        return px;
+    }
+
+    T * get() const BOOST_NOEXCEPT
+    {
+        return px;
+    }
+
+// implicit conversion to "bool"
+#include <ndnboost/smart_ptr/detail/operator_bool.hpp>
+
+    void swap(scoped_ptr & b) BOOST_NOEXCEPT
+    {
+        T * tmp = b.px;
+        b.px = px;
+        px = tmp;
+    }
+};
+
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+template<class T> inline bool operator==( scoped_ptr<T> const & p, ndnboost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+    return p.get() == 0;
+}
+
+template<class T> inline bool operator==( ndnboost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_NOEXCEPT
+{
+    return p.get() == 0;
+}
+
+template<class T> inline bool operator!=( scoped_ptr<T> const & p, ndnboost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+    return p.get() != 0;
+}
+
+template<class T> inline bool operator!=( ndnboost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_NOEXCEPT
+{
+    return p.get() != 0;
+}
+
+#endif
+
+template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) BOOST_NOEXCEPT
+{
+    a.swap(b);
+}
+
+// get_pointer(p) is a generic way to say p.get()
+
+template<class T> inline T * get_pointer(scoped_ptr<T> const & p) BOOST_NOEXCEPT
+{
+    return p.get();
+}
+
+} // namespace ndnboost
+
+#endif // #ifndef BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED
diff --git a/ndnboost/smart_ptr/shared_array.hpp b/ndnboost/smart_ptr/shared_array.hpp
new file mode 100644
index 0000000..e5626f7
--- /dev/null
+++ b/ndnboost/smart_ptr/shared_array.hpp
@@ -0,0 +1,290 @@
+#ifndef BOOST_SMART_PTR_SHARED_ARRAY_HPP_INCLUDED
+#define BOOST_SMART_PTR_SHARED_ARRAY_HPP_INCLUDED
+
+//
+//  shared_array.hpp
+//
+//  (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
+//  Copyright (c) 2001, 2002, 2012 Peter Dimov
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  See http://www.boost.org/libs/smart_ptr/shared_array.htm for documentation.
+//
+
+#include <ndnboost/config.hpp>   // for broken compiler workarounds
+
+#if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
+#include <ndnboost/smart_ptr/detail/shared_array_nmt.hpp>
+#else
+
+#include <memory>             // TR1 cyclic inclusion fix
+
+#include <ndnboost/assert.hpp>
+#include <ndnboost/checked_delete.hpp>
+
+#include <ndnboost/smart_ptr/shared_ptr.hpp>
+#include <ndnboost/smart_ptr/detail/shared_count.hpp>
+#include <ndnboost/smart_ptr/detail/sp_nullptr_t.hpp>
+#include <ndnboost/detail/workaround.hpp>
+
+#include <cstddef>            // for std::ptrdiff_t
+#include <algorithm>          // for std::swap
+#include <functional>         // for std::less
+
+namespace ndnboost
+{
+
+//
+//  shared_array
+//
+//  shared_array extends shared_ptr to arrays.
+//  The array pointed to is deleted when the last shared_array pointing to it
+//  is destroyed or reset.
+//
+
+template<class T> class shared_array
+{
+private:
+
+    // Borland 5.5.1 specific workarounds
+    typedef checked_array_deleter<T> deleter;
+    typedef shared_array<T> this_type;
+
+public:
+
+    typedef T element_type;
+
+    shared_array() BOOST_NOEXCEPT : px( 0 ), pn()
+    {
+    }
+
+    template<class Y>
+    explicit shared_array( Y * p ): px( p ), pn( p, checked_array_deleter<Y>() )
+    {
+        ndnboost::detail::sp_assert_convertible< Y[], T[] >();
+    }
+
+    //
+    // Requirements: D's copy constructor must not throw
+    //
+    // shared_array will release p by calling d(p)
+    //
+
+    template<class Y, class D> shared_array( Y * p, D d ): px( p ), pn( p, d )
+    {
+        ndnboost::detail::sp_assert_convertible< Y[], T[] >();
+    }
+
+    // As above, but with allocator. A's copy constructor shall not throw.
+
+    template<class Y, class D, class A> shared_array( Y * p, D d, A a ): px( p ), pn( p, d, a )
+    {
+        ndnboost::detail::sp_assert_convertible< Y[], T[] >();
+    }
+
+//  generated copy constructor, destructor are fine...
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+// ... except in C++0x, move disables the implicit copy
+
+    shared_array( shared_array const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
+    {
+    }
+
+    shared_array( shared_array && r ) BOOST_NOEXCEPT : px( r.px ), pn()
+    {
+        pn.swap( r.pn );
+        r.px = 0;
+    }
+
+#endif
+
+    // conversion
+
+    template<class Y>
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+    shared_array( shared_array<Y> const & r, typename ndnboost::detail::sp_enable_if_convertible< Y[], T[] >::type = ndnboost::detail::sp_empty() )
+
+#else
+
+    shared_array( shared_array<Y> const & r )
+
+#endif
+    BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) // never throws
+    {
+        ndnboost::detail::sp_assert_convertible< Y[], T[] >();
+    }
+
+    // aliasing
+
+    template< class Y >
+    shared_array( shared_array<Y> const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn )
+    {
+    }
+
+    // assignment
+
+    shared_array & operator=( shared_array const & r ) BOOST_NOEXCEPT
+    {
+        this_type( r ).swap( *this );
+        return *this;
+    }
+
+#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400)
+
+    template<class Y>
+    shared_array & operator=( shared_array<Y> const & r ) BOOST_NOEXCEPT
+    {
+        this_type( r ).swap( *this );
+        return *this;
+    }
+
+#endif
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+    shared_array & operator=( shared_array && r ) BOOST_NOEXCEPT
+    {
+        this_type( static_cast< shared_array && >( r ) ).swap( *this );
+        return *this;
+    }
+
+    template<class Y>
+    shared_array & operator=( shared_array<Y> && r ) BOOST_NOEXCEPT
+    {
+        this_type( static_cast< shared_array<Y> && >( r ) ).swap( *this );
+        return *this;
+    }
+
+#endif
+
+    void reset() BOOST_NOEXCEPT
+    {
+        this_type().swap( *this );
+    }
+
+    template<class Y> void reset( Y * p ) // Y must be complete
+    {
+        BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
+        this_type( p ).swap( *this );
+    }
+
+    template<class Y, class D> void reset( Y * p, D d )
+    {
+        this_type( p, d ).swap( *this );
+    }
+
+    template<class Y, class D, class A> void reset( Y * p, D d, A a )
+    {
+        this_type( p, d, a ).swap( *this );
+    }
+
+    template<class Y> void reset( shared_array<Y> const & r, element_type * p )
+    {
+        this_type( r, p ).swap( *this );
+    }
+
+    T & operator[] (std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
+    {
+        BOOST_ASSERT(px != 0);
+        BOOST_ASSERT(i >= 0);
+        return px[i];
+    }
+    
+    T * get() const BOOST_NOEXCEPT
+    {
+        return px;
+    }
+
+// implicit conversion to "bool"
+#include <ndnboost/smart_ptr/detail/operator_bool.hpp>
+
+    bool unique() const BOOST_NOEXCEPT
+    {
+        return pn.unique();
+    }
+
+    long use_count() const BOOST_NOEXCEPT
+    {
+        return pn.use_count();
+    }
+
+    void swap(shared_array<T> & other) BOOST_NOEXCEPT
+    {
+        std::swap(px, other.px);
+        pn.swap(other.pn);
+    }
+
+    void * _internal_get_deleter( ndnboost::detail::sp_typeinfo const & ti ) const
+    {
+        return pn.get_deleter( ti );
+    }
+
+private:
+
+    template<class Y> friend class shared_array;
+
+    T * px;                     // contained pointer
+    detail::shared_count pn;    // reference counter
+
+};  // shared_array
+
+template<class T> inline bool operator==(shared_array<T> const & a, shared_array<T> const & b) BOOST_NOEXCEPT
+{
+    return a.get() == b.get();
+}
+
+template<class T> inline bool operator!=(shared_array<T> const & a, shared_array<T> const & b) BOOST_NOEXCEPT
+{
+    return a.get() != b.get();
+}
+
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+template<class T> inline bool operator==( shared_array<T> const & p, ndnboost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+    return p.get() == 0;
+}
+
+template<class T> inline bool operator==( ndnboost::detail::sp_nullptr_t, shared_array<T> const & p ) BOOST_NOEXCEPT
+{
+    return p.get() == 0;
+}
+
+template<class T> inline bool operator!=( shared_array<T> const & p, ndnboost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+    return p.get() != 0;
+}
+
+template<class T> inline bool operator!=( ndnboost::detail::sp_nullptr_t, shared_array<T> const & p ) BOOST_NOEXCEPT
+{
+    return p.get() != 0;
+}
+
+#endif
+
+template<class T> inline bool operator<(shared_array<T> const & a, shared_array<T> const & b) BOOST_NOEXCEPT
+{
+    return std::less<T*>()(a.get(), b.get());
+}
+
+template<class T> void swap(shared_array<T> & a, shared_array<T> & b) BOOST_NOEXCEPT
+{
+    a.swap(b);
+}
+
+template< class D, class T > D * get_deleter( shared_array<T> const & p )
+{
+    return static_cast< D * >( p._internal_get_deleter( BOOST_SP_TYPEID(D) ) );
+}
+
+} // namespace ndnboost
+
+#endif  // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
+
+#endif  // #ifndef BOOST_SMART_PTR_SHARED_ARRAY_HPP_INCLUDED
diff --git a/ndnboost/test/debug.hpp b/ndnboost/test/debug.hpp
new file mode 100644
index 0000000..30d5d30
--- /dev/null
+++ b/ndnboost/test/debug.hpp
@@ -0,0 +1,101 @@
+//  (C) Copyright Gennadiy Rozental 2006-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : defines portable debug interfaces
+// ***************************************************************************
+
+#ifndef BOOST_TEST_DEBUG_API_HPP_112006GER
+#define BOOST_TEST_DEBUG_API_HPP_112006GER
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+#include <ndnboost/test/utils/callback.hpp>
+#include <ndnboost/test/utils/basic_cstring/basic_cstring.hpp>
+
+// STL
+#include <string>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace debug {
+
+// ************************************************************************** //
+// **************  check if program is running under debugger  ************** //
+// ************************************************************************** //
+
+bool BOOST_TEST_DECL under_debugger();
+
+// ************************************************************************** //
+// **************       cause program to break execution       ************** //
+// **************           in debugger at call point          ************** //
+// ************************************************************************** //
+
+void BOOST_TEST_DECL debugger_break();
+
+// ************************************************************************** //
+// **************              gui debugger setup              ************** //
+// ************************************************************************** //
+
+struct dbg_startup_info {
+    long                    pid;
+    bool                    break_or_continue;
+    unit_test::const_string binary_path;
+    unit_test::const_string display;
+    unit_test::const_string init_done_lock;
+};
+
+typedef unit_test::callback1<dbg_startup_info const&> dbg_starter;
+
+// ************************************************************************** //
+// **************                debugger setup                ************** //
+// ************************************************************************** //
+
+#if BOOST_WORKAROUND( BOOST_MSVC, <1300)
+
+std::string BOOST_TEST_DECL set_debugger( unit_test::const_string dbg_id );
+
+#else 
+
+std::string BOOST_TEST_DECL set_debugger( unit_test::const_string dbg_id, dbg_starter s = dbg_starter() );
+
+#endif
+
+
+// ************************************************************************** //
+// **************    attach debugger to the current process    ************** //
+// ************************************************************************** //
+
+bool BOOST_TEST_DECL attach_debugger( bool break_or_continue = true );
+
+// ************************************************************************** //
+// **************   switch on/off detect memory leaks feature  ************** //
+// ************************************************************************** //
+
+void BOOST_TEST_DECL detect_memory_leaks( bool on_off );
+
+// ************************************************************************** //
+// **************      cause program to break execution in     ************** //
+// **************     debugger at specific allocation point    ************** //
+// ************************************************************************** //
+
+void BOOST_TEST_DECL break_memory_alloc( long mem_alloc_order_num );
+
+} // namespace debug
+
+} // namespace ndnboost
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif
diff --git a/ndnboost/test/debug_config.hpp b/ndnboost/test/debug_config.hpp
new file mode 100644
index 0000000..54c21e9
--- /dev/null
+++ b/ndnboost/test/debug_config.hpp
@@ -0,0 +1,24 @@
+//  (C) Copyright Gennadiy Rozental 2006-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : user's config for Boost.Test debugging support
+// ***************************************************************************
+
+#ifndef BOOST_TEST_DEBUG_CONFIG_HPP_112006GER
+#define BOOST_TEST_DEBUG_CONFIG_HPP_112006GER
+
+// ';' separated list of supported debuggers
+// #define BOOST_TEST_DBG_LIST gdb;dbx
+
+// maximum size of /proc/pid/stat file
+// #define BOOST_TEST_STAT_LINE_MAX
+
+#endif
diff --git a/ndnboost/test/detail/config.hpp b/ndnboost/test/detail/config.hpp
new file mode 100644
index 0000000..1b6ae68
--- /dev/null
+++ b/ndnboost/test/detail/config.hpp
@@ -0,0 +1,104 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 63441 $
+//
+//  Description : as a central place for global configuration switches
+// ***************************************************************************
+
+#ifndef BOOST_TEST_CONFIG_HPP_071894GER
+#define BOOST_TEST_CONFIG_HPP_071894GER
+
+// Boost
+#include <ndnboost/config.hpp> // compilers workarounds
+#include <ndnboost/detail/workaround.hpp>
+
+//____________________________________________________________________________//
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)) || \
+    BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))     || \
+    (defined __sgi && BOOST_WORKAROUND(_COMPILER_VERSION, BOOST_TESTED_AT(730)))
+#  define BOOST_TEST_SHIFTED_LINE
+#endif
+
+//____________________________________________________________________________//
+
+#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32))
+#  define BOOST_TEST_CALL_DECL __cdecl
+#else
+#  define BOOST_TEST_CALL_DECL /**/
+#endif
+
+//____________________________________________________________________________//
+
+#if !defined(BOOST_NO_STD_LOCALE) &&            \
+    !BOOST_WORKAROUND(BOOST_MSVC, < 1310)  &&   \
+    !defined(__MWERKS__) 
+#  define BOOST_TEST_USE_STD_LOCALE 1
+#endif
+
+//____________________________________________________________________________//
+
+#if BOOST_WORKAROUND(__BORLANDC__, <= 0x570)            || \
+    BOOST_WORKAROUND( __COMO__, <= 0x433 )              || \
+    BOOST_WORKAROUND( __INTEL_COMPILER, <= 800 )        || \
+    defined(__sgi) && _COMPILER_VERSION <= 730          || \
+    BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))  || \
+    defined(__DECCXX)                                   || \
+    defined(__DMC__)
+#  define BOOST_TEST_NO_PROTECTED_USING
+#endif
+
+//____________________________________________________________________________//
+
+#if defined(__GNUC__) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
+#define BOOST_TEST_PROTECTED_VIRTUAL virtual
+#else
+#define BOOST_TEST_PROTECTED_VIRTUAL
+#endif
+
+//____________________________________________________________________________//
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+    !BOOST_WORKAROUND(BOOST_MSVC, <1310) && \
+    !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x530))
+#  define BOOST_TEST_SUPPORT_INTERACTION_TESTING 1
+#endif
+
+//____________________________________________________________________________//
+
+#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_TEST_DYN_LINK)
+#  define BOOST_TEST_DYN_LINK
+#endif
+
+#if defined(BOOST_TEST_INCLUDED)
+#  undef BOOST_TEST_DYN_LINK
+#endif
+
+#if defined(BOOST_TEST_DYN_LINK)
+#  define BOOST_TEST_ALTERNATIVE_INIT_API
+
+#  ifdef BOOST_TEST_SOURCE
+#    define BOOST_TEST_DECL BOOST_SYMBOL_EXPORT
+#  else
+#    define BOOST_TEST_DECL BOOST_SYMBOL_IMPORT
+#  endif  // BOOST_TEST_SOURCE
+#else
+#  define BOOST_TEST_DECL
+#endif
+
+#if !defined(BOOST_TEST_MAIN) && defined(BOOST_AUTO_TEST_MAIN)
+#define BOOST_TEST_MAIN BOOST_AUTO_TEST_MAIN
+#endif
+
+#if !defined(BOOST_TEST_MAIN) && defined(BOOST_TEST_MODULE)
+#define BOOST_TEST_MAIN BOOST_TEST_MODULE
+#endif
+
+#endif // BOOST_TEST_CONFIG_HPP_071894GER
diff --git a/ndnboost/test/detail/enable_warnings.hpp b/ndnboost/test/detail/enable_warnings.hpp
new file mode 100644
index 0000000..2d67fb0
--- /dev/null
+++ b/ndnboost/test/detail/enable_warnings.hpp
@@ -0,0 +1,30 @@
+//  (C) Copyright Gennadiy Rozental 2004-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : enable previosly suppressed warnings
+// ***************************************************************************
+
+#ifdef BOOST_MSVC
+# pragma warning(default: 4511) // copy constructor can't not be generated
+# pragma warning(default: 4512) // assignment operator can't not be generated
+# pragma warning(default: 4100) // unreferenced formal parameter 
+# pragma warning(default: 4996) // <symbol> was declared deprecated 
+# pragma warning(default: 4355) // 'this' : used in base member initializer list
+# pragma warning(default: 4706) // assignment within conditional expression
+# pragma warning(default: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B'
+# pragma warning(default: 4127) // conditional expression is constant
+# pragma warning(default: 4290) // C++ exception specification ignored except to ...
+# pragma warning(default: 4180) // qualifier applied to function type has no meaning; ignored
+# pragma warning(default: 4275) // non dll-interface class ... used as base for dll-interface class ...
+# pragma warning(default: 4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data
+# pragma warning(default: 4511) // 'class' : copy constructor could not be generated
+# pragma warning(pop)
+#endif
diff --git a/ndnboost/test/detail/fwd_decl.hpp b/ndnboost/test/detail/fwd_decl.hpp
new file mode 100644
index 0000000..b8d2a87
--- /dev/null
+++ b/ndnboost/test/detail/fwd_decl.hpp
@@ -0,0 +1,48 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : contains forward eclarations for Boost.Test data types
+// ***************************************************************************
+
+#ifndef BOOST_TEST_FWD_DECL_HPP_011605GER
+#define BOOST_TEST_FWD_DECL_HPP_011605GER
+
+namespace ndnboost {
+
+class  execution_monitor;
+class  execution_exception;
+
+namespace unit_test {
+
+class  test_unit;
+class  test_case;
+class  test_suite;
+class  master_test_suite_t;
+
+class  test_tree_visitor;
+class  test_observer;
+
+// singletons
+class  unit_test_monitor_t;
+class  unit_test_log_t;
+
+class  unit_test_log_formatter;
+struct log_entry_data;
+struct log_checkpoint_data;
+
+class lazy_ostream;
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+#endif // BOOST_TEST_FWD_DECL_HPP_011605GER
+
diff --git a/ndnboost/test/detail/global_typedef.hpp b/ndnboost/test/detail/global_typedef.hpp
new file mode 100644
index 0000000..e87327a
--- /dev/null
+++ b/ndnboost/test/detail/global_typedef.hpp
@@ -0,0 +1,88 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : some trivial global typedefs
+// ***************************************************************************
+
+#ifndef BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
+#define BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
+
+#include <ndnboost/test/utils/basic_cstring/basic_cstring.hpp>
+#define BOOST_TEST_L( s )         ndnboost::unit_test::const_string( s, sizeof( s ) - 1 )
+#define BOOST_TEST_STRINGIZE( s ) BOOST_TEST_L( BOOST_STRINGIZE( s ) )
+#define BOOST_TEST_EMPTY_STRING   BOOST_TEST_L( "" )
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+typedef unsigned long   counter_t;
+
+//____________________________________________________________________________//
+
+enum report_level  { INV_REPORT_LEVEL, CONFIRMATION_REPORT, SHORT_REPORT, DETAILED_REPORT, NO_REPORT };
+
+//____________________________________________________________________________//
+
+enum output_format { INV_OF, CLF /* compiler log format */, XML /* XML */ };
+
+//____________________________________________________________________________//
+
+enum test_unit_type { tut_case = 0x01, tut_suite = 0x10, tut_any = 0x11 };
+
+//____________________________________________________________________________//
+
+typedef unsigned long   test_unit_id;
+
+const test_unit_id INV_TEST_UNIT_ID  = 0xFFFFFFFF;
+const test_unit_id MAX_TEST_CASE_ID  = 0xFFFFFFFE;
+const test_unit_id MIN_TEST_CASE_ID  = 0x00010000;
+const test_unit_id MAX_TEST_SUITE_ID = 0x0000FF00;
+const test_unit_id MIN_TEST_SUITE_ID = 0x00000001;
+
+//____________________________________________________________________________//
+
+namespace ut_detail {
+
+inline test_unit_type
+test_id_2_unit_type( test_unit_id id )
+{
+    return (id & 0xFFFF0000) != 0 ? tut_case : tut_suite;
+}
+
+//____________________________________________________________________________//
+
+// helper templates to prevent ODR violations 
+template<class T> 
+struct static_constant { 
+    static T value; 
+}; 
+
+template<class T> 
+T static_constant<T>::value; 
+
+//____________________________________________________________________________// 
+
+} // namespace ut_detail
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
diff --git a/ndnboost/test/detail/log_level.hpp b/ndnboost/test/detail/log_level.hpp
new file mode 100644
index 0000000..14e69f4
--- /dev/null
+++ b/ndnboost/test/detail/log_level.hpp
@@ -0,0 +1,43 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : shared definition for unit test log levels
+// ***************************************************************************
+
+#ifndef BOOST_TEST_LOG_LEVEL_HPP_011605GER
+#define BOOST_TEST_LOG_LEVEL_HPP_011605GER
+
+namespace ndnboost {
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                   log levels                 ************** //
+// ************************************************************************** //
+
+//  each log level includes all subsequent higher loging levels
+enum            log_level {
+    invalid_log_level        = -1,
+    log_successful_tests     = 0,
+    log_test_units           = 1,
+    log_messages             = 2,
+    log_warnings             = 3,
+    log_all_errors           = 4, // reported by unit test macros
+    log_cpp_exception_errors = 5, // uncaught C++ exceptions
+    log_system_errors        = 6, // including timeouts, signals, traps
+    log_fatal_errors         = 7, // including unit test macros or
+                                  // fatal system errors
+    log_nothing              = 8
+};
+
+} // namespace unit_test
+} // namespace ndnboost
+
+#endif // BOOST_TEST_LOG_LEVEL_HPP_011605GER
diff --git a/ndnboost/test/detail/suppress_warnings.hpp b/ndnboost/test/detail/suppress_warnings.hpp
new file mode 100644
index 0000000..2471226
--- /dev/null
+++ b/ndnboost/test/detail/suppress_warnings.hpp
@@ -0,0 +1,31 @@
+//  (C) Copyright Gennadiy Rozental 2004-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : suppress some warnings 
+// ***************************************************************************
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4511) // copy constructor can't not be generated
+# pragma warning(disable: 4512) // assignment operator can't not be generated
+# pragma warning(disable: 4100) // unreferenced formal parameter 
+# pragma warning(disable: 4996) // <symbol> was declared deprecated 
+# pragma warning(disable: 4355) // 'this' : used in base member initializer list
+# pragma warning(disable: 4706) // assignment within conditional expression
+# pragma warning(disable: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B'
+# pragma warning(disable: 4127) // conditional expression is constant
+# pragma warning(disable: 4290) // C++ exception specification ignored except to ...
+# pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored
+# pragma warning(disable: 4275) // non dll-interface class ... used as base for dll-interface class ...
+# pragma warning(disable: 4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data
+# pragma warning(disable: 4511) // 'class' : copy constructor could not be generated
+#endif
+
diff --git a/ndnboost/test/detail/unit_test_parameters.hpp b/ndnboost/test/detail/unit_test_parameters.hpp
new file mode 100644
index 0000000..364692b
--- /dev/null
+++ b/ndnboost/test/detail/unit_test_parameters.hpp
@@ -0,0 +1,69 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : storage for unit test framework parameters information
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_PARAMETERS_HPP_071894GER
+#define BOOST_TEST_UNIT_TEST_PARAMETERS_HPP_071894GER
+
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/detail/log_level.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+// STL
+#include <iosfwd>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                 runtime_config               ************** //
+// ************************************************************************** //
+
+namespace runtime_config {
+
+BOOST_TEST_DECL void                     init( int& argc, char** argv );
+
+BOOST_TEST_DECL unit_test::log_level     log_level();
+BOOST_TEST_DECL bool                     no_result_code();
+BOOST_TEST_DECL unit_test::report_level  report_level();
+BOOST_TEST_DECL const_string             test_to_run();
+BOOST_TEST_DECL const_string             break_exec_path();
+BOOST_TEST_DECL bool                     save_pattern();
+BOOST_TEST_DECL bool                     show_build_info();
+BOOST_TEST_DECL bool                     show_progress();
+BOOST_TEST_DECL bool                     catch_sys_errors();
+BOOST_TEST_DECL bool                     auto_start_dbg();
+BOOST_TEST_DECL bool                     use_alt_stack();
+BOOST_TEST_DECL bool                     detect_fp_exceptions();
+BOOST_TEST_DECL output_format            report_format();
+BOOST_TEST_DECL output_format            log_format();
+BOOST_TEST_DECL std::ostream*            report_sink();
+BOOST_TEST_DECL std::ostream*            log_sink();
+BOOST_TEST_DECL long                     detect_memory_leaks();
+BOOST_TEST_DECL int                      random_seed();
+
+} // namespace runtime_config
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_PARAMETERS_HPP_071894GER
diff --git a/ndnboost/test/detail/workaround.hpp b/ndnboost/test/detail/workaround.hpp
new file mode 100644
index 0000000..654972b
--- /dev/null
+++ b/ndnboost/test/detail/workaround.hpp
@@ -0,0 +1,65 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : contains mics. workarounds 
+// ***************************************************************************
+
+#ifndef BOOST_TEST_WORKAROUND_HPP_021005GER
+#define BOOST_TEST_WORKAROUND_HPP_021005GER
+
+// Boost
+#include <ndnboost/config.hpp> // compilers workarounds and std::ptrdiff_t
+
+// STL
+#include <iterator>     // for std::distance
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace ut_detail {
+
+#ifdef BOOST_NO_STD_DISTANCE
+template <class T>
+std::ptrdiff_t distance( T const& x_, T const& y_ )
+{ 
+    std::ptrdiff_t res = 0;
+
+    std::distance( x_, y_, res );
+
+    return res;
+}
+
+//____________________________________________________________________________//
+
+#else
+using std::distance;
+#endif
+
+template <class T> inline void ignore_unused_variable_warning(const T&) {}
+
+} // namespace ut_detail
+
+} // namespace unit_test
+
+namespace unit_test_framework = unit_test;
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_WORKAROUND_HPP_021005GER
diff --git a/ndnboost/test/execution_monitor.hpp b/ndnboost/test/execution_monitor.hpp
new file mode 100644
index 0000000..8475686
--- /dev/null
+++ b/ndnboost/test/execution_monitor.hpp
@@ -0,0 +1,263 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  (C) Copyright Beman Dawes 2001.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : defines abstract monitor interfaces and implements execution exception
+//  The original Boost Test Library included an implementation detail function
+//  named catch_exceptions() which caught otherwise uncaught C++ exceptions.
+//  It was derived from an existing test framework by Beman Dawes.  The
+//  intent was to expand later to catch other detectable but platform dependent
+//  error events like Unix signals or Windows structured C exceptions.
+//
+//  Requests from early adopters of the Boost Test Library included
+//  configurable levels of error message detail, elimination of templates,
+//  separation of error reporting, and making the catch_exceptions() facilities
+//  available as a public interface.  Support for unit testing also stretched
+//  the function based design.  Implementation within the header became less
+//  attractive due to the need to include many huge system dependent headers,
+//  although still preferable in certain cases.
+//
+//  All those issues have been addressed by introducing the class-based
+//  design presented here.
+// ***************************************************************************
+
+#ifndef BOOST_TEST_EXECUTION_MONITOR_HPP_071894GER
+#define BOOST_TEST_EXECUTION_MONITOR_HPP_071894GER
+
+// Boost.Test
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/detail/fwd_decl.hpp>
+#include <ndnboost/test/utils/callback.hpp>
+#include <ndnboost/test/utils/class_properties.hpp>
+
+// Boost
+#include <ndnboost/scoped_ptr.hpp>
+#include <ndnboost/scoped_array.hpp>
+#include <ndnboost/type.hpp>
+#include <ndnboost/cstdlib.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace detail {
+
+// ************************************************************************** //
+// **************       detail::translate_exception_base       ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL translate_exception_base {
+public:
+    // Constructor
+    explicit    translate_exception_base( ndnboost::scoped_ptr<translate_exception_base>& next )
+    {
+        next.swap( m_next );
+    }
+
+    // Destructor
+    virtual     ~translate_exception_base() {}
+
+    virtual int operator()( unit_test::callback0<int> const& F ) = 0;
+
+protected:
+    // Data members
+    ndnboost::scoped_ptr<translate_exception_base> m_next;
+};
+
+} // namespace detail
+
+// ************************************************************************** //
+// **************              execution_exception             ************** //
+// ************************************************************************** //
+    
+//  design rationale: fear of being out (or nearly out) of memory.
+    
+class BOOST_TEST_DECL execution_exception {
+    typedef ndnboost::unit_test::const_string const_string;
+public:
+    enum error_code {
+        //  These values are sometimes used as program return codes.
+        //  The particular values have been chosen to avoid conflicts with
+        //  commonly used program return codes: values < 100 are often user
+        //  assigned, values > 255 are sometimes used to report system errors.
+        //  Gaps in values allow for orderly expansion.
+        
+        no_error               = 0,   // for completeness only; never returned
+        user_error             = 200, // user reported non-fatal error
+        cpp_exception_error    = 205, // see note (1) below
+        system_error           = 210, // see note (2) below
+        timeout_error          = 215, // only detectable on certain platforms
+        user_fatal_error       = 220, // user reported fatal error
+        system_fatal_error     = 225  // see note (2) below
+        
+        //  Note 1: Only uncaught C++ exceptions are treated as errors.
+        //  If the application catches a C++ exception, it will never reach
+        //  the execution_monitor.
+        
+        //  Note 2: These errors include Unix signals and Windows structured
+        //  exceptions.  They are often initiated by hardware traps.
+        //
+        //  The implementation decides what is a fatal_system_exception and what is
+        //  just a system_exception.  Fatal errors are so likely to have corrupted
+        //  machine state (like a stack overflow or addressing exception) that it
+        //  is unreasonable to continue execution.
+    };
+    
+    struct BOOST_TEST_DECL location {
+        explicit    location( char const* file_name = 0, size_t line_num = 0, char const* func = 0 );
+
+        const_string    m_file_name;
+        size_t          m_line_num;
+        const_string    m_function;
+    };
+
+    // Constructor
+    execution_exception( error_code ec_, const_string what_msg_, location const& location_ ); // max length 256 inc '\0'
+
+    // Access methods
+    error_code      code() const    { return m_error_code; }
+    const_string    what() const    { return m_what; }
+    location const& where() const   { return m_location; }
+
+private:
+    // Data members
+    error_code      m_error_code;
+    const_string    m_what;
+    location        m_location;
+}; // execution_exception
+
+// ************************************************************************** //
+// **************               execution_monitor              ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL execution_monitor {
+public:
+    // Constructor
+    execution_monitor()
+    : p_catch_system_errors( true )
+    , p_auto_start_dbg( false )
+    , p_timeout( 0 )
+    , p_use_alt_stack( true )
+    , p_detect_fp_exceptions( false )
+    {}
+
+    // Public properties
+    
+    //  The p_catch_system_errors parameter specifies whether the monitor should 
+    //  try to catch system errors/exceptions that would cause program to crash 
+    //  in regular case
+    unit_test::readwrite_property<bool> p_catch_system_errors; 
+    //  The p_auto_start_dbg parameter specifies whether the monitor should 
+    //  try to attach debugger in case of caught system error
+    unit_test::readwrite_property<bool> p_auto_start_dbg;
+    //  The p_timeout parameter specifies the seconds that elapse before
+    //  a timer_error occurs.  May be ignored on some platforms.
+    unit_test::readwrite_property<int>  p_timeout;
+    //  The p_use_alt_stack parameter specifies whether the monitor should
+    //  use alternative stack for the signal catching
+    unit_test::readwrite_property<bool> p_use_alt_stack;
+    //  The p_detect_fp_exceptions parameter specifies whether the monitor should
+    //  try to detect hardware floating point exceptions
+    unit_test::readwrite_property<bool> p_detect_fp_exceptions;
+
+    int         execute( unit_test::callback0<int> const& F ); 
+    //  Returns:  Value returned by function call F().
+    //
+    //  Effects:  Calls executes supplied function F inside a try/catch block which also may
+    //  include other unspecified platform dependent error detection code.
+    //
+    //  Throws: execution_exception on an uncaught C++ exception,
+    //  a hardware or software signal, trap, or other exception.
+    //
+    //  Note: execute() doesn't consider it an error for F to return a non-zero value.
+    
+    // register custom (user supplied) exception translator
+    template<typename Exception, typename ExceptionTranslator>
+    void        register_exception_translator( ExceptionTranslator const& tr, ndnboost::type<Exception>* = 0 );
+
+private:
+    // implementation helpers
+    int         catch_signals( unit_test::callback0<int> const& F );
+
+    // Data members
+    ndnboost::scoped_ptr<detail::translate_exception_base> m_custom_translators;
+    ndnboost::scoped_array<char>                           m_alt_stack;
+}; // execution_monitor
+
+namespace detail {
+
+// ************************************************************************** //
+// **************         detail::translate_exception          ************** //
+// ************************************************************************** //
+
+template<typename Exception, typename ExceptionTranslator>
+class translate_exception : public translate_exception_base
+{
+    typedef ndnboost::scoped_ptr<translate_exception_base> base_ptr;
+public:
+    explicit    translate_exception( ExceptionTranslator const& tr, base_ptr& next )
+    : translate_exception_base( next ), m_translator( tr ) {}
+
+    int operator()( unit_test::callback0<int> const& F )
+    {
+        try {
+            return m_next ? (*m_next)( F ) : F();
+        } catch( Exception const& e ) {
+            m_translator( e );
+            return ndnboost::exit_exception_failure;
+        }
+    }
+
+private:
+    // Data members
+    ExceptionTranslator m_translator;
+};
+
+} // namespace detail
+
+template<typename Exception, typename ExceptionTranslator>
+void
+execution_monitor::register_exception_translator( ExceptionTranslator const& tr, ndnboost::type<Exception>* )
+{
+    m_custom_translators.reset( 
+        new detail::translate_exception<Exception,ExceptionTranslator>( tr,m_custom_translators ) );
+}
+
+// ************************************************************************** //
+// **************               execution_aborted              ************** //
+// ************************************************************************** //
+
+struct execution_aborted {};
+
+// ************************************************************************** //
+// **************                  system_error                ************** //
+// ************************************************************************** //
+
+class system_error {
+public:
+    // Constructor
+    explicit    system_error( char const* exp );
+
+    unit_test::readonly_property<long>          p_errno; 
+    unit_test::readonly_property<char const*>   p_failed_exp; 
+};
+
+#define BOOST_TEST_SYS_ASSERT( exp ) if( (exp) ) ; else throw ::ndnboost::system_error( BOOST_STRINGIZE( exp ) )
+
+}  // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif
diff --git a/ndnboost/test/floating_point_comparison.hpp b/ndnboost/test/floating_point_comparison.hpp
new file mode 100644
index 0000000..211f29b
--- /dev/null
+++ b/ndnboost/test/floating_point_comparison.hpp
@@ -0,0 +1,286 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : defines algoirthms for comparing 2 floating point values
+// ***************************************************************************
+
+#ifndef BOOST_TEST_FLOATING_POINT_COMPARISON_HPP_071894GER
+#define BOOST_TEST_FLOATING_POINT_COMPARISON_HPP_071894GER
+
+// Boost.Test
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/utils/class_properties.hpp>
+#include <ndnboost/test/predicate_result.hpp>
+
+// Boost
+#include <ndnboost/limits.hpp>  // for std::numeric_limits
+#include <ndnboost/numeric/conversion/conversion_traits.hpp> // for numeric::conversion_traits
+#include <ndnboost/static_assert.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace test_tools {
+
+using unit_test::readonly_property;
+
+// ************************************************************************** //
+// **************        floating_point_comparison_type        ************** //
+// ************************************************************************** //
+
+enum floating_point_comparison_type {
+    FPC_STRONG, // "Very close"   - equation 1' in docs, the default
+    FPC_WEAK    // "Close enough" - equation 2' in docs.
+
+};
+
+// ************************************************************************** //
+// **************                    details                   ************** //
+// ************************************************************************** //
+
+namespace tt_detail {
+
+// FPT is Floating-Point Type: float, double, long double or User-Defined.
+template<typename FPT>
+inline FPT
+fpt_abs( FPT fpv ) 
+{
+    return fpv < static_cast<FPT>(0) ? -fpv : fpv;
+}
+
+//____________________________________________________________________________//
+
+template<typename FPT>
+struct fpt_limits {
+    static FPT    min_value()
+    {
+        return std::numeric_limits<FPT>::is_specialized
+                    ? (std::numeric_limits<FPT>::min)()
+                    : 0;
+    }
+    static FPT    max_value()
+    {
+        return std::numeric_limits<FPT>::is_specialized
+                    ? (std::numeric_limits<FPT>::max)()
+                    : static_cast<FPT>(1000000); // for the our purpuses it doesn't really matter what value is returned here
+    }
+};
+
+//____________________________________________________________________________//
+
+// both f1 and f2 are unsigned here
+template<typename FPT>
+inline FPT
+safe_fpt_division( FPT f1, FPT f2 )
+{
+    // Avoid overflow.
+    if( (f2 < static_cast<FPT>(1))  && (f1 > f2*fpt_limits<FPT>::max_value()) )
+        return fpt_limits<FPT>::max_value();
+
+    // Avoid underflow.
+    if( (f1 == static_cast<FPT>(0)) ||
+        ((f2 > static_cast<FPT>(1)) && (f1 < f2*fpt_limits<FPT>::min_value())) )
+        return static_cast<FPT>(0);
+
+    return f1/f2;
+}
+
+//____________________________________________________________________________//
+
+} // namespace tt_detail
+
+// ************************************************************************** //
+// **************         tolerance presentation types         ************** //
+// ************************************************************************** //
+
+template<typename FPT>
+struct percent_tolerance_t {
+    explicit    percent_tolerance_t( FPT v ) : m_value( v ) {}
+
+    FPT m_value;
+};
+
+//____________________________________________________________________________//
+
+template<typename Out,typename FPT>
+Out& operator<<( Out& out, percent_tolerance_t<FPT> t )
+{
+    return out << t.m_value;
+}
+
+//____________________________________________________________________________//
+
+template<typename FPT>
+inline percent_tolerance_t<FPT>
+percent_tolerance( FPT v )
+{
+    return percent_tolerance_t<FPT>( v );
+}
+
+//____________________________________________________________________________//
+
+template<typename FPT>
+struct fraction_tolerance_t {
+    explicit fraction_tolerance_t( FPT v ) : m_value( v ) {}
+
+    FPT m_value;
+};
+
+//____________________________________________________________________________//
+
+template<typename Out,typename FPT>
+Out& operator<<( Out& out, fraction_tolerance_t<FPT> t )
+{
+    return out << t.m_value;
+}
+
+//____________________________________________________________________________//
+
+template<typename FPT>
+inline fraction_tolerance_t<FPT>
+fraction_tolerance( FPT v )
+{
+    return fraction_tolerance_t<FPT>( v );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************             close_at_tolerance               ************** //
+// ************************************************************************** //
+
+template<typename FPT>
+class close_at_tolerance {
+public:
+    // Public typedefs
+    typedef bool result_type;
+
+    // Constructor
+    template<typename ToleranceBaseType>
+    explicit    close_at_tolerance( percent_tolerance_t<ToleranceBaseType>  tolerance, 
+                                    floating_point_comparison_type          fpc_type = FPC_STRONG ) 
+    : p_fraction_tolerance( tt_detail::fpt_abs( static_cast<FPT>(0.01)*tolerance.m_value ) )
+    , p_strong_or_weak( fpc_type ==  FPC_STRONG )
+    , m_report_modifier( 100. )
+    {}
+    template<typename ToleranceBaseType>
+    explicit    close_at_tolerance( fraction_tolerance_t<ToleranceBaseType> tolerance, 
+                                    floating_point_comparison_type          fpc_type = FPC_STRONG ) 
+    : p_fraction_tolerance( tt_detail::fpt_abs( tolerance.m_value ) )
+    , p_strong_or_weak( fpc_type ==  FPC_STRONG )
+    , m_report_modifier( 1. )
+    {}
+
+    predicate_result        operator()( FPT left, FPT right ) const
+    {
+        FPT diff = tt_detail::fpt_abs( left - right );
+        FPT d1   = tt_detail::safe_fpt_division( diff, tt_detail::fpt_abs( right ) );
+        FPT d2   = tt_detail::safe_fpt_division( diff, tt_detail::fpt_abs( left ) );
+        
+        predicate_result res( p_strong_or_weak 
+            ? (d1 <= p_fraction_tolerance.get() && d2 <= p_fraction_tolerance.get()) 
+            : (d1 <= p_fraction_tolerance.get() || d2 <= p_fraction_tolerance.get()) );
+
+        if( !res )
+            res.message() << (( d1 <= p_fraction_tolerance.get() ? d2 : d1 ) * m_report_modifier);
+
+        return res;
+    }
+
+    // Public properties
+    readonly_property<FPT>  p_fraction_tolerance;
+    readonly_property<bool> p_strong_or_weak;
+private:
+    // Data members
+    FPT                     m_report_modifier;
+};
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************               check_is_close                 ************** //
+// ************************************************************************** //
+
+struct BOOST_TEST_DECL check_is_close_t {
+    // Public typedefs
+    typedef bool result_type;
+
+    template<typename FPT1, typename FPT2, typename ToleranceBaseType>
+    predicate_result
+    operator()( FPT1 left, FPT2 right, percent_tolerance_t<ToleranceBaseType> tolerance, 
+                floating_point_comparison_type fpc_type = FPC_STRONG ) const
+    {
+        // deduce "better" type from types of arguments being compared
+        // if one type is floating and the second integral we use floating type and 
+        // value of integral type is promoted to the floating. The same for float and double
+        // But we don't want to compare two values of integral types using this tool.
+        typedef typename numeric::conversion_traits<FPT1,FPT2>::supertype FPT;
+        BOOST_STATIC_ASSERT( !is_integral<FPT>::value );
+
+        close_at_tolerance<FPT> pred( tolerance, fpc_type );
+
+        return pred( left, right );
+    }
+    template<typename FPT1, typename FPT2, typename ToleranceBaseType>
+    predicate_result
+    operator()( FPT1 left, FPT2 right, fraction_tolerance_t<ToleranceBaseType> tolerance, 
+                floating_point_comparison_type fpc_type = FPC_STRONG ) const
+    {
+        // same as in a comment above
+        typedef typename numeric::conversion_traits<FPT1,FPT2>::supertype FPT;
+        BOOST_STATIC_ASSERT( !is_integral<FPT>::value );
+
+        close_at_tolerance<FPT> pred( tolerance, fpc_type );
+
+        return pred( left, right );
+    }
+};
+
+namespace {
+check_is_close_t const& check_is_close = unit_test::ut_detail::static_constant<check_is_close_t>::value;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************               check_is_small                 ************** //
+// ************************************************************************** //
+
+struct BOOST_TEST_DECL check_is_small_t {
+    // Public typedefs
+    typedef bool result_type;
+
+    template<typename FPT>
+    bool
+    operator()( FPT fpv, FPT tolerance ) const
+    {
+        return tt_detail::fpt_abs( fpv ) < tt_detail::fpt_abs( tolerance );
+    }
+};
+
+namespace {
+check_is_small_t const& check_is_small = unit_test::ut_detail::static_constant<check_is_small_t>::value;
+}
+
+//____________________________________________________________________________//
+
+} // namespace test_tools
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_FLOATING_POINT_COMAPARISON_HPP_071894GER
diff --git a/ndnboost/test/framework.hpp b/ndnboost/test/framework.hpp
new file mode 100644
index 0000000..43d249d
--- /dev/null
+++ b/ndnboost/test/framework.hpp
@@ -0,0 +1,112 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : defines framework interface
+// ***************************************************************************
+
+#ifndef BOOST_TEST_FRAMEWORK_HPP_020805GER
+#define BOOST_TEST_FRAMEWORK_HPP_020805GER
+
+// Boost.Test
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/detail/fwd_decl.hpp>
+#include <ndnboost/test/utils/trivial_singleton.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+// STL
+#include <stdexcept>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************              init_unit_test_func             ************** //
+// ************************************************************************** //
+
+#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
+typedef bool        (*init_unit_test_func)();
+#else
+typedef test_suite* (*init_unit_test_func)( int, char* [] );
+#endif
+
+// ************************************************************************** //
+// **************                   framework                  ************** //
+// ************************************************************************** //
+
+namespace framework {
+
+// initialization
+BOOST_TEST_DECL void    init( init_unit_test_func init_func, int argc, char* argv[] );
+BOOST_TEST_DECL bool    is_initialized();
+
+// mutation access methods
+BOOST_TEST_DECL void    register_test_unit( test_case* tc );
+BOOST_TEST_DECL void    register_test_unit( test_suite* ts );
+BOOST_TEST_DECL void    deregister_test_unit( test_unit* tu );
+BOOST_TEST_DECL void    clear();
+
+BOOST_TEST_DECL void    register_observer( test_observer& );
+BOOST_TEST_DECL void    deregister_observer( test_observer& );
+BOOST_TEST_DECL void    reset_observers();
+
+BOOST_TEST_DECL master_test_suite_t& master_test_suite();
+
+// constant access methods
+BOOST_TEST_DECL test_case const&    current_test_case();
+
+BOOST_TEST_DECL test_unit&  get( test_unit_id, test_unit_type );
+template<typename UnitType>
+UnitType&               get( test_unit_id id )
+{
+    return static_cast<UnitType&>( get( id, static_cast<test_unit_type>(UnitType::type) ) );
+}
+
+// test initiation
+BOOST_TEST_DECL void    run( test_unit_id = INV_TEST_UNIT_ID, bool continue_test = true );
+BOOST_TEST_DECL void    run( test_unit const*, bool continue_test = true );
+
+// public test events dispatchers
+BOOST_TEST_DECL void    assertion_result( bool passed );
+BOOST_TEST_DECL void    exception_caught( execution_exception const& );
+BOOST_TEST_DECL void    test_unit_aborted( test_unit const& );
+
+// ************************************************************************** //
+// **************                framework errors              ************** //
+// ************************************************************************** //
+
+struct internal_error : std::runtime_error {
+    internal_error( const_string m ) : std::runtime_error( std::string( m.begin(), m.size() ) ) {}
+};
+
+struct setup_error : std::runtime_error {
+    setup_error( const_string m ) : std::runtime_error( std::string( m.begin(), m.size() ) ) {}
+};
+
+#define BOOST_TEST_SETUP_ASSERT( cond, msg ) if( cond ) {} else throw unit_test::framework::setup_error( msg )
+
+struct nothing_to_test {}; // not really an error
+
+} // namespace framework
+
+} // unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_FRAMEWORK_HPP_020805GER
+
diff --git a/ndnboost/test/impl/compiler_log_formatter.ipp b/ndnboost/test/impl/compiler_log_formatter.ipp
new file mode 100644
index 0000000..e153920
--- /dev/null
+++ b/ndnboost/test/impl/compiler_log_formatter.ipp
@@ -0,0 +1,222 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : implements compiler like Log formatter
+// ***************************************************************************
+
+#ifndef BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
+#define BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
+
+// Boost.Test
+#include <ndnboost/test/output/compiler_log_formatter.hpp>
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+#include <ndnboost/test/framework.hpp>
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+#include <ndnboost/test/utils/lazy_ostream.hpp>
+
+// Boost
+#include <ndnboost/version.hpp>
+
+// STL
+#include <iostream>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace output {
+
+// ************************************************************************** //
+// **************            compiler_log_formatter            ************** //
+// ************************************************************************** //
+
+namespace {
+
+const_string
+test_phase_identifier()
+{
+    return framework::is_initialized() 
+            ? const_string( framework::current_test_case().p_name.get() )
+            : BOOST_TEST_L( "Test setup" );
+}
+
+} // local namespace
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_start( std::ostream& output, counter_t test_cases_amount )
+{
+    if( test_cases_amount > 0 )
+        output  << "Running " << test_cases_amount << " test "
+                << (test_cases_amount > 1 ? "cases" : "case") << "...\n";
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_finish( std::ostream& ostr )
+{
+    ostr.flush();
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_build_info( std::ostream& output )
+{
+    output  << "Platform: " << BOOST_PLATFORM            << '\n'
+            << "Compiler: " << BOOST_COMPILER            << '\n'
+            << "STL     : " << BOOST_STDLIB              << '\n'
+            << "Boost   : " << BOOST_VERSION/100000      << "."
+                            << BOOST_VERSION/100 % 1000  << "."
+                            << BOOST_VERSION % 100       << std::endl;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::test_unit_start( std::ostream& output, test_unit const& tu )
+{
+    output << "Entering test " << tu.p_type_name << " \"" << tu.p_name << "\"" << std::endl;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::test_unit_finish( std::ostream& output, test_unit const& tu, unsigned long elapsed )
+{
+    output << "Leaving test " << tu.p_type_name << " \"" << tu.p_name << "\"";
+
+    if( elapsed > 0 ) {
+        output << "; testing time: ";
+        if( elapsed % 1000 == 0 )
+            output << elapsed/1000 << "ms";
+        else
+            output << elapsed << "mks";
+    }
+
+    output << std::endl;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::test_unit_skipped( std::ostream& output, test_unit const& tu )
+{
+    output  << "Test " << tu.p_type_name << " \"" << tu.p_name << "\"" << "is skipped" << std::endl;
+}
+    
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_exception( std::ostream& output, log_checkpoint_data const& checkpoint_data, execution_exception const& ex )
+{
+    execution_exception::location const& loc = ex.where();
+    print_prefix( output, loc.m_file_name, loc.m_line_num );
+
+    output << "fatal error in \"" << (loc.m_function.is_empty() ? test_phase_identifier() : loc.m_function ) << "\": ";
+
+    output << ex.what();
+
+    if( !checkpoint_data.m_file_name.is_empty() ) {
+        output << '\n';
+        print_prefix( output, checkpoint_data.m_file_name, checkpoint_data.m_line_num );
+        output << "last checkpoint";
+        if( !checkpoint_data.m_message.empty() )
+            output << ": " << checkpoint_data.m_message;
+    }
+    
+    output << std::endl;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_entry_start( std::ostream& output, log_entry_data const& entry_data, log_entry_types let )
+{
+    switch( let ) {
+        case BOOST_UTL_ET_INFO:
+            print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
+            output << "info: ";
+            break;
+        case BOOST_UTL_ET_MESSAGE:
+            break;
+        case BOOST_UTL_ET_WARNING:
+            print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
+            output << "warning in \"" << test_phase_identifier() << "\": ";
+            break;
+        case BOOST_UTL_ET_ERROR:
+            print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
+            output << "error in \"" << test_phase_identifier() << "\": ";
+            break;
+        case BOOST_UTL_ET_FATAL_ERROR:
+            print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
+            output << "fatal error in \"" << test_phase_identifier() << "\": ";
+            break;
+    }
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_entry_value( std::ostream& output, const_string value )
+{
+    output << value;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_entry_value( std::ostream& output, lazy_ostream const& value )
+{
+    output << value;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_entry_finish( std::ostream& output )
+{
+    output << std::endl;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::print_prefix( std::ostream& output, const_string file, std::size_t line )
+{
+#ifdef __APPLE_CC__
+    // Xcode-compatible logging format, idea by Richard Dingwall at 
+    // <http://richarddingwall.name/2008/06/01/using-the-boost-unit-test-framework-with-xcode-3/>. 
+    output << file << ':' << line << ": ";
+#else
+    output << file << '(' << line << "): ";
+#endif
+}
+
+//____________________________________________________________________________//
+
+} // namespace output
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
diff --git a/ndnboost/test/impl/cpp_main.ipp b/ndnboost/test/impl/cpp_main.ipp
new file mode 100644
index 0000000..3bacee1
--- /dev/null
+++ b/ndnboost/test/impl/cpp_main.ipp
@@ -0,0 +1,139 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  (C) Copyright Beman Dawes 1995-2001.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : main function implementation for Program Executon Monitor
+// ***************************************************************************
+
+#ifndef BOOST_TEST_CPP_MAIN_IPP_012205GER
+#define BOOST_TEST_CPP_MAIN_IPP_012205GER
+
+// Boost.Test
+#include <ndnboost/test/execution_monitor.hpp>
+#include <ndnboost/test/detail/config.hpp>
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+
+// Boost
+#include <ndnboost/cstdlib.hpp>    // for exit codes
+#include <ndnboost/config.hpp>     // for workarounds
+
+// STL
+#include <iostream>
+#include <cstdlib>      // std::getenv
+#include <cstring>      // std::strerror
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::getenv; using ::strerror; }
+#endif
+
+namespace {
+
+struct cpp_main_caller {
+    cpp_main_caller( int (*cpp_main_func)( int argc, char* argv[] ), int argc, char** argv ) 
+    : m_cpp_main_func( cpp_main_func )
+    , m_argc( argc )
+    , m_argv( argv ) {}
+    
+    int operator()() { return (*m_cpp_main_func)( m_argc, m_argv ); }
+  
+private:
+    // Data members    
+    int (*m_cpp_main_func)( int argc, char* argv[] );
+    int      m_argc;
+    char**   m_argv;
+};
+
+} // local namespace
+
+// ************************************************************************** //
+// **************             prg_exec_monitor_main            ************** //
+// ************************************************************************** //
+
+namespace ndnboost {
+
+int BOOST_TEST_DECL
+prg_exec_monitor_main( int (*cpp_main)( int argc, char* argv[] ), int argc, char* argv[] )
+{
+    int result = 0;
+
+    try {
+        ndnboost::unit_test::const_string p( std::getenv( "BOOST_TEST_CATCH_SYSTEM_ERRORS" ) );
+        ::ndnboost::execution_monitor ex_mon;
+
+        ex_mon.p_catch_system_errors.value = p != "no";
+        
+        result = ex_mon.execute( 
+            ::ndnboost::unit_test::callback0<int>( cpp_main_caller( cpp_main, argc, argv ) ) );
+        
+        if( result == 0 )
+            result = ::ndnboost::exit_success;
+        else if( result != ::ndnboost::exit_success ) {
+            std::cout << "\n**** error return code: " << result << std::endl;
+            result = ::ndnboost::exit_failure;
+        }
+    }
+    catch( ::ndnboost::execution_exception const& exex ) {
+        std::cout << "\n**** exception(" << exex.code() << "): " << exex.what() << std::endl;
+        result = ::ndnboost::exit_exception_failure;
+    }
+    catch( ::ndnboost::system_error const& ex ) {
+        std::cout << "\n**** failed to initialize execution monitor."
+                  << "\n**** expression at fault: " << ex.p_failed_exp 
+                  << "\n**** error(" << ex.p_errno << "): " << std::strerror( ex.p_errno ) << std::endl;
+        result = ::ndnboost::exit_exception_failure;
+    }
+
+    if( result != ::ndnboost::exit_success ) {
+        std::cerr << "******** errors detected; see standard output for details ********" << std::endl;
+    }
+    else {
+        //  Some prefer a confirming message when all is well, while others don't
+        //  like the clutter.  Use an environment variable to avoid command
+        //  line argument modifications; for use in production programs
+        //  that's a no-no in some organizations.
+        ::ndnboost::unit_test::const_string p( std::getenv( "BOOST_PRG_MON_CONFIRM" ) );
+        if( p != "no" ) { 
+            std::cerr << std::flush << "no errors detected" << std::endl; 
+        }
+    }
+
+    return result;
+}
+
+} // namespace ndnboost
+
+#if !defined(BOOST_TEST_DYN_LINK) && !defined(BOOST_TEST_NO_MAIN)
+
+// ************************************************************************** //
+// **************        main function for tests using lib     ************** //
+// ************************************************************************** //
+
+int cpp_main( int argc, char* argv[] );  // prototype for user's cpp_main()
+
+int BOOST_TEST_CALL_DECL
+main( int argc, char* argv[] )
+{
+    return ::ndnboost::prg_exec_monitor_main( &cpp_main, argc, argv );
+}
+
+//____________________________________________________________________________//
+
+#endif // !BOOST_TEST_DYN_LINK && !BOOST_TEST_NO_MAIN
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_CPP_MAIN_IPP_012205GER
diff --git a/ndnboost/test/impl/debug.ipp b/ndnboost/test/impl/debug.ipp
new file mode 100644
index 0000000..bf23f2e
--- /dev/null
+++ b/ndnboost/test/impl/debug.ipp
@@ -0,0 +1,970 @@
+//  (C) Copyright Gennadiy Rozental 2006-2008.
+//  Use, modification, and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : debug interfaces implementation
+// ***************************************************************************
+
+#ifndef BOOST_TEST_DEBUG_API_IPP_112006GER
+#define BOOST_TEST_DEBUG_API_IPP_112006GER
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+#include <ndnboost/test/detail/workaround.hpp>
+#include <ndnboost/test/detail/global_typedef.hpp>
+
+#include <ndnboost/test/debug.hpp>
+#include <ndnboost/test/debug_config.hpp>
+
+// Implementation on Windows
+#if defined(_WIN32) && !defined(UNDER_CE) && !defined(BOOST_DISABLE_WIN32) // ******* WIN32
+
+#  define BOOST_WIN32_BASED_DEBUG
+
+// SYSTEM API
+#  include <windows.h>
+#  include <winreg.h>
+#  include <cstdio>
+#  include <cstring>
+
+#  if !defined(NDEBUG) && defined(_MSC_VER)
+#    define BOOST_MS_CRT_BASED_DEBUG
+#    include <crtdbg.h>
+#  endif
+
+
+#  if BOOST_WORKAROUND( BOOST_MSVC, <1300)
+#    define snprintf _snprintf
+#  endif
+
+#  ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::memset; using ::sprintf; }
+#  endif
+
+#elif defined(unix) || defined(__unix) // ********************* UNIX
+
+#  define BOOST_UNIX_BASED_DEBUG
+
+// Boost.Test
+#include <ndnboost/test/utils/class_properties.hpp>
+#include <ndnboost/test/utils/algorithm.hpp>
+
+// STL
+#include <cstring>  // std::memcpy
+#include <map>
+#include <cstdio>
+#include <stdarg.h> // !! ?? cstdarg
+
+// SYSTEM API
+#  include <unistd.h>
+#  include <signal.h>
+#  include <fcntl.h>
+
+#  include <sys/types.h>
+#  include <sys/stat.h>
+#  include <sys/wait.h>
+#  include <sys/time.h>
+#  include <stdio.h>
+#  include <stdlib.h>
+
+#  if defined(sun) || defined(__sun)
+
+#    define BOOST_SUN_BASED_DEBUG
+
+#    ifndef BOOST_TEST_DBG_LIST
+#      define BOOST_TEST_DBG_LIST dbx;gdb
+#    endif
+
+#    define BOOST_TEST_CNL_DBG  dbx
+#    define BOOST_TEST_GUI_DBG  dbx-ddd
+
+#    include <procfs.h>
+
+#  elif defined(linux) || defined(__linux)
+
+#    define BOOST_LINUX_BASED_DEBUG
+
+#    include <sys/ptrace.h>
+
+#    ifndef BOOST_TEST_STAT_LINE_MAX
+#      define BOOST_TEST_STAT_LINE_MAX 500
+#    endif
+
+#    ifndef BOOST_TEST_DBG_LIST
+#      define BOOST_TEST_DBG_LIST gdb
+#    endif
+
+#    define BOOST_TEST_CNL_DBG  gdb
+#    define BOOST_TEST_GUI_DBG  gdb-xterm
+
+#  endif
+
+#endif
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace debug {
+
+using unit_test::const_string;
+
+// ************************************************************************** //
+// **************                debug::info_t                 ************** //
+// ************************************************************************** //
+
+namespace {
+
+#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
+
+template<typename T>
+inline void
+dyn_symbol( T& res, char const* module_name, char const* symbol_name )
+{
+    HMODULE m = ::GetModuleHandleA( module_name );
+
+    if( !m )
+        m = ::LoadLibraryA( module_name );
+
+    res = reinterpret_cast<T>( ::GetProcAddress( m, symbol_name ) );
+}
+
+//____________________________________________________________________________//
+
+static struct info_t {
+    typedef BOOL (WINAPI* IsDebuggerPresentT)();
+    typedef LONG (WINAPI* RegQueryValueExT)( HKEY, char const* /*LPTSTR*/, LPDWORD, LPDWORD, LPBYTE, LPDWORD );
+    typedef LONG (WINAPI* RegOpenKeyT)( HKEY, char const* /*LPCTSTR*/, PHKEY );
+    typedef LONG (WINAPI* RegCloseKeyT)( HKEY );
+
+    info_t();
+
+    IsDebuggerPresentT  m_is_debugger_present;
+    RegOpenKeyT         m_reg_open_key;
+    RegQueryValueExT    m_reg_query_value;
+    RegCloseKeyT        m_reg_close_key;
+
+} s_info;
+
+//____________________________________________________________________________//
+
+info_t::info_t()
+{
+    dyn_symbol( m_is_debugger_present, "kernel32", "IsDebuggerPresent" );
+    dyn_symbol( m_reg_open_key, "advapi32", "RegOpenKeyA" );
+    dyn_symbol( m_reg_query_value, "advapi32", "RegQueryValueExA" );
+    dyn_symbol( m_reg_close_key, "advapi32", "RegCloseKey" );
+}
+
+//____________________________________________________________________________//
+
+#elif defined(BOOST_UNIX_BASED_DEBUG)
+
+// ************************************************************************** //
+// **************                   fd_holder                  ************** //
+// ************************************************************************** //
+
+struct fd_holder {
+    explicit fd_holder( int fd ) : m_fd( fd ) {}
+    ~fd_holder()
+    {
+        if( m_fd != -1 )
+            ::close( m_fd );
+    }
+
+    operator int() { return m_fd; }
+
+private:
+    // Data members
+    int m_fd;
+};
+
+
+// ************************************************************************** //
+// **************                 process_info                 ************** //
+// ************************************************************************** //
+
+struct process_info {
+    // Constructor
+    explicit        process_info( int pid );
+
+    // access methods
+    int             parent_pid() const  { return m_parent_pid; }
+    const_string    binary_name() const { return m_binary_name; }
+    const_string    binary_path() const { return m_binary_path; }
+
+private:
+    // Data members
+    int             m_parent_pid;
+    const_string    m_binary_name;
+    const_string    m_binary_path;
+
+#if defined(BOOST_SUN_BASED_DEBUG)
+    struct psinfo   m_psi;
+#elif defined(BOOST_LINUX_BASED_DEBUG)
+    char            m_stat_line[BOOST_TEST_STAT_LINE_MAX+1];
+#endif
+    char            m_binary_path_buff[500+1]; // !! ??
+};
+
+//____________________________________________________________________________//
+
+process_info::process_info( int pid )
+: m_parent_pid( 0 )
+{
+#if defined(BOOST_SUN_BASED_DEBUG)
+    char fname_buff[30];
+
+    ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/psinfo", pid );
+
+    fd_holder psinfo_fd( ::open( fname_buff, O_RDONLY ) );
+
+    if( psinfo_fd == -1 )
+        return;
+
+    if( ::read( psinfo_fd, &m_psi, sizeof(m_psi) ) == -1 )
+        return;
+
+    m_parent_pid = m_psi.pr_ppid;
+
+    m_binary_name.assign( m_psi.pr_fname );
+
+    //-------------------------- //
+    
+    ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/as", pid );
+
+    fd_holder as_fd( ::open( fname_buff, O_RDONLY ) );
+    uintptr_t   binary_name_pos;
+  
+    // !! ?? could we avoid reading whole m_binary_path_buff?
+    if( as_fd == -1 ||
+        ::lseek( as_fd, m_psi.pr_argv, SEEK_SET ) == -1 ||
+        ::read ( as_fd, &binary_name_pos, sizeof(binary_name_pos) ) == -1 ||
+        ::lseek( as_fd, binary_name_pos, SEEK_SET ) == -1 ||
+        ::read ( as_fd, m_binary_path_buff, sizeof(m_binary_path_buff) ) == -1 )
+        return;
+        
+    m_binary_path.assign( m_binary_path_buff );
+        
+#elif defined(BOOST_LINUX_BASED_DEBUG)
+    char fname_buff[30];
+
+    ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/stat", pid );
+
+    fd_holder psinfo_fd( ::open( fname_buff, O_RDONLY ) );
+
+    if( psinfo_fd == -1 )
+        return;
+
+    ssize_t num_read = ::read( psinfo_fd, m_stat_line, sizeof(m_stat_line)-1 );
+    if( num_read == -1 )
+        return;
+
+    m_stat_line[num_read] = 0;
+
+    char const* name_beg = m_stat_line;
+    while( *name_beg && *name_beg != '(' )
+        ++name_beg;
+
+    char const* name_end = name_beg+1;
+    while( *name_end && *name_end != ')' )
+        ++name_end;
+
+    std::sscanf( name_end+1, "%*s%d", &m_parent_pid );
+
+    m_binary_name.assign( name_beg+1, name_end );
+
+    ::snprintf( fname_buff, sizeof(fname_buff), "/proc/%d/exe", pid );
+    num_read = ::readlink( fname_buff, m_binary_path_buff, sizeof(m_binary_path_buff)-1 );
+
+    if( num_read == -1 )
+        return;
+
+    m_binary_path_buff[num_read] = 0;
+    m_binary_path.assign( m_binary_path_buff, num_read );
+#endif
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************             prepare_window_title             ************** //
+// ************************************************************************** //
+
+static char*
+prepare_window_title( dbg_startup_info const& dsi )
+{
+    typedef unit_test::const_string str_t;
+
+    static char title_str[50];
+
+    str_t path_sep( "\\/" );
+
+    str_t::iterator  it = unit_test::find_last_of( dsi.binary_path.begin(), dsi.binary_path.end(),
+                                                   path_sep.begin(), path_sep.end() );
+
+    if( it == dsi.binary_path.end() )
+        it = dsi.binary_path.begin();
+    else
+        ++it;
+
+    ::snprintf( title_str, sizeof(title_str), "%*s %ld", (int)(dsi.binary_path.end()-it), it, dsi.pid );
+
+    return title_str;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                  save_execlp                 ************** //
+// ************************************************************************** //
+
+typedef unit_test::basic_cstring<char> mbuffer;
+
+inline char*
+copy_arg( mbuffer& dest, const_string arg )
+{
+    if( dest.size() < arg.size()+1 )
+        return 0;
+
+    char* res = dest.begin();
+
+    std::memcpy( res, arg.begin(), arg.size()+1 );
+
+    dest.trim_left( arg.size()+1 );
+
+    return res;
+}
+
+//____________________________________________________________________________//
+
+bool
+safe_execlp( char const* file, ... )
+{
+    static char* argv_buff[200];
+
+    va_list     args;
+    char const* arg;
+
+    // first calculate actual number of arguments
+    int         num_args = 2; // file name and 0 at least
+
+    va_start( args, file );
+    while( !!(arg = va_arg( args, char const* )) )
+        num_args++;
+    va_end( args );
+
+    // reserve space for the argument pointers array
+    char**      argv_it  = argv_buff;
+    mbuffer     work_buff( reinterpret_cast<char*>(argv_buff), sizeof(argv_buff) );
+    work_buff.trim_left( num_args * sizeof(char*) );
+
+    // copy all the argument values into local storage
+    if( !(*argv_it++ = copy_arg( work_buff, file )) )
+        return false;
+
+    printf( "!! %s\n", file );
+
+    va_start( args, file );
+    while( !!(arg = va_arg( args, char const* )) ) {
+        printf( "!! %s\n", arg );
+        if( !(*argv_it++ = copy_arg( work_buff, arg )) )
+            return false;
+    }
+    va_end( args );
+
+    *argv_it = 0;
+
+    return ::execvp( file, argv_buff ) != -1;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************            start_debugger_in_emacs           ************** //
+// ************************************************************************** //
+
+static void
+start_debugger_in_emacs( dbg_startup_info const& dsi, char const* emacs_name, char const* dbg_command )
+{
+    char const* title = prepare_window_title( dsi );
+
+    if( !title )
+        return;
+
+    dsi.display.is_empty()
+        ? safe_execlp( emacs_name, "-title", title, "--eval", dbg_command, 0 )
+        : safe_execlp( emacs_name, "-title", title, "-display", dsi.display.begin(), "--eval", dbg_command, 0 );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                 gdb starters                 ************** //
+// ************************************************************************** //
+
+static char const*
+prepare_gdb_cmnd_file( dbg_startup_info const& dsi )
+{
+    // prepare pid value
+    char pid_buff[16];
+    ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid );
+    unit_test::const_string pid_str( pid_buff );
+
+    static char cmd_file_name[] = "/tmp/btl_gdb_cmd_XXXXXX"; // !! ??
+
+    // prepare commands
+    fd_holder cmd_fd( ::mkstemp( cmd_file_name ) );
+
+    if( cmd_fd == -1 )
+        return 0;
+
+#define WRITE_STR( str )  if( ::write( cmd_fd, str.begin(), str.size() ) == -1 ) return 0;
+#define WRITE_CSTR( str ) if( ::write( cmd_fd, str, sizeof( str )-1 ) == -1 ) return 0;
+
+    WRITE_CSTR( "file " );
+    WRITE_STR( dsi.binary_path );
+    WRITE_CSTR( "\nattach " );
+    WRITE_STR( pid_str );
+    WRITE_CSTR( "\nshell unlink " );
+    WRITE_STR( dsi.init_done_lock );
+    WRITE_CSTR( "\ncont" );
+    if( dsi.break_or_continue )
+        WRITE_CSTR( "\nup 4" );
+            
+    WRITE_CSTR( "\necho \\n" ); // !! ??
+    WRITE_CSTR( "\nlist -" );
+    WRITE_CSTR( "\nlist" );
+    WRITE_CSTR( "\nshell unlink " );
+    WRITE_CSTR( cmd_file_name );
+
+    return cmd_file_name;
+}
+
+//____________________________________________________________________________//
+
+static void
+start_gdb_in_console( dbg_startup_info const& dsi )
+{
+    char const* cmnd_file_name = prepare_gdb_cmnd_file( dsi );
+
+    if( !cmnd_file_name )
+        return;
+
+    safe_execlp( "gdb", "-q", "-x", cmnd_file_name, 0 );
+}
+
+//____________________________________________________________________________//
+
+static void
+start_gdb_in_xterm( dbg_startup_info const& dsi )
+{
+    char const* title           = prepare_window_title( dsi );
+    char const* cmnd_file_name  = prepare_gdb_cmnd_file( dsi );
+
+    if( !title || !cmnd_file_name )
+        return;
+
+    safe_execlp( "xterm", "-T", title, "-display", dsi.display.begin(),
+                    "-bg", "black", "-fg", "white", "-geometry", "88x30+10+10", "-fn", "9x15", "-e",
+                 "gdb", "-q", "-x", cmnd_file_name, 0 );
+}
+
+//____________________________________________________________________________//
+
+static void
+start_gdb_in_emacs( dbg_startup_info const& dsi )
+{
+    char const* cmnd_file_name  = prepare_gdb_cmnd_file( dsi );
+    if( !cmnd_file_name )
+        return;
+
+    char dbg_cmd_buff[500]; // !! ??
+    ::snprintf( dbg_cmd_buff, sizeof(dbg_cmd_buff), "(progn (gdb \"gdb -q -x %s\"))", cmnd_file_name );
+
+    start_debugger_in_emacs( dsi, "emacs", dbg_cmd_buff );
+}
+
+//____________________________________________________________________________//
+
+static void
+start_gdb_in_xemacs( dbg_startup_info const& )
+{
+    // !! ??
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                 dbx starters                 ************** //
+// ************************************************************************** //
+
+static char const*
+prepare_dbx_cmd_line( dbg_startup_info const& dsi, bool list_source = true )
+{
+    static char cmd_line_buff[500]; // !! ??
+
+    ::snprintf( cmd_line_buff, sizeof(cmd_line_buff), "unlink %s;cont;%s%s", 
+                   dsi.init_done_lock.begin(), 
+                   dsi.break_or_continue ? "up 2;": "", 
+                   list_source ? "echo \" \";list -w3;" : "" );
+
+    return cmd_line_buff;
+}
+
+//____________________________________________________________________________//
+
+static void
+start_dbx_in_console( dbg_startup_info const& dsi )
+{
+    char pid_buff[16];
+    ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid );
+
+    safe_execlp( "dbx", "-q", "-c", prepare_dbx_cmd_line( dsi ), dsi.binary_path.begin(), pid_buff, 0 );
+}
+
+//____________________________________________________________________________//
+
+static void
+start_dbx_in_xterm( dbg_startup_info const& dsi )
+{
+    char const* title = prepare_window_title( dsi );
+    if( !title )
+        return;
+
+    char pid_buff[16]; // !! ??
+    ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid );
+    
+    safe_execlp( "xterm", "-T", title, "-display", dsi.display.begin(), 
+                    "-bg", "black", "-fg", "white", "-geometry", "88x30+10+10", "-fn", "9x15", "-e",
+                 "dbx", "-q", "-c", prepare_dbx_cmd_line( dsi ), dsi.binary_path.begin(), pid_buff, 0 );
+}
+
+//____________________________________________________________________________//
+
+static void
+start_dbx_in_emacs( dbg_startup_info const& /*dsi*/ )
+{
+//    char dbg_cmd_buff[500]; // !! ??
+//
+//    ::snprintf( dbg_cmd_buff, sizeof(dbg_cmd_buff), "(progn (dbx \"dbx -q -c cont %s %ld\"))", dsi.binary_path.begin(), dsi.pid );
+
+//    start_debugger_in_emacs( dsi, "emacs", dbg_cmd_buff );
+}
+
+//____________________________________________________________________________//
+
+static void
+start_dbx_in_xemacs( dbg_startup_info const& )
+{
+    // !! ??
+}
+
+//____________________________________________________________________________//
+
+static void
+start_dbx_in_ddd( dbg_startup_info const& dsi )
+{
+    char const* title = prepare_window_title( dsi );
+    if( !title )
+        return;
+
+    char pid_buff[16]; // !! ??
+    ::snprintf( pid_buff, sizeof(pid_buff), "%ld", dsi.pid );
+    
+    safe_execlp( "ddd", "-display", dsi.display.begin(),
+                 "--dbx", "-q", "-c", prepare_dbx_cmd_line( dsi, false ), dsi.binary_path.begin(), pid_buff, 0 );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                debug::info_t                 ************** //
+// ************************************************************************** //
+
+static struct info_t {
+    // Constructor
+    info_t();
+
+    // Public properties
+    unit_test::readwrite_property<std::string>  p_dbg;
+    
+    // Data members
+    std::map<std::string,dbg_starter>           m_dbg_starter_reg;
+} s_info;
+
+//____________________________________________________________________________//
+
+info_t::info_t()
+{
+    p_dbg.value = ::getenv( "DISPLAY" )
+        ? std::string( BOOST_STRINGIZE( BOOST_TEST_GUI_DBG ) )
+        : std::string( BOOST_STRINGIZE( BOOST_TEST_CNL_DBG ) );
+        
+    m_dbg_starter_reg[std::string("gdb")]           = &start_gdb_in_console;
+    m_dbg_starter_reg[std::string("gdb-emacs")]     = &start_gdb_in_emacs;
+    m_dbg_starter_reg[std::string("gdb-xterm")]     = &start_gdb_in_xterm;
+    m_dbg_starter_reg[std::string("gdb-xemacs")]    = &start_gdb_in_xemacs;
+
+    m_dbg_starter_reg[std::string("dbx")]           = &start_dbx_in_console;
+    m_dbg_starter_reg[std::string("dbx-emacs")]     = &start_dbx_in_emacs;
+    m_dbg_starter_reg[std::string("dbx-xterm")]     = &start_dbx_in_xterm;
+    m_dbg_starter_reg[std::string("dbx-xemacs")]    = &start_dbx_in_xemacs;
+    m_dbg_starter_reg[std::string("dbx-ddd")]       = &start_dbx_in_ddd;
+}
+
+//____________________________________________________________________________//
+
+#endif
+
+} // local namespace
+
+// ************************************************************************** //
+// **************  check if program is running under debugger  ************** //
+// ************************************************************************** //
+
+bool
+under_debugger()
+{
+#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
+
+    return !!s_info.m_is_debugger_present && s_info.m_is_debugger_present();
+
+#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX
+
+    // !! ?? could/should we cache the result somehow?
+    const_string    dbg_list = BOOST_TEST_STRINGIZE( BOOST_TEST_DBG_LIST );
+
+    pid_t pid = ::getpid();
+
+    while( pid != 0 ) {
+        process_info pi( pid );
+
+        // !! ?? should we use tokenizer here instead?
+        if( dbg_list.find( pi.binary_name() ) != const_string::npos )
+            return true;
+
+        pid = (pi.parent_pid() == pid ? 0 : pi.parent_pid());
+    }
+
+    return false;
+
+#else // ****************************************************** default
+
+    return false;
+
+#endif
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************       cause program to break execution       ************** //
+// **************           in debugger at call point          ************** //
+// ************************************************************************** //
+
+void
+debugger_break()
+{
+    // !! ?? auto-start debugger?
+
+#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1300)                       ||  \
+    BOOST_WORKAROUND(__GNUC__, >= 3) && !defined(__MINGW32__)   ||  \
+    defined(__INTEL_COMPILER)
+#   define BOOST_DEBUG_BREAK    __debugbreak
+#else
+#   define BOOST_DEBUG_BREAK    DebugBreak
+#endif
+
+#ifndef __MINGW32__
+    if( !under_debugger() ) {
+        __try {
+            __try {
+                BOOST_DEBUG_BREAK();
+            }
+            __except( UnhandledExceptionFilter(GetExceptionInformation()) )
+            {
+                // User opted to ignore the breakpoint
+                return;
+            }
+        }
+        __except (EXCEPTION_EXECUTE_HANDLER)
+        {
+            // If we got here, the user has pushed Debug. Debugger is already attached to our process and we
+            // continue to let the another BOOST_DEBUG_BREAK to be called.
+        }
+    }
+#endif
+
+    BOOST_DEBUG_BREAK();
+
+#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX
+
+    ::kill( ::getpid(), SIGTRAP );
+
+#else // ****************************************************** default
+
+#endif
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************            console debugger setup            ************** //
+// ************************************************************************** //
+
+#if defined(BOOST_UNIX_BASED_DEBUG) // ************************ UNIX
+
+std::string
+set_debugger( unit_test::const_string dbg_id, dbg_starter s )
+{
+    std::string old = s_info.p_dbg;
+
+    assign_op( s_info.p_dbg.value, dbg_id, 0 );
+
+    if( !!s )
+        s_info.m_dbg_starter_reg[s_info.p_dbg] = s;
+
+    return old;
+}
+
+#else  // ***************************************************** default
+
+std::string
+set_debugger( unit_test::const_string, dbg_starter )
+{
+    return std::string();
+}
+
+#endif
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************    attach debugger to the current process    ************** //
+// ************************************************************************** //
+
+bool
+attach_debugger( bool break_or_continue )
+{
+    if( under_debugger() )
+        return false;
+
+#if defined(BOOST_WIN32_BASED_DEBUG) // *********************** WIN32
+
+    const int MAX_CMD_LINE = 200;
+
+    // *************************************************** //
+    // Debugger "ready" event
+
+    SECURITY_ATTRIBUTES attr;
+    attr.nLength                = sizeof(attr);
+    attr.lpSecurityDescriptor   = NULL;
+    attr.bInheritHandle         = true;
+
+    // manual resettable, initially non signaled, unnamed event,
+    // that will signal me that debugger initialization is done
+    HANDLE dbg_init_done_ev = ::CreateEvent(
+        &attr,          // pointer to security attributes
+        true,           // flag for manual-reset event
+        false,          // flag for initial state
+        NULL            // pointer to event-object name
+    );
+
+    if( !dbg_init_done_ev )
+        return false;
+
+    // *************************************************** //
+    // Debugger command line format
+
+    HKEY reg_key;
+
+    if( !s_info.m_reg_open_key || (*s_info.m_reg_open_key)(
+            HKEY_LOCAL_MACHINE,                                         // handle of open key
+            "Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug", // name of subkey to open
+            &reg_key ) != ERROR_SUCCESS )                               // address of handle of open key
+        return false;
+
+    char  format[MAX_CMD_LINE];
+    DWORD format_size = MAX_CMD_LINE;
+    DWORD type = REG_SZ;
+
+    if( !s_info.m_reg_query_value || (*s_info.m_reg_query_value)(
+            reg_key,                            // handle of open key
+            "Debugger",                         // name of subkey to query
+            0,                                  // reserved
+            &type,                              // value type
+            (LPBYTE)format,                     // buffer for returned string
+            &format_size ) != ERROR_SUCCESS )   // in: buffer size; out: actual size of returned string
+        return false;
+
+    if( !s_info.m_reg_close_key || (*s_info.m_reg_close_key)( reg_key ) != ERROR_SUCCESS )
+        return false;
+
+    // *************************************************** //
+    // Debugger command line
+
+    char cmd_line[MAX_CMD_LINE];
+    std::sprintf( cmd_line, format, ::GetCurrentProcessId(), dbg_init_done_ev );
+
+    // *************************************************** //
+    // Debugger window parameters
+
+    STARTUPINFOA    startup_info;
+    std::memset( &startup_info, 0, sizeof(startup_info) );
+
+    startup_info.cb             = sizeof(startup_info);
+    startup_info.dwFlags        = STARTF_USESHOWWINDOW;
+    startup_info.wShowWindow    = SW_SHOWNORMAL;
+
+    // debugger process s_info
+    PROCESS_INFORMATION debugger_info;
+
+    bool created = !!::CreateProcessA(
+        NULL,           // pointer to name of executable module; NULL - use the one in command line
+        cmd_line,       // pointer to command line string
+        NULL,           // pointer to process security attributes; NULL - debugger's handle can't be inherited
+        NULL,           // pointer to thread security attributes; NULL - debugger's handle can't be inherited
+        true,           // debugger inherit opened handles
+        0,              // priority flags; 0 - normal priority
+        NULL,           // pointer to new environment block; NULL - use this process environment
+        NULL,           // pointer to current directory name; NULL - use this process correct directory
+        &startup_info,  // pointer to STARTUPINFO that specifies main window appearance
+        &debugger_info  // pointer to PROCESS_INFORMATION that will contain the new process identification
+    );
+
+    if( created )
+        ::WaitForSingleObject( dbg_init_done_ev, INFINITE );
+
+    ::CloseHandle( dbg_init_done_ev );
+
+    if( !created )
+        return false;
+
+    if( break_or_continue )
+        debugger_break();
+
+    return true;
+
+#elif defined(BOOST_UNIX_BASED_DEBUG) // ********************** UNIX
+
+    char init_done_lock_fn[] = "/tmp/btl_dbg_init_done_XXXXXX";
+    fd_holder init_done_lock_fd( ::mkstemp( init_done_lock_fn ) );
+
+    if( init_done_lock_fd == -1 )
+        return false;
+    
+    pid_t child_pid = fork();
+
+    if( child_pid == -1 )
+        return false;
+
+    if( child_pid != 0 ) { // parent process - here we will start the debugger
+        dbg_startup_info dsi;
+    
+        process_info pi( child_pid );
+        if( pi.binary_path().is_empty() )
+            ::exit( -1 );
+
+        dsi.pid                 = child_pid;
+        dsi.break_or_continue   = break_or_continue;
+        dsi.binary_path         = pi.binary_path();
+        dsi.display             = ::getenv( "DISPLAY" );
+        dsi.init_done_lock      = init_done_lock_fn;
+        
+        dbg_starter starter = s_info.m_dbg_starter_reg[s_info.p_dbg];
+        if( !!starter )
+            starter( dsi );
+
+        ::perror( "Boost.Test execution monitor failed to start a debugger:" );
+
+        ::exit( -1 );
+    }
+
+    // child process - here we will continue our test module execution ; // !! ?? should it be vice versa
+
+    while( ::access( init_done_lock_fn, F_OK ) == 0 ) {
+        struct timeval to = { 0, 100 };
+
+        ::select( 0, 0, 0, 0, &to );
+    }
+
+//    char dummy;
+//    while( ::read( init_done_lock_fd, &dummy, sizeof(char) ) == 0 );
+
+    if( break_or_continue )
+        debugger_break();
+
+    return true;
+
+#else // ****************************************************** default
+
+    return false;
+
+#endif
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************   switch on/off detect memory leaks feature  ************** //
+// ************************************************************************** //
+
+void
+detect_memory_leaks( bool on_off )
+{
+    unit_test::ut_detail::ignore_unused_variable_warning( on_off );
+
+#ifdef BOOST_MS_CRT_BASED_DEBUG
+    int flags = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG );
+
+    if( !on_off )
+        flags &= ~_CRTDBG_LEAK_CHECK_DF;
+    else  {
+        flags |= _CRTDBG_LEAK_CHECK_DF;
+        _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
+        _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT);
+    }
+
+    _CrtSetDbgFlag ( flags );
+#endif // BOOST_MS_CRT_BASED_DEBUG
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************      cause program to break execution in     ************** //
+// **************     debugger at specific allocation point    ************** //
+// ************************************************************************** //
+
+void
+break_memory_alloc( long mem_alloc_order_num )
+{
+    unit_test::ut_detail::ignore_unused_variable_warning( mem_alloc_order_num );
+
+#ifdef BOOST_MS_CRT_BASED_DEBUG
+    _CrtSetBreakAlloc( mem_alloc_order_num );
+#endif // BOOST_MS_CRT_BASED_DEBUG
+}
+
+} // namespace debug
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_DEBUG_API_IPP_112006GER
+
diff --git a/ndnboost/test/impl/exception_safety.ipp b/ndnboost/test/impl/exception_safety.ipp
new file mode 100644
index 0000000..c3680a9
--- /dev/null
+++ b/ndnboost/test/impl/exception_safety.ipp
@@ -0,0 +1,537 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : Facilities to perform exception safety tests
+// ***************************************************************************
+
+#ifndef BOOST_TEST_EXECUTION_SAFETY_IPP_112005GER
+#define BOOST_TEST_EXECUTION_SAFETY_IPP_112005GER
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+
+#if BOOST_TEST_SUPPORT_INTERACTION_TESTING
+
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/detail/unit_test_parameters.hpp>
+
+#include <ndnboost/test/utils/callback.hpp>
+#include <ndnboost/test/utils/wrap_stringstream.hpp>
+#include <ndnboost/test/utils/iterator/token_iterator.hpp>
+
+#include <ndnboost/test/interaction_based.hpp>
+#include <ndnboost/test/test_tools.hpp>
+#include <ndnboost/test/unit_test_log.hpp>
+#include <ndnboost/test/framework.hpp>
+#include <ndnboost/test/test_observer.hpp>
+#include <ndnboost/test/debug.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+// Boost
+#include <ndnboost/lexical_cast.hpp>
+
+// STL
+#include <vector>
+#include <cstdlib>
+#include <map>
+#include <iomanip>
+#include <cctype>
+#include <ndnboost/limits.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+using namespace ::ndnboost::unit_test;
+ 
+namespace itest {
+
+// ************************************************************************** //
+// **************             execution_path_point             ************** //
+// ************************************************************************** //
+
+enum exec_path_point_type { EPP_SCOPE, EPP_EXCEPT, EPP_DECISION, EPP_ALLOC };
+
+struct execution_path_point {
+    execution_path_point( exec_path_point_type t, const_string file, std::size_t line_num )
+    : m_type( t )
+    , m_file_name( file )
+    , m_line_num( line_num )
+    {}
+
+    exec_path_point_type    m_type;
+    const_string             m_file_name;
+    std::size_t             m_line_num;
+
+    // Execution path point specific
+    struct decision_data {
+        bool            value;
+        unsigned        forced_exception_point;
+    };
+    struct scope_data {
+        unsigned        size;
+        char const*     name;
+    };
+    struct except_data {
+        char const*     description;
+    };
+    struct alloc_data {
+        void*           ptr;
+        std::size_t     size;
+    };
+
+    union {
+        struct decision_data    m_decision;
+        struct scope_data       m_scope;
+        struct except_data      m_except;
+        struct alloc_data       m_alloc;
+    };
+};
+
+// ************************************************************************** //
+// **************     exception safety test implementation     ************** //
+// ************************************************************************** //
+
+struct exception_safety_tester : itest::manager, test_observer {
+    // helpers types
+    struct unique_exception {};
+
+    // Constructor
+    explicit            exception_safety_tester( const_string test_name );
+    ~exception_safety_tester();
+
+    // check last run and prepare for next
+    bool                next_execution_path();
+
+    // memory tracking
+
+    // manager interface implementation
+    virtual void        exception_point( const_string file, std::size_t line_num, const_string description );
+    virtual bool        decision_point( const_string file, std::size_t line_num );
+    virtual unsigned    enter_scope( const_string file, std::size_t line_num, const_string scope_name );
+    virtual void        leave_scope( unsigned enter_scope_point );
+    virtual void        allocated( const_string file, std::size_t line_num, void* p, std::size_t s );
+    virtual void        freed( void* p );
+
+    // test observer interface
+    virtual void        assertion_result( bool passed );
+    virtual int         priority() { return (std::numeric_limits<int>::max)(); } // we want this observer to run the last
+
+private:
+    void                failure_point();
+    void                report_error();
+
+    typedef std::vector<execution_path_point>   exec_path;
+    typedef std::map<void*,unsigned>            registry;
+
+    // Data members
+    bool        m_internal_activity;
+    
+    unsigned    m_exception_point_counter;
+    unsigned    m_forced_exception_point;
+
+    unsigned    m_exec_path_point;
+    exec_path   m_execution_path;
+
+    unsigned    m_exec_path_counter;
+    unsigned    m_break_exec_path;
+    
+    bool        m_invairant_failed;
+    registry    m_memory_in_use;
+};
+
+//____________________________________________________________________________//
+
+struct activity_guard {
+    bool& m_v;
+
+    activity_guard( bool& v ) : m_v( v )    { m_v = true; }
+    ~activity_guard()                       { m_v = false; }
+};
+
+//____________________________________________________________________________//
+
+exception_safety_tester::exception_safety_tester( const_string test_name )
+: m_internal_activity( true )
+, m_exception_point_counter( 0 )
+, m_forced_exception_point( 1 )
+, m_exec_path_point( 0 )
+, m_exec_path_counter( 1 )
+, m_break_exec_path( static_cast<unsigned>(-1) )
+, m_invairant_failed( false )
+{
+    framework::register_observer( *this );
+
+    if( !runtime_config::break_exec_path().is_empty() ) {
+        using namespace unit_test;
+        
+        string_token_iterator tit( runtime_config::break_exec_path(), 
+                                   (dropped_delimeters = ":",kept_delimeters = " ") );
+        
+        const_string test_to_break = *tit;
+        
+        if( test_to_break == test_name ) {
+            ++tit;
+            
+            m_break_exec_path = lexical_cast<unsigned>( *tit );
+        }
+    }
+    
+    m_internal_activity = false;
+}
+
+//____________________________________________________________________________//
+
+exception_safety_tester::~exception_safety_tester()
+{
+    m_internal_activity = true;
+    
+    framework::deregister_observer( *this );
+}
+
+//____________________________________________________________________________//
+
+bool
+exception_safety_tester::next_execution_path()
+{
+    activity_guard ag( m_internal_activity );
+
+    // check memory usage
+    if( m_execution_path.size() > 0 ) {
+        bool errors_detected = m_invairant_failed || (m_memory_in_use.size() != 0);
+        framework::assertion_result( !errors_detected );
+
+        if( errors_detected )
+            report_error();
+
+        m_memory_in_use.clear();
+    }
+
+    m_exec_path_point           = 0;
+    m_exception_point_counter   = 0;
+    m_invairant_failed          = false;
+    ++m_exec_path_counter;
+
+    while( m_execution_path.size() > 0 ) {
+        switch( m_execution_path.back().m_type ) {
+        case EPP_SCOPE:
+        case EPP_ALLOC:
+            m_execution_path.pop_back();
+            break;
+
+        case EPP_DECISION:
+            if( !m_execution_path.back().m_decision.value ) {
+                m_execution_path.pop_back();
+                break;
+            }
+
+            m_execution_path.back().m_decision.value = false;
+            m_forced_exception_point = m_execution_path.back().m_decision.forced_exception_point;
+            return true;
+
+        case EPP_EXCEPT:
+            m_execution_path.pop_back();
+            ++m_forced_exception_point;
+            return true;
+        }
+    }
+
+    BOOST_TEST_MESSAGE( "Total tested " << --m_exec_path_counter << " execution path" );
+
+    return false;
+}
+
+//____________________________________________________________________________//
+
+void
+exception_safety_tester::exception_point( const_string file, std::size_t line_num, const_string description )
+{
+    activity_guard ag( m_internal_activity );
+
+    if( ++m_exception_point_counter == m_forced_exception_point ) {
+        m_execution_path.push_back(
+            execution_path_point( EPP_EXCEPT, file, line_num ) );
+
+        m_execution_path.back().m_except.description = description.begin();
+
+        ++m_exec_path_point;
+
+        failure_point();
+    }
+}
+
+//____________________________________________________________________________//
+
+bool
+exception_safety_tester::decision_point( const_string file, std::size_t line_num )
+{
+    activity_guard ag( m_internal_activity );
+
+    if( m_exec_path_point < m_execution_path.size() ) {
+        BOOST_REQUIRE_MESSAGE( m_execution_path[m_exec_path_point].m_type == EPP_DECISION &&
+                               m_execution_path[m_exec_path_point].m_file_name == file &&
+                               m_execution_path[m_exec_path_point].m_line_num == line_num,
+                               "Function under test exibit non-deterministic behavior" );
+    }
+    else {
+        m_execution_path.push_back(
+            execution_path_point( EPP_DECISION, file, line_num ) );
+
+        m_execution_path.back().m_decision.value = true;
+        m_execution_path.back().m_decision.forced_exception_point = m_forced_exception_point;
+    }
+
+    return m_execution_path[m_exec_path_point++].m_decision.value;
+}
+
+//____________________________________________________________________________//
+
+unsigned
+exception_safety_tester::enter_scope( const_string file, std::size_t line_num, const_string scope_name )
+{
+    activity_guard ag( m_internal_activity );
+
+    if( m_exec_path_point < m_execution_path.size() ) {
+        BOOST_REQUIRE_MESSAGE( m_execution_path[m_exec_path_point].m_type == EPP_SCOPE &&
+                               m_execution_path[m_exec_path_point].m_file_name == file &&
+                               m_execution_path[m_exec_path_point].m_line_num == line_num,
+                               "Function under test exibit non-deterministic behavior" );
+    }
+    else {
+        m_execution_path.push_back(
+            execution_path_point( EPP_SCOPE, file, line_num ) );
+    }
+
+    m_execution_path[m_exec_path_point].m_scope.size = 0;
+    m_execution_path[m_exec_path_point].m_scope.name = scope_name.begin();
+
+    return m_exec_path_point++;
+}
+
+//____________________________________________________________________________//
+
+void
+exception_safety_tester::leave_scope( unsigned enter_scope_point )
+{
+    activity_guard ag( m_internal_activity );
+
+    BOOST_REQUIRE_MESSAGE( m_execution_path[enter_scope_point].m_type == EPP_SCOPE,
+                           "Function under test exibit non-deterministic behavior" );
+
+    m_execution_path[enter_scope_point].m_scope.size = m_exec_path_point - enter_scope_point;
+}
+
+//____________________________________________________________________________//
+
+void
+exception_safety_tester::allocated( const_string file, std::size_t line_num, void* p, std::size_t s )
+{
+    if( m_internal_activity )
+        return;
+
+    activity_guard ag( m_internal_activity );
+
+    if( m_exec_path_point < m_execution_path.size() )
+        BOOST_REQUIRE_MESSAGE( m_execution_path[m_exec_path_point].m_type == EPP_ALLOC,
+                               "Function under test exibit non-deterministic behavior" );
+    else
+        m_execution_path.push_back(
+            execution_path_point( EPP_ALLOC, file, line_num ) );
+
+    m_execution_path[m_exec_path_point].m_alloc.ptr  = p;
+    m_execution_path[m_exec_path_point].m_alloc.size = s;
+
+    m_memory_in_use.insert( std::make_pair( p, m_exec_path_point++ ) );
+}
+
+//____________________________________________________________________________//
+
+void
+exception_safety_tester::freed( void* p )
+{
+    if( m_internal_activity )
+        return;
+
+    activity_guard ag( m_internal_activity );
+
+    registry::iterator it = m_memory_in_use.find( p );
+    if( it != m_memory_in_use.end() ) {
+        m_execution_path[it->second].m_alloc.ptr = 0;
+        m_memory_in_use.erase( it );
+    }
+}
+
+//____________________________________________________________________________//
+
+void
+exception_safety_tester::assertion_result( bool passed )
+{
+    if( !m_internal_activity && !passed ) {
+        m_invairant_failed = true;
+
+        failure_point();
+    }
+}
+
+//____________________________________________________________________________//
+
+void
+exception_safety_tester::failure_point()
+{
+    if( m_exec_path_counter == m_break_exec_path )
+        debug::debugger_break();
+    
+    throw unique_exception();
+}
+
+//____________________________________________________________________________//
+    
+namespace {
+
+inline void
+format_location( wrap_stringstream& formatter, execution_path_point const& /*p*/, unsigned indent )
+{
+    if( indent )
+        formatter << std::left << std::setw( indent ) << "";
+
+// !! ?? optional   if( p.m_file_name )
+//        formatter << p.m_file_name << '(' << p.m_line_num << "): ";
+}
+
+//____________________________________________________________________________//
+
+template<typename ExecPathIt>
+inline void
+format_execution_path( wrap_stringstream& formatter, ExecPathIt it, ExecPathIt end, unsigned indent = 0 )
+{
+    while( it != end ) {
+        switch( it->m_type ) {
+        case EPP_SCOPE:
+            format_location( formatter, *it, indent );
+            formatter << "> \"" << it->m_scope.name << "\"\n";
+            format_execution_path( formatter, it+1, it + it->m_scope.size, indent + 2 );
+            format_location( formatter, *it, indent );
+            formatter << "< \"" << it->m_scope.name << "\"\n";
+            it += it->m_scope.size;
+            break;
+
+        case EPP_DECISION:
+            format_location( formatter, *it, indent );
+            formatter << "Decision made as " << std::boolalpha << it->m_decision.value << '\n';
+            ++it;
+            break;
+
+        case EPP_EXCEPT:
+            format_location( formatter, *it, indent );
+            formatter << "Forced failure";
+            if( it->m_except.description )
+                formatter << ": " << it->m_except.description;
+            formatter << "\n";
+            ++it;
+            break;
+
+        case EPP_ALLOC:
+            if( it->m_alloc.ptr ) {
+                format_location( formatter, *it, indent );
+                formatter << "Allocated memory block 0x" << std::uppercase << it->m_alloc.ptr 
+                          << ", " << it->m_alloc.size << " bytes long: <";
+
+                unsigned i;
+                for( i = 0; i < std::min<std::size_t>( it->m_alloc.size, 8 ); i++ ) {
+                    unsigned char c = static_cast<unsigned char*>(it->m_alloc.ptr)[i];
+                    if( (std::isprint)( c ) )
+                        formatter << c;
+                    else
+                        formatter << '.';
+                }
+
+                formatter << "> ";
+
+                for( i = 0; i < std::min<std::size_t>( it->m_alloc.size, 8 ); i++ ) {
+                    unsigned c = static_cast<unsigned char*>(it->m_alloc.ptr)[i];
+                    formatter << std::hex << std::uppercase << c << ' ';
+                }
+
+                formatter << "\n";
+            }
+            ++it;
+            break;
+        }
+    }
+}
+
+//____________________________________________________________________________//
+
+} // local namespace
+
+void
+exception_safety_tester::report_error()
+{
+    activity_guard ag( m_internal_activity );
+
+    unit_test_log << unit_test::log::begin( m_execution_path.back().m_file_name,
+                                            m_execution_path.back().m_line_num )
+                  << log_all_errors;
+
+    wrap_stringstream formatter;
+
+    if( m_invairant_failed )
+        formatter << "Failed invariant";
+
+    if( m_memory_in_use.size() != 0 ) {
+        if( m_invairant_failed )
+            formatter << " and ";
+
+        formatter << static_cast<unsigned int>(m_memory_in_use.size()) << " memory leak";
+        if( m_memory_in_use.size() > 1 )
+            formatter << 's';
+    }
+    formatter << " detected in the execution path " << m_exec_path_counter << ":\n";
+
+    format_execution_path( formatter, m_execution_path.begin(), m_execution_path.end() );
+
+    unit_test_log << const_string( formatter.str() ) << unit_test::log::end();
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************             exception safety test            ************** //
+// ************************************************************************** //
+
+void BOOST_TEST_DECL
+exception_safety( callback0<> const& F, const_string test_name )
+{
+    exception_safety_tester est( test_name );
+
+    do {
+        try {
+            F();
+        }
+        catch( exception_safety_tester::unique_exception const& ) {}
+
+    } while( est.next_execution_path() );
+}
+
+//____________________________________________________________________________//
+
+}  // namespace itest
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // non-ancient compiler
+
+#endif // BOOST_TEST_EXECUTION_SAFETY_IPP_112005GER
diff --git a/ndnboost/test/impl/execution_monitor.ipp b/ndnboost/test/impl/execution_monitor.ipp
new file mode 100644
index 0000000..5337347
--- /dev/null
+++ b/ndnboost/test/impl/execution_monitor.ipp
@@ -0,0 +1,1367 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  (C) Copyright Beman Dawes and Ullrich Koethe 1995-2001.
+//  Use, modification, and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : provides execution monitor implementation for all supported
+//  configurations, including Microsoft structured exception based, unix signals
+//  based and special workarounds for borland
+//
+//  Note that when testing requirements or user wishes preclude use of this
+//  file as a separate compilation unit, it may be included as a header file.
+//
+//  Header dependencies are deliberately restricted to reduce coupling to other
+//  boost libraries.
+// ***************************************************************************
+
+#ifndef BOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
+#define BOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+#include <ndnboost/test/detail/workaround.hpp>
+#include <ndnboost/test/execution_monitor.hpp>
+#include <ndnboost/test/debug.hpp>
+
+// Boost
+#include <ndnboost/cstdlib.hpp>    // for exit codes
+#include <ndnboost/config.hpp>     // for workarounds
+#include <ndnboost/exception/get_error_info.hpp> // for get_error_info
+#include <ndnboost/exception/current_exception_cast.hpp> // for current_exception_cast
+
+// STL
+#include <string>               // for std::string
+#include <new>                  // for std::bad_alloc
+#include <typeinfo>             // for std::bad_cast, std::bad_typeid
+#include <exception>            // for std::exception, std::bad_exception
+#include <stdexcept>            // for std exception hierarchy
+#include <cstring>              // for C string API
+#include <cassert>              // for assert
+#include <cstddef>              // for NULL
+#include <cstdio>               // for vsnprintf
+#include <cstdarg>              // for varargs
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::strerror; using ::strlen; using ::strncat; }
+#endif
+
+// to use vsnprintf
+#if defined(__SUNPRO_CC) || defined(__SunOS)
+#  include <stdio.h>
+#  include <stdarg.h>
+using std::va_list;
+#endif
+
+// to use vsnprintf 
+#if defined(__QNXNTO__) 
+#  include <stdio.h> 
+#endif
+
+#if defined(_WIN32) && !defined(BOOST_DISABLE_WIN32) &&                  \
+    (!defined(__COMO__) && !defined(__MWERKS__) && !defined(__GNUC__) || \
+     BOOST_WORKAROUND(__MWERKS__, >= 0x3000))
+
+#  define BOOST_SEH_BASED_SIGNAL_HANDLING
+
+#  include <windows.h>
+
+#  if defined(__MWERKS__) || (defined(_MSC_VER) && !defined(UNDER_CE))
+#    include <eh.h>
+#  endif
+
+#  if defined(__BORLANDC__) && __BORLANDC__ >= 0x560 || defined(__MWERKS__)
+#    include <stdint.h>
+#  endif
+
+#  if defined(__BORLANDC__) && __BORLANDC__ < 0x560
+    typedef unsigned uintptr_t;
+#  endif
+
+#  if BOOST_WORKAROUND(_MSC_VER,  < 1300 ) || defined(UNDER_CE)
+typedef void* uintptr_t;
+#  endif
+
+// for the FP control routines
+#include <float.h>
+
+#ifndef EM_INVALID
+#define EM_INVALID _EM_INVALID
+#endif
+
+#ifndef EM_DENORMAL
+#define EM_DENORMAL _EM_DENORMAL
+#endif
+
+#ifndef EM_ZERODIVIDE
+#define EM_ZERODIVIDE _EM_ZERODIVIDE
+#endif
+
+#ifndef EM_OVERFLOW
+#define EM_OVERFLOW _EM_OVERFLOW
+#endif
+
+#ifndef EM_UNDERFLOW
+#define EM_UNDERFLOW _EM_UNDERFLOW
+#endif
+
+#ifndef MCW_EM
+#define MCW_EM _MCW_EM
+#endif
+
+#  if !defined(NDEBUG) && defined(_MSC_VER) && !defined(UNDER_CE)
+#    include <crtdbg.h>
+#    define BOOST_TEST_CRT_HOOK_TYPE    _CRT_REPORT_HOOK
+#    define BOOST_TEST_CRT_ASSERT       _CRT_ASSERT
+#    define BOOST_TEST_CRT_ERROR        _CRT_ERROR
+#    define BOOST_TEST_CRT_SET_HOOK(H)  _CrtSetReportHook(H)
+#  else
+#    define BOOST_TEST_CRT_HOOK_TYPE    void*
+#    define BOOST_TEST_CRT_ASSERT       2
+#    define BOOST_TEST_CRT_ERROR        1
+#    define BOOST_TEST_CRT_SET_HOOK(H)  (void*)(H)
+#  endif
+
+#  if !BOOST_WORKAROUND(_MSC_VER,  >= 1400 ) || defined(UNDER_CE)
+
+typedef void* _invalid_parameter_handler;
+
+inline _invalid_parameter_handler
+_set_invalid_parameter_handler( _invalid_parameter_handler arg )
+{
+    return arg;
+}
+
+#  endif
+
+#  if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564)) || defined(UNDER_CE)
+
+namespace { void _set_se_translator( void* ) {} }
+
+#  endif
+
+#elif defined(BOOST_HAS_SIGACTION)
+
+#  define BOOST_SIGACTION_BASED_SIGNAL_HANDLING
+
+#  include <unistd.h>
+#  include <signal.h>
+#  include <setjmp.h>
+
+#  if defined(__FreeBSD__)  
+
+#    ifndef SIGPOLL
+#      define SIGPOLL SIGIO
+#    endif
+
+#    if (__FreeBSD_version < 70100)
+
+#      define ILL_ILLADR 0 // ILL_RESAD_FAULT
+#      define ILL_PRVOPC ILL_PRIVIN_FAULT
+#      define ILL_ILLOPN 2 // ILL_RESOP_FAULT
+#      define ILL_COPROC ILL_FPOP_FAULT
+
+#      define BOOST_TEST_LIMITED_SIGNAL_DETAILS
+#      define BOOST_TEST_IGNORE_SIGCHLD
+
+#    endif 
+#  endif 
+
+#  if !defined(__CYGWIN__) && !defined(__QNXNTO__)
+#   define BOOST_TEST_USE_ALT_STACK
+#  endif
+
+#  if defined(SIGPOLL) && !defined(__CYGWIN__)                              && \
+      !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))  && \
+      !defined(__NetBSD__)                                                  && \
+      !defined(__QNXNTO__)
+#    define BOOST_TEST_CATCH_SIGPOLL
+#  endif
+
+#  ifdef BOOST_TEST_USE_ALT_STACK
+#    define BOOST_TEST_ALT_STACK_SIZE SIGSTKSZ
+#  endif
+
+#else
+
+#  define BOOST_NO_SIGNAL_HANDLING
+
+#endif
+
+#ifndef UNDER_CE
+#include <errno.h>
+#endif
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+// ************************************************************************** //
+// **************                  report_error                ************** //
+// ************************************************************************** //
+
+namespace detail {
+
+#ifdef __BORLANDC__
+#  define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) std::vsnprintf( (a1), (a2), (a3), (a4) )
+#elif BOOST_WORKAROUND(_MSC_VER, <= 1310) || \
+      BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3000)) || \
+      defined(UNDER_CE)
+#  define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) _vsnprintf( (a1), (a2), (a3), (a4) )
+#else
+#  define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) vsnprintf( (a1), (a2), (a3), (a4) )
+#endif
+
+template <typename ErrorInfo>
+typename ErrorInfo::value_type
+extract( ndnboost::exception const* ex )
+{
+    if( !ex )
+        return 0;
+
+    typename ErrorInfo::value_type const * val = ndnboost::get_error_info<ErrorInfo>( *ex );
+
+    return val ? *val : 0;
+}
+
+//____________________________________________________________________________//
+
+static void
+report_error( execution_exception::error_code ec, ndnboost::exception const* be, char const* format, va_list* args )
+{
+    static const int REPORT_ERROR_BUFFER_SIZE = 512;
+    static char buf[REPORT_ERROR_BUFFER_SIZE];
+
+    BOOST_TEST_VSNPRINTF( buf, sizeof(buf)-1, format, *args ); 
+    buf[sizeof(buf)-1] = 0;
+
+    va_end( *args );
+
+    throw execution_exception( ec, buf, execution_exception::location( extract<throw_file>( be ), 
+                                                                       extract<throw_line>( be ),
+                                                                       extract<throw_function>( be ) ) );
+}
+
+//____________________________________________________________________________//
+
+static void
+report_error( execution_exception::error_code ec, char const* format, ... )
+{
+    va_list args;
+    va_start( args, format );
+
+    report_error( ec, 0, format, &args );
+}
+
+//____________________________________________________________________________//
+
+static void
+report_error( execution_exception::error_code ec, ndnboost::exception const* be, char const* format, ... )
+{
+    va_list args;
+    va_start( args, format );
+
+    report_error( ec, be, format, &args );
+}
+
+//____________________________________________________________________________//
+
+template<typename Tr,typename Functor>
+inline int
+do_invoke( Tr const& tr, Functor const& F )
+{
+    return tr ? (*tr)( F ) : F();
+}
+
+//____________________________________________________________________________//
+
+} // namespace detail
+
+#if defined(BOOST_SIGACTION_BASED_SIGNAL_HANDLING)
+
+// ************************************************************************** //
+// **************       Sigaction based signal handling        ************** //
+// ************************************************************************** //
+
+namespace detail {
+
+// ************************************************************************** //
+// **************    ndnboost::detail::system_signal_exception    ************** //
+// ************************************************************************** //
+
+class system_signal_exception {
+public:
+    // Constructor
+    system_signal_exception()
+    : m_sig_info( 0 )
+    , m_context( 0 )
+    {}
+
+    // Access methods
+    void        operator()( siginfo_t* i, void* c )
+    {
+        m_sig_info  = i;
+        m_context   = c;
+    }
+    void        report() const;
+
+private:
+    // Data members
+    siginfo_t*  m_sig_info; // system signal detailed info
+    void*       m_context;  // signal context
+};
+
+//____________________________________________________________________________//
+
+void
+system_signal_exception::report() const
+{
+    if( !m_sig_info )
+        return; // no error actually occur?
+
+    switch( m_sig_info->si_code ) {
+    case SI_USER:
+        report_error( execution_exception::system_error,
+                      "signal: generated by kill() (or family); uid=%d; pid=%d",
+                      (int)m_sig_info->si_uid, (int)m_sig_info->si_pid );
+        break;
+    case SI_QUEUE:
+        report_error( execution_exception::system_error,
+                      "signal: sent by sigqueue()" );
+        break;
+    case SI_TIMER:
+        report_error( execution_exception::system_error,
+                      "signal: the expiration of a timer set by timer_settimer()" );
+        break;
+    case SI_ASYNCIO:
+        report_error( execution_exception::system_error,
+                      "signal: generated by the completion of an asynchronous I/O request" );
+        break;
+    case SI_MESGQ:
+        report_error( execution_exception::system_error,
+                      "signal: generated by the the arrival of a message on an empty message queue" );
+        break;
+    default:
+        break;
+    }
+
+    switch( m_sig_info->si_signo ) {
+    case SIGILL:
+        switch( m_sig_info->si_code ) {
+#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+        case ILL_ILLOPC:
+            report_error( execution_exception::system_fatal_error,
+                          "signal: illegal opcode; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        case ILL_ILLTRP:
+            report_error( execution_exception::system_fatal_error,
+                          "signal: illegal trap; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        case ILL_PRVREG:
+            report_error( execution_exception::system_fatal_error,
+                          "signal: privileged register; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        case ILL_BADSTK:
+            report_error( execution_exception::system_fatal_error,
+                          "signal: internal stack error; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+#endif
+        case ILL_ILLOPN:
+            report_error( execution_exception::system_fatal_error,
+                          "signal: illegal operand; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        case ILL_ILLADR:
+            report_error( execution_exception::system_fatal_error,
+                          "signal: illegal addressing mode; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        case ILL_PRVOPC:
+            report_error( execution_exception::system_fatal_error,
+                          "signal: privileged opcode; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        case ILL_COPROC:
+            report_error( execution_exception::system_fatal_error,
+                          "signal: co-processor error; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        default: 
+            report_error( execution_exception::system_fatal_error, 
+                          "signal: SIGILL, si_code: %d (illegal instruction; address of failing instruction: 0x%08lx)", 
+                          m_sig_info->si_addr, m_sig_info->si_code ); 
+            break;
+        }
+        break;
+
+    case SIGFPE:
+        switch( m_sig_info->si_code ) {
+        case FPE_INTDIV:
+            report_error( execution_exception::system_error,
+                          "signal: integer divide by zero; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        case FPE_INTOVF:
+            report_error( execution_exception::system_error,
+                          "signal: integer overflow; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        case FPE_FLTDIV:
+            report_error( execution_exception::system_error,
+                          "signal: floating point divide by zero; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        case FPE_FLTOVF:
+            report_error( execution_exception::system_error,
+                          "signal: floating point overflow; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        case FPE_FLTUND:
+            report_error( execution_exception::system_error,
+                          "signal: floating point underflow; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        case FPE_FLTRES:
+            report_error( execution_exception::system_error,
+                          "signal: floating point inexact result; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        case FPE_FLTINV:
+            report_error( execution_exception::system_error,
+                          "signal: invalid floating point operation; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        case FPE_FLTSUB:
+            report_error( execution_exception::system_error,
+                          "signal: subscript out of range; address of failing instruction: 0x%08lx",
+                          m_sig_info->si_addr );
+            break;
+        default:
+            report_error( execution_exception::system_error,
+                          "signal: SIGFPE, si_code: %d (errnoneous arithmetic operations; address of failing instruction: 0x%08lx)",
+                          m_sig_info->si_addr, m_sig_info->si_code );
+            break;
+        }
+        break;
+
+    case SIGSEGV:
+        switch( m_sig_info->si_code ) {
+#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+        case SEGV_MAPERR:
+            report_error( execution_exception::system_fatal_error,
+                          "memory access violation at address: 0x%08lx: no mapping at fault address",
+                          m_sig_info->si_addr );
+            break;
+        case SEGV_ACCERR:
+            report_error( execution_exception::system_fatal_error,
+                          "memory access violation at address: 0x%08lx: invalid permissions",
+                          m_sig_info->si_addr );
+            break;
+#endif
+        default:
+            report_error( execution_exception::system_fatal_error,
+                          "signal: SIGSEGV, si_code: %d (memory access violation at address: 0x%08lx)",
+                          m_sig_info->si_addr, m_sig_info->si_code );
+            break;
+        }
+        break;
+
+    case SIGBUS:
+        switch( m_sig_info->si_code ) {
+#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+        case BUS_ADRALN:
+            report_error( execution_exception::system_fatal_error,
+                          "memory access violation at address: 0x%08lx: invalid address alignment",
+                          m_sig_info->si_addr );
+            break;
+        case BUS_ADRERR:
+            report_error( execution_exception::system_fatal_error,
+                          "memory access violation at address: 0x%08lx: non-existent physical address",
+                          m_sig_info->si_addr );
+            break;
+        case BUS_OBJERR:
+            report_error( execution_exception::system_fatal_error,
+                          "memory access violation at address: 0x%08lx: object specific hardware error",
+                          m_sig_info->si_addr );
+            break;
+#endif
+        default:
+            report_error( execution_exception::system_fatal_error,
+                          "signal: SIGSEGV, si_code: %d (memory access violation at address: 0x%08lx)",
+                          m_sig_info->si_addr, m_sig_info->si_code );
+            break;
+        }
+        break;
+
+    case SIGCHLD:
+        switch( m_sig_info->si_code ) {
+#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+        case CLD_EXITED:
+            report_error( execution_exception::system_error,
+                          "child has exited; pid: %d; uid: %d; exit value: %d",
+                          (int)m_sig_info->si_pid, (int)m_sig_info->si_uid, (int)m_sig_info->si_status );
+            break;
+        case CLD_KILLED:
+            report_error( execution_exception::system_error,
+                          "child was killed; pid: %d; uid: %d; exit value: %d",
+                          (int)m_sig_info->si_pid, (int)m_sig_info->si_uid, (int)m_sig_info->si_status );
+            break;
+        case CLD_DUMPED:
+            report_error( execution_exception::system_error,
+                          "child terminated abnormally; pid: %d; uid: %d; exit value: %d",
+                          (int)m_sig_info->si_pid, (int)m_sig_info->si_uid, (int)m_sig_info->si_status );
+            break;
+        case CLD_TRAPPED:
+            report_error( execution_exception::system_error,
+                          "traced child has trapped; pid: %d; uid: %d; exit value: %d",
+                          (int)m_sig_info->si_pid, (int)m_sig_info->si_uid, (int)m_sig_info->si_status );
+            break;
+        case CLD_STOPPED:
+            report_error( execution_exception::system_error,
+                          "child has stopped; pid: %d; uid: %d; exit value: %d",
+                          (int)m_sig_info->si_pid, (int)m_sig_info->si_uid, (int)m_sig_info->si_status );
+            break;
+        case CLD_CONTINUED:
+            report_error( execution_exception::system_error,
+                          "stopped child had continued; pid: %d; uid: %d; exit value: %d",
+                          (int)m_sig_info->si_pid, (int)m_sig_info->si_uid, (int)m_sig_info->si_status );
+            break;
+#endif
+        default:
+            report_error( execution_exception::system_error,
+                          "signal: SIGCHLD, si_code: %d (child process has terminated; pid: %d; uid: %d; exit value: %d)",
+                          (int)m_sig_info->si_pid, (int)m_sig_info->si_uid, (int)m_sig_info->si_status, m_sig_info->si_code );
+            break;
+        }
+        break;
+
+#if defined(BOOST_TEST_CATCH_SIGPOLL)
+
+    case SIGPOLL:
+        switch( m_sig_info->si_code ) {
+#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+        case POLL_IN:
+            report_error( execution_exception::system_error,
+                          "data input available; band event %d",
+                          (int)m_sig_info->si_band );
+            break;
+        case POLL_OUT:
+            report_error( execution_exception::system_error,
+                          "output buffers available; band event %d",
+                          (int)m_sig_info->si_band );
+            break;
+        case POLL_MSG:
+            report_error( execution_exception::system_error,
+                          "input message available; band event %d",
+                          (int)m_sig_info->si_band );
+            break;
+        case POLL_ERR:
+            report_error( execution_exception::system_error,
+                          "i/o error; band event %d",
+                          (int)m_sig_info->si_band );
+            break;
+        case POLL_PRI:
+            report_error( execution_exception::system_error,
+                          "high priority input available; band event %d",
+                          (int)m_sig_info->si_band );
+            break;
+#if defined(POLL_ERR) && defined(POLL_HUP) && (POLL_ERR - POLL_HUP)
+        case POLL_HUP:
+            report_error( execution_exception::system_error,
+                          "device disconnected; band event %d",
+                          (int)m_sig_info->si_band );
+            break;
+#endif
+#endif
+        default: 
+            report_error( execution_exception::system_error, 
+                          "signal: SIGPOLL, si_code: %d (asynchronous I/O event occured; band event %d)", 
+                          (int)m_sig_info->si_band, m_sig_info->si_code ); 
+            break; 
+        }
+        break;
+
+#endif
+
+    case SIGABRT:
+        report_error( execution_exception::system_error,
+                      "signal: SIGABRT (application abort requested)" );
+        break;
+
+    case SIGALRM:
+        report_error( execution_exception::timeout_error,
+                      "signal: SIGALRM (timeout while executing function)" );
+        break;
+
+    default:
+        report_error( execution_exception::system_error, "unrecognized signal" );
+    }
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************         ndnboost::detail::signal_action         ************** //
+// ************************************************************************** //
+
+// Forward declaration
+extern "C" {
+static void execution_monitor_jumping_signal_handler( int sig, siginfo_t* info, void* context );
+static void execution_monitor_attaching_signal_handler( int sig, siginfo_t* info, void* context );
+}
+
+class signal_action {
+    typedef struct sigaction* sigaction_ptr;
+public:
+    //Constructor
+    signal_action();
+    signal_action( int sig, bool install, bool attach_dbg, char* alt_stack );
+    ~signal_action();
+
+private:
+    // Data members
+    int                 m_sig;
+    bool                m_installed;
+    struct sigaction    m_new_action;
+    struct sigaction    m_old_action;
+};
+
+//____________________________________________________________________________//
+
+signal_action::signal_action()
+: m_installed( false )
+{}
+
+//____________________________________________________________________________//
+
+signal_action::signal_action( int sig, bool install, bool attach_dbg, char* alt_stack )
+: m_sig( sig )
+, m_installed( install )
+{
+    if( !install )
+        return;
+
+    std::memset( &m_new_action, 0, sizeof(struct sigaction) );
+
+    BOOST_TEST_SYS_ASSERT( ::sigaction( m_sig , sigaction_ptr(), &m_new_action ) != -1 );
+
+    if( m_new_action.sa_sigaction || m_new_action.sa_handler ) {
+        m_installed = false;
+        return;
+    }
+
+    m_new_action.sa_flags     |= SA_SIGINFO;
+    m_new_action.sa_sigaction  = attach_dbg ? &execution_monitor_attaching_signal_handler
+                                            : &execution_monitor_jumping_signal_handler;
+    BOOST_TEST_SYS_ASSERT( sigemptyset( &m_new_action.sa_mask ) != -1 );
+
+#ifdef BOOST_TEST_USE_ALT_STACK
+    if( alt_stack )
+        m_new_action.sa_flags |= SA_ONSTACK;
+#endif
+
+    BOOST_TEST_SYS_ASSERT( ::sigaction( m_sig, &m_new_action, &m_old_action ) != -1 );
+}
+
+//____________________________________________________________________________//
+
+signal_action::~signal_action()
+{
+    if( m_installed )
+        ::sigaction( m_sig, &m_old_action , sigaction_ptr() );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************        ndnboost::detail::signal_handler         ************** //
+// ************************************************************************** //
+
+class signal_handler {
+public:
+    // Constructor
+    explicit signal_handler( bool catch_system_errors, int timeout, bool attach_dbg, char* alt_stack );
+
+    // Destructor
+    ~signal_handler();
+
+    // access methods
+    static sigjmp_buf&      jump_buffer()
+    {
+        assert( !!s_active_handler );
+
+        return s_active_handler->m_sigjmp_buf;
+    }
+
+    static system_signal_exception&  sys_sig()
+    {
+        assert( !!s_active_handler );
+
+        return s_active_handler->m_sys_sig;
+    }
+
+private:
+    // Data members
+    signal_handler*         m_prev_handler;
+    int                     m_timeout;
+
+    signal_action           m_ILL_action;
+    signal_action           m_FPE_action;
+    signal_action           m_SEGV_action;
+    signal_action           m_BUS_action;
+    signal_action           m_CHLD_action;
+    signal_action           m_POLL_action;
+    signal_action           m_ABRT_action;
+    signal_action           m_ALRM_action;
+
+    sigjmp_buf              m_sigjmp_buf;
+    system_signal_exception m_sys_sig;
+
+    static signal_handler*  s_active_handler;
+};
+
+// !! need to be placed in thread specific storage
+typedef signal_handler* signal_handler_ptr;
+signal_handler* signal_handler::s_active_handler = signal_handler_ptr();
+
+//____________________________________________________________________________//
+
+signal_handler::signal_handler( bool catch_system_errors, int timeout, bool attach_dbg, char* alt_stack )
+: m_prev_handler( s_active_handler )
+, m_timeout( timeout )
+, m_ILL_action ( SIGILL , catch_system_errors, attach_dbg, alt_stack )
+, m_FPE_action ( SIGFPE , catch_system_errors, attach_dbg, alt_stack )
+, m_SEGV_action( SIGSEGV, catch_system_errors, attach_dbg, alt_stack )
+, m_BUS_action ( SIGBUS , catch_system_errors, attach_dbg, alt_stack )
+#ifndef BOOST_TEST_IGNORE_SIGCHLD
+, m_CHLD_action( SIGCHLD, catch_system_errors, attach_dbg, alt_stack )
+#endif
+#ifdef BOOST_TEST_CATCH_SIGPOLL
+, m_POLL_action( SIGPOLL, catch_system_errors, attach_dbg, alt_stack )
+#endif
+, m_ABRT_action( SIGABRT, catch_system_errors, attach_dbg, alt_stack )
+, m_ALRM_action( SIGALRM, timeout > 0        , attach_dbg, alt_stack )
+{
+    s_active_handler = this;
+
+    if( m_timeout > 0 ) {
+        ::alarm( 0 );
+        ::alarm( timeout );
+    }
+
+#ifdef BOOST_TEST_USE_ALT_STACK
+    if( alt_stack ) {
+        stack_t sigstk;
+        std::memset( &sigstk, 0, sizeof(stack_t) );
+
+        BOOST_TEST_SYS_ASSERT( ::sigaltstack( 0, &sigstk ) != -1 );
+
+        if( sigstk.ss_flags & SS_DISABLE ) {
+            sigstk.ss_sp    = alt_stack;
+            sigstk.ss_size  = BOOST_TEST_ALT_STACK_SIZE;
+            sigstk.ss_flags = 0;
+            BOOST_TEST_SYS_ASSERT( ::sigaltstack( &sigstk, 0 ) != -1 );
+        }
+    }
+#endif
+}
+
+//____________________________________________________________________________//
+
+signal_handler::~signal_handler()
+{
+    assert( s_active_handler == this );
+
+    if( m_timeout > 0 )
+        ::alarm( 0 );
+
+#ifdef BOOST_TEST_USE_ALT_STACK
+#ifdef __GNUC__
+    // We shouldn't need to explicitly initialize all the members here,
+    // but gcc warns if we don't, so add initializers for each of the
+    // members specified in the POSIX std:
+    stack_t sigstk = { 0, 0, 0 };
+#else
+    stack_t sigstk = { };
+#endif
+
+    sigstk.ss_size  = MINSIGSTKSZ;
+    sigstk.ss_flags = SS_DISABLE;
+    BOOST_TEST_SYS_ASSERT( ::sigaltstack( &sigstk, 0 ) != -1 );
+#endif
+
+    s_active_handler = m_prev_handler;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************       execution_monitor_signal_handler       ************** //
+// ************************************************************************** //
+
+extern "C" {
+
+static bool ignore_sigchild( siginfo_t* info )
+{
+    return info->si_signo == SIGCHLD
+#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+            && info->si_code == CLD_EXITED 
+#endif
+#ifdef BOOST_TEST_IGNORE_NON_ZERO_CHILD_CODE
+            ;
+#else
+            && (int)info->si_status == 0;
+#endif
+}
+
+//____________________________________________________________________________//
+
+static void execution_monitor_jumping_signal_handler( int sig, siginfo_t* info, void* context )
+{
+    if( ignore_sigchild( info ) )
+        return;
+
+    signal_handler::sys_sig()( info, context );
+
+    siglongjmp( signal_handler::jump_buffer(), sig );
+}
+
+//____________________________________________________________________________//
+
+static void execution_monitor_attaching_signal_handler( int sig, siginfo_t* info, void* context )
+{
+    if( ignore_sigchild( info ) )
+        return;
+
+    if( !debug::attach_debugger( false ) )
+        execution_monitor_jumping_signal_handler( sig, info, context );
+
+    // debugger attached; it will handle the signal
+    BOOST_TEST_SYS_ASSERT( ::signal( sig, SIG_DFL ) != SIG_ERR );
+}
+
+//____________________________________________________________________________//
+
+}
+
+} // namespace detail
+
+// ************************************************************************** //
+// **************        execution_monitor::catch_signals      ************** //
+// ************************************************************************** //
+
+int
+execution_monitor::catch_signals( unit_test::callback0<int> const& F )
+{
+    using namespace detail;
+
+#if defined(__CYGWIN__)
+    p_catch_system_errors.value = false;
+#endif
+
+#ifdef BOOST_TEST_USE_ALT_STACK
+    if( !!p_use_alt_stack && !m_alt_stack )
+        m_alt_stack.reset( new char[BOOST_TEST_ALT_STACK_SIZE] );
+#else
+    p_use_alt_stack.value = false;
+#endif
+
+    signal_handler local_signal_handler( p_catch_system_errors, p_timeout, p_auto_start_dbg, 
+                                         !p_use_alt_stack ? 0 : m_alt_stack.get() );
+
+    if( !sigsetjmp( signal_handler::jump_buffer(), 1 ) )
+        return detail::do_invoke( m_custom_translators , F );
+    else
+        throw local_signal_handler.sys_sig();
+}
+
+//____________________________________________________________________________//
+
+#elif defined(BOOST_SEH_BASED_SIGNAL_HANDLING)
+
+// ************************************************************************** //
+// **************   Microsoft structured exception handling    ************** //
+// ************************************************************************** //
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564))
+namespace { void _set_se_translator( void* ) {} }
+#endif
+
+namespace detail {
+
+// ************************************************************************** //
+// **************    ndnboost::detail::system_signal_exception    ************** //
+// ************************************************************************** //
+
+class system_signal_exception {
+public:
+    // Constructor
+    explicit            system_signal_exception( execution_monitor* em )
+    : m_em( em )
+    , m_se_id( 0 )
+    , m_fault_address( 0 )
+    , m_dir( false )
+    {}
+
+    void                report() const;
+    int                 operator()( unsigned int id, _EXCEPTION_POINTERS* exps );
+
+private:
+    // Data members
+    execution_monitor*  m_em;
+
+    unsigned int        m_se_id;
+    void*               m_fault_address;
+    bool                m_dir;
+};
+
+static void
+seh_catch_preventer( unsigned int /* id */, _EXCEPTION_POINTERS* /* exps */ )
+{
+    throw;
+}
+
+//____________________________________________________________________________//
+
+int
+system_signal_exception::operator()( unsigned int id, _EXCEPTION_POINTERS* exps )
+{
+    const unsigned int MSFT_CPP_EXCEPT = 0xE06d7363; // EMSC
+
+    if( !m_em->p_catch_system_errors || (id == MSFT_CPP_EXCEPT) )
+        return EXCEPTION_CONTINUE_SEARCH;
+
+    if( !!m_em->p_auto_start_dbg && debug::attach_debugger( false ) ) {
+        m_em->p_catch_system_errors.value = false;
+        _set_se_translator( &seh_catch_preventer );
+
+        return EXCEPTION_CONTINUE_EXECUTION;
+    }
+
+    m_se_id = id;
+    if( m_se_id == EXCEPTION_ACCESS_VIOLATION && exps->ExceptionRecord->NumberParameters == 2 ) {
+        m_fault_address = (void*)exps->ExceptionRecord->ExceptionInformation[1];
+        m_dir           = exps->ExceptionRecord->ExceptionInformation[0] == 0;
+    }
+
+    return EXCEPTION_EXECUTE_HANDLER;
+}
+
+//____________________________________________________________________________//
+
+void
+system_signal_exception::report() const
+{
+    switch( m_se_id ) {
+    // cases classified as system_fatal_error
+    case EXCEPTION_ACCESS_VIOLATION: {
+        if( !m_fault_address )
+            detail::report_error( execution_exception::system_fatal_error, "memory access violation" );
+        else
+            detail::report_error(
+                execution_exception::system_fatal_error,
+                    "memory access violation occurred at address 0x%08lx, while attempting to %s",
+                    m_fault_address,
+                    m_dir ? " read inaccessible data"
+                          : " write to an inaccessible (or protected) address"
+                    );
+        break;
+    }
+
+    case EXCEPTION_ILLEGAL_INSTRUCTION:
+        detail::report_error( execution_exception::system_fatal_error, "illegal instruction" );
+        break;
+
+    case EXCEPTION_PRIV_INSTRUCTION:
+        detail::report_error( execution_exception::system_fatal_error, "tried to execute an instruction whose operation is not allowed in the current machine mode" );
+        break;
+
+    case EXCEPTION_IN_PAGE_ERROR:
+        detail::report_error( execution_exception::system_fatal_error, "access to a memory page that is not present" );
+        break;
+
+    case EXCEPTION_STACK_OVERFLOW:
+        detail::report_error( execution_exception::system_fatal_error, "stack overflow" );
+        break;
+
+    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
+        detail::report_error( execution_exception::system_fatal_error, "tried to continue execution after a non continuable exception occurred" );
+        break;
+
+    // cases classified as (non-fatal) system_trap
+    case EXCEPTION_DATATYPE_MISALIGNMENT:
+        detail::report_error( execution_exception::system_error, "data misalignment" );
+        break;
+
+    case EXCEPTION_INT_DIVIDE_BY_ZERO:
+        detail::report_error( execution_exception::system_error, "integer divide by zero" );
+        break;
+
+    case EXCEPTION_INT_OVERFLOW:
+        detail::report_error( execution_exception::system_error, "integer overflow" );
+        break;
+
+    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
+        detail::report_error( execution_exception::system_error, "array bounds exceeded" );
+        break;
+
+    case EXCEPTION_FLT_DIVIDE_BY_ZERO:
+        detail::report_error( execution_exception::system_error, "floating point divide by zero" );
+        break;
+
+    case EXCEPTION_FLT_STACK_CHECK:
+        detail::report_error( execution_exception::system_error,
+                              "stack overflowed or underflowed as the result of a floating-point operation" );
+        break;
+
+    case EXCEPTION_FLT_DENORMAL_OPERAND:
+        detail::report_error( execution_exception::system_error,
+                              "operand of floating point operation is denormal" );
+        break;
+
+# if 0 // !! ?? 
+    case EXCEPTION_FLT_INEXACT_RESULT:
+        detail::report_error( execution_exception::system_error,
+                              "result of a floating-point operation cannot be represented exactly" );
+        break;
+#endif
+
+    case EXCEPTION_FLT_OVERFLOW:
+        detail::report_error( execution_exception::system_error,
+                              "exponent of a floating-point operation is greater than the magnitude allowed by the corresponding type" );
+        break;
+
+    case EXCEPTION_FLT_UNDERFLOW:
+        detail::report_error( execution_exception::system_error,
+                              "exponent of a floating-point operation is less than the magnitude allowed by the corresponding type" );
+        break;
+
+    case EXCEPTION_FLT_INVALID_OPERATION:
+        detail::report_error( execution_exception::system_error, "floating point error" );
+        break;
+
+    case EXCEPTION_BREAKPOINT:
+        detail::report_error( execution_exception::system_error, "breakpoint encountered" );
+        break;
+
+    default:
+        detail::report_error( execution_exception::system_error, "unrecognized exception. Id: 0x%08lx", m_se_id );
+        break;
+    }
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************          assert_reporting_function           ************** //
+// ************************************************************************** //
+
+int BOOST_TEST_CALL_DECL
+assert_reporting_function( int reportType, char* userMessage, int* )
+{
+    switch( reportType ) {
+    case BOOST_TEST_CRT_ASSERT:
+        detail::report_error( execution_exception::user_error, userMessage );
+
+        return 1; // return value and retVal are not important since we never reach this line
+    case BOOST_TEST_CRT_ERROR:
+        detail::report_error( execution_exception::system_error, userMessage );
+
+        return 1; // return value and retVal are not important since we never reach this line
+    default:
+        return 0; // use usual reporting method
+    }
+} // assert_reporting_function
+
+//____________________________________________________________________________//
+
+void BOOST_TEST_CALL_DECL
+invalid_param_handler( wchar_t const* /* expr */, 
+                       wchar_t const* /* func */, 
+                       wchar_t const* /* file */, 
+                       unsigned int   /* line */,
+                       uintptr_t      /* reserved */)
+{
+    detail::report_error( execution_exception::user_error, 
+                          "Invalid parameter detected by C runtime library" );
+}
+
+//____________________________________________________________________________//
+
+void BOOST_TEST_CALL_DECL
+switch_fp_exceptions( bool on_off )
+{
+    if( !on_off )
+        _clearfp();
+
+    int cw = ::_controlfp( 0, 0 );
+
+    int exceptions_mask = EM_INVALID|EM_DENORMAL|EM_ZERODIVIDE|EM_OVERFLOW|EM_UNDERFLOW;
+
+    if( on_off )
+        cw &= ~exceptions_mask; // Set the exception masks on, turn exceptions off
+    else
+        cw |= exceptions_mask;  // Set the exception masks off, turn exceptions on
+
+    if( on_off )
+        _clearfp();
+        
+    // Set the control word
+    ::_controlfp( cw, MCW_EM );
+}
+
+//____________________________________________________________________________//
+
+} // namespace detail
+
+// ************************************************************************** //
+// **************        execution_monitor::catch_signals      ************** //
+// ************************************************************************** //
+
+int
+execution_monitor::catch_signals( unit_test::callback0<int> const& F )
+{
+    _invalid_parameter_handler old_iph = _invalid_parameter_handler();
+    BOOST_TEST_CRT_HOOK_TYPE old_crt_hook = 0;
+
+    if( !p_catch_system_errors )
+        _set_se_translator( &detail::seh_catch_preventer );
+    else {
+        if( !!p_detect_fp_exceptions )
+            detail::switch_fp_exceptions( true );
+
+       old_crt_hook = BOOST_TEST_CRT_SET_HOOK( &detail::assert_reporting_function );
+
+       old_iph = _set_invalid_parameter_handler( 
+           reinterpret_cast<_invalid_parameter_handler>( &detail::invalid_param_handler ) );
+    }
+
+    detail::system_signal_exception SSE( this );
+    
+    int ret_val = 0;
+
+    __try {
+        __try {
+            ret_val = detail::do_invoke( m_custom_translators, F );
+        }
+        __except( SSE( GetExceptionCode(), GetExceptionInformation() ) ) {
+            throw SSE;
+        }
+    }
+    __finally {
+        if( !!p_catch_system_errors ) {
+            if( !!p_detect_fp_exceptions )
+                detail::switch_fp_exceptions( false );
+
+            BOOST_TEST_CRT_SET_HOOK( old_crt_hook );
+
+           _set_invalid_parameter_handler( old_iph );
+        }
+    }
+
+    return ret_val;
+}
+
+//____________________________________________________________________________//
+
+#else  // default signal handler
+
+namespace detail {
+
+class system_signal_exception {
+public:
+    void   report() const {}
+};
+
+} // namespace detail
+
+int
+execution_monitor::catch_signals( unit_test::callback0<int> const& F )
+{
+    return detail::do_invoke( m_custom_translators , F );
+}
+
+//____________________________________________________________________________//
+
+#endif  // choose signal handler
+
+// ************************************************************************** //
+// **************          execution_monitor::execute          ************** //
+// ************************************************************************** //
+
+int
+execution_monitor::execute( unit_test::callback0<int> const& F )
+{
+    if( debug::under_debugger() )
+        p_catch_system_errors.value = false;
+
+    try {
+        return catch_signals( F );
+    }
+
+    //  Catch-clause reference arguments are a bit different from function
+    //  arguments (ISO 15.3 paragraphs 18 & 19).  Apparently const isn't
+    //  required.  Programmers ask for const anyhow, so we supply it.  That's
+    //  easier than answering questions about non-const usage.
+
+    catch( char const* ex )
+      { detail::report_error( execution_exception::cpp_exception_error,
+                              "C string: %s", ex ); }
+    catch( std::string const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              "std::string: %s", ex.c_str() ); }
+
+    //  std:: exceptions
+
+    catch( std::bad_alloc const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::bad_alloc: %s", ex.what() ); }
+
+#if BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
+    catch( std::bad_cast const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::bad_cast" ); }
+    catch( std::bad_typeid const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::bad_typeid" ); }
+#else
+    catch( std::bad_cast const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::bad_cast: %s", ex.what() ); }
+    catch( std::bad_typeid const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::bad_typeid: %s", ex.what() ); }
+#endif
+
+    catch( std::bad_exception const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::bad_exception: %s", ex.what() ); }
+    catch( std::domain_error const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::domain_error: %s", ex.what() ); }
+    catch( std::invalid_argument const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::invalid_argument: %s", ex.what() ); }
+    catch( std::length_error const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::length_error: %s", ex.what() ); }
+    catch( std::out_of_range const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::out_of_range: %s", ex.what() ); }
+    catch( std::range_error const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::range_error: %s", ex.what() ); }
+    catch( std::overflow_error const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::overflow_error: %s", ex.what() ); }
+    catch( std::underflow_error const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::underflow_error: %s", ex.what() ); }
+    catch( std::logic_error const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::logic_error: %s", ex.what() ); }
+    catch( std::runtime_error const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::runtime_error: %s", ex.what() ); }
+    catch( std::exception const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              current_exception_cast<ndnboost::exception const>(),
+                              "std::exception: %s", ex.what() ); }
+
+    catch( ndnboost::exception const& ex )
+    { detail::report_error( execution_exception::cpp_exception_error, 
+                            &ex,
+                            "unknown ndnboost::exception" ); }
+
+    // system errors
+    catch( system_error const& ex )
+      { detail::report_error( execution_exception::cpp_exception_error, 
+                              "system_error produced by: %s: %s", ex.p_failed_exp.get(), std::strerror( ex.p_errno ) ); }
+    catch( detail::system_signal_exception const& ex )
+      { ex.report(); }
+
+    // not an error
+    catch( execution_aborted const& )
+      { return 0; }
+
+    // just forward
+    catch( execution_exception const& )
+      { throw; }
+
+    // unknown error
+    catch( ... )
+      { detail::report_error( execution_exception::cpp_exception_error, "unknown type" ); }
+
+    return 0;  // never reached; supplied to quiet compiler warnings
+} // execute
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                  system_error                ************** //
+// ************************************************************************** //
+
+system_error::system_error( char const* exp )
+#ifdef UNDER_CE
+: p_errno( GetLastError() )
+#else
+: p_errno( errno )
+#endif
+, p_failed_exp( exp )
+{}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************              execution_exception             ************** //
+// ************************************************************************** //
+
+execution_exception::execution_exception( error_code ec_, const_string what_msg_, location const& location_ )
+: m_error_code( ec_ )
+, m_what( what_msg_.empty() ? BOOST_TEST_L( "uncaught exception, system error or abort requested" ) : what_msg_ )
+, m_location( location_ )
+{}
+
+//____________________________________________________________________________//
+
+execution_exception::location::location( char const* file_name, size_t line_num, char const* func )
+: m_file_name( file_name ? file_name : "unknown location" )
+, m_line_num( line_num )
+, m_function( func )
+{}
+
+//____________________________________________________________________________//
+
+} // namespace ndnboost
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
+
diff --git a/ndnboost/test/impl/framework.ipp b/ndnboost/test/impl/framework.ipp
new file mode 100644
index 0000000..cdbce24
--- /dev/null
+++ b/ndnboost/test/impl/framework.ipp
@@ -0,0 +1,503 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57991 $
+//
+//  Description : implements framework API - main driver for the test
+// ***************************************************************************
+
+#ifndef BOOST_TEST_FRAMEWORK_IPP_021005GER
+#define BOOST_TEST_FRAMEWORK_IPP_021005GER
+
+// Boost.Test
+#include <ndnboost/test/framework.hpp>
+#include <ndnboost/test/execution_monitor.hpp>
+#include <ndnboost/test/debug.hpp>
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+#include <ndnboost/test/unit_test_log.hpp>
+#include <ndnboost/test/unit_test_monitor.hpp>
+#include <ndnboost/test/test_observer.hpp>
+#include <ndnboost/test/results_collector.hpp>
+#include <ndnboost/test/progress_monitor.hpp>
+#include <ndnboost/test/results_reporter.hpp>
+#include <ndnboost/test/test_tools.hpp>
+
+#include <ndnboost/test/detail/unit_test_parameters.hpp>
+#include <ndnboost/test/detail/global_typedef.hpp>
+
+#include <ndnboost/test/utils/foreach.hpp>
+
+// Boost
+#include <ndnboost/timer.hpp>
+
+// STL
+#include <map>
+#include <set>
+#include <cstdlib>
+#include <ctime>
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::time; using ::srand; }
+#endif
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************            test_start calls wrapper          ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+struct test_start_caller {
+    test_start_caller( test_observer* to, counter_t tc_amount )
+    : m_to( to )
+    , m_tc_amount( tc_amount )
+    {}
+
+    int operator()()
+    {
+        m_to->test_start( m_tc_amount );
+        return 0;
+    }
+
+private:
+    // Data members
+    test_observer*  m_to;
+    counter_t       m_tc_amount;
+};
+
+//____________________________________________________________________________//
+
+struct test_init_caller {
+    explicit    test_init_caller( init_unit_test_func init_func ) 
+    : m_init_func( init_func )
+    {}
+    int         operator()()
+    {
+#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
+        if( !(*m_init_func)() )
+            throw std::runtime_error( "test module initialization failed" );
+#else
+        test_suite*  manual_test_units = (*m_init_func)( framework::master_test_suite().argc, framework::master_test_suite().argv );
+
+        if( manual_test_units )
+            framework::master_test_suite().add( manual_test_units );
+#endif
+        return 0;
+    }
+
+    // Data members
+    init_unit_test_func m_init_func;
+};
+
+}
+
+// ************************************************************************** //
+// **************                   framework                  ************** //
+// ************************************************************************** //
+
+class framework_impl : public test_tree_visitor {
+public:
+    framework_impl()
+    : m_master_test_suite( 0 )
+    , m_curr_test_case( INV_TEST_UNIT_ID )
+    , m_next_test_case_id( MIN_TEST_CASE_ID )
+    , m_next_test_suite_id( MIN_TEST_SUITE_ID )
+    , m_is_initialized( false )
+    , m_test_in_progress( false )
+    {}
+
+    ~framework_impl() { clear(); }
+
+    void            clear()
+    {
+        while( !m_test_units.empty() ) {
+            test_unit_store::value_type const& tu     = *m_test_units.begin();
+            test_unit*                         tu_ptr = tu.second;
+
+            // the delete will erase this element from map
+            if( ut_detail::test_id_2_unit_type( tu.second->p_id ) == tut_suite )
+                delete  (test_suite const*)tu_ptr;
+            else
+                delete  (test_case const*)tu_ptr;
+        }
+    }
+
+    void            set_tu_id( test_unit& tu, test_unit_id id ) { tu.p_id.value = id; }
+
+    // test_tree_visitor interface implementation
+    void            visit( test_case const& tc )
+    {
+        if( !tc.check_dependencies() ) {
+            BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+                to->test_unit_skipped( tc );
+
+            return;
+        }
+
+        BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+            to->test_unit_start( tc );
+
+        ndnboost::timer tc_timer;
+        test_unit_id bkup = m_curr_test_case;
+        m_curr_test_case = tc.p_id;
+        unit_test_monitor_t::error_level run_result = unit_test_monitor.execute_and_translate( tc );
+
+        unsigned long elapsed = static_cast<unsigned long>( tc_timer.elapsed() * 1e6 );
+
+        if( unit_test_monitor.is_critical_error( run_result ) ) {
+            BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+                to->test_aborted();
+        }
+
+        BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+            to->test_unit_finish( tc, elapsed );
+
+        m_curr_test_case = bkup;
+
+        if( unit_test_monitor.is_critical_error( run_result ) )
+            throw test_being_aborted();
+    }
+
+    bool            test_suite_start( test_suite const& ts )
+    {
+        if( !ts.check_dependencies() ) {
+            BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+                to->test_unit_skipped( ts );
+
+            return false;
+        }
+
+        BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+            to->test_unit_start( ts );
+
+        return true;
+    }
+
+    void            test_suite_finish( test_suite const& ts )
+    {
+        BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+            to->test_unit_finish( ts, 0 );
+    }
+
+    //////////////////////////////////////////////////////////////////
+    struct priority_order {
+        bool operator()( test_observer* lhs, test_observer* rhs ) const
+        {
+            return (lhs->priority() < rhs->priority()) || ((lhs->priority() == rhs->priority()) && (lhs < rhs));
+        }
+    };
+
+    typedef std::map<test_unit_id,test_unit*>       test_unit_store;
+    typedef std::set<test_observer*,priority_order> observer_store;
+
+    master_test_suite_t* m_master_test_suite;
+    test_unit_id    m_curr_test_case;
+    test_unit_store m_test_units;
+
+    test_unit_id    m_next_test_case_id;
+    test_unit_id    m_next_test_suite_id;
+
+    bool            m_is_initialized;
+    bool            m_test_in_progress;
+
+    observer_store  m_observers;
+};
+
+//____________________________________________________________________________//
+
+namespace {
+
+#if defined(__CYGWIN__)
+framework_impl& s_frk_impl() { static framework_impl* the_inst = 0; if(!the_inst) the_inst = new framework_impl; return *the_inst; }
+#else
+framework_impl& s_frk_impl() { static framework_impl the_inst; return the_inst; }
+#endif
+
+} // local namespace
+
+//____________________________________________________________________________//
+
+namespace framework {
+
+void
+init( init_unit_test_func init_func, int argc, char* argv[] )
+{
+    runtime_config::init( argc, argv );
+
+    // set the log level and format
+    unit_test_log.set_threshold_level( runtime_config::log_level() );
+    unit_test_log.set_format( runtime_config::log_format() );
+
+    // set the report level and format
+    results_reporter::set_level( runtime_config::report_level() );
+    results_reporter::set_format( runtime_config::report_format() );
+
+    register_observer( results_collector );
+    register_observer( unit_test_log );
+
+    if( runtime_config::show_progress() )
+        register_observer( progress_monitor );
+
+    if( runtime_config::detect_memory_leaks() > 0 ) {
+        debug::detect_memory_leaks( true );
+        debug::break_memory_alloc( runtime_config::detect_memory_leaks() );
+    }
+
+    // init master unit test suite
+    master_test_suite().argc = argc;
+    master_test_suite().argv = argv;
+
+    try {
+        ndnboost::execution_monitor em;
+
+        ut_detail::test_init_caller tic( init_func );
+
+        em.execute( tic );
+    }
+    catch( execution_exception const& ex )  {
+        throw setup_error( ex.what() );
+    }
+
+    s_frk_impl().m_is_initialized = true;
+}
+
+//____________________________________________________________________________//
+
+bool
+is_initialized()
+{
+    return  s_frk_impl().m_is_initialized;
+}
+
+//____________________________________________________________________________//
+
+void
+register_test_unit( test_case* tc )
+{
+    BOOST_TEST_SETUP_ASSERT( tc->p_id == INV_TEST_UNIT_ID, BOOST_TEST_L( "test case already registered" ) );
+
+    test_unit_id new_id = s_frk_impl().m_next_test_case_id;
+
+    BOOST_TEST_SETUP_ASSERT( new_id != MAX_TEST_CASE_ID, BOOST_TEST_L( "too many test cases" ) );
+
+    typedef framework_impl::test_unit_store::value_type map_value_type;
+
+    s_frk_impl().m_test_units.insert( map_value_type( new_id, tc ) );
+    s_frk_impl().m_next_test_case_id++;
+
+    s_frk_impl().set_tu_id( *tc, new_id );
+}
+
+//____________________________________________________________________________//
+
+void
+register_test_unit( test_suite* ts )
+{
+    BOOST_TEST_SETUP_ASSERT( ts->p_id == INV_TEST_UNIT_ID, BOOST_TEST_L( "test suite already registered" ) );
+
+    test_unit_id new_id = s_frk_impl().m_next_test_suite_id;
+
+    BOOST_TEST_SETUP_ASSERT( new_id != MAX_TEST_SUITE_ID, BOOST_TEST_L( "too many test suites" ) );
+
+    typedef framework_impl::test_unit_store::value_type map_value_type;
+    s_frk_impl().m_test_units.insert( map_value_type( new_id, ts ) );
+    s_frk_impl().m_next_test_suite_id++;
+
+    s_frk_impl().set_tu_id( *ts, new_id );
+}
+
+//____________________________________________________________________________//
+
+void
+deregister_test_unit( test_unit* tu )
+{
+    s_frk_impl().m_test_units.erase( tu->p_id );
+}
+
+//____________________________________________________________________________//
+
+void
+clear()
+{
+    s_frk_impl().clear();
+}
+
+//____________________________________________________________________________//
+
+void
+register_observer( test_observer& to )
+{
+    s_frk_impl().m_observers.insert( &to );
+}
+
+//____________________________________________________________________________//
+
+void
+deregister_observer( test_observer& to )
+{
+    s_frk_impl().m_observers.erase( &to );
+}
+
+//____________________________________________________________________________//
+
+void
+reset_observers()
+{
+    s_frk_impl().m_observers.clear();
+}
+
+//____________________________________________________________________________//
+
+master_test_suite_t&
+master_test_suite()
+{
+    if( !s_frk_impl().m_master_test_suite )
+        s_frk_impl().m_master_test_suite = new master_test_suite_t;
+
+    return *s_frk_impl().m_master_test_suite;
+}
+
+//____________________________________________________________________________//
+
+test_case const&
+current_test_case()
+{
+    return get<test_case>( s_frk_impl().m_curr_test_case );
+}
+
+//____________________________________________________________________________//
+
+test_unit&
+get( test_unit_id id, test_unit_type t )
+{
+    test_unit* res = s_frk_impl().m_test_units[id];
+
+    if( (res->p_type & t) == 0 )
+        throw internal_error( "Invalid test unit type" );
+
+    return *res;
+}
+
+//____________________________________________________________________________//
+
+void
+run( test_unit_id id, bool continue_test )
+{
+    if( id == INV_TEST_UNIT_ID )
+        id = master_test_suite().p_id;
+
+    test_case_counter tcc;
+    traverse_test_tree( id, tcc );
+
+    BOOST_TEST_SETUP_ASSERT( tcc.p_count != 0 , runtime_config::test_to_run().is_empty() 
+        ? BOOST_TEST_L( "test tree is empty" ) 
+        : BOOST_TEST_L( "no test cases matching filter" ) );
+
+    bool    call_start_finish   = !continue_test || !s_frk_impl().m_test_in_progress;
+    bool    was_in_progress     = s_frk_impl().m_test_in_progress;
+
+    s_frk_impl().m_test_in_progress = true;
+
+    if( call_start_finish ) {
+        BOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers ) {
+            ndnboost::execution_monitor em;
+
+            try {
+                em.execute( ut_detail::test_start_caller( to, tcc.p_count ) );
+            }
+            catch( execution_exception const& ex )  {
+                throw setup_error( ex.what() );
+            }
+        }
+    }
+
+    switch( runtime_config::random_seed() ) {
+    case 0:
+        break;
+    case 1: {
+        unsigned int seed = static_cast<unsigned int>( std::time( 0 ) );
+        BOOST_TEST_MESSAGE( "Test cases order is shuffled using seed: " << seed );
+        std::srand( seed );
+        break;
+    }
+    default:
+        BOOST_TEST_MESSAGE( "Test cases order is shuffled using seed: " << runtime_config::random_seed() );
+        std::srand( runtime_config::random_seed() );
+    }
+
+    try {
+        traverse_test_tree( id, s_frk_impl() );
+    }
+    catch( test_being_aborted const& ) {
+        // abort already reported
+    }
+
+    if( call_start_finish ) {
+        BOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers )
+            to->test_finish();
+    }
+
+    s_frk_impl().m_test_in_progress = was_in_progress;
+}
+
+//____________________________________________________________________________//
+
+void
+run( test_unit const* tu, bool continue_test )
+{
+    run( tu->p_id, continue_test );
+}
+
+//____________________________________________________________________________//
+
+void
+assertion_result( bool passed )
+{
+    BOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers )
+        to->assertion_result( passed );
+}
+
+//____________________________________________________________________________//
+
+void
+exception_caught( execution_exception const& ex )
+{
+    BOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers )
+        to->exception_caught( ex );
+}
+
+//____________________________________________________________________________//
+
+void
+test_unit_aborted( test_unit const& tu )
+{
+    BOOST_TEST_FOREACH( test_observer*, to, s_frk_impl().m_observers )
+        to->test_unit_aborted( tu );
+}
+
+//____________________________________________________________________________//
+
+} // namespace framework
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_FRAMEWORK_IPP_021005GER
diff --git a/ndnboost/test/impl/interaction_based.ipp b/ndnboost/test/impl/interaction_based.ipp
new file mode 100644
index 0000000..03ee9be
--- /dev/null
+++ b/ndnboost/test/impl/interaction_based.ipp
@@ -0,0 +1,90 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : Facilities to perform interaction-based testing
+// ***************************************************************************
+
+#ifndef BOOST_TEST_INTERACTION_BASED_IPP_112105GER
+#define BOOST_TEST_INTERACTION_BASED_IPP_112105GER
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+
+#if BOOST_TEST_SUPPORT_INTERACTION_TESTING
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+#include <ndnboost/test/utils/callback.hpp>
+#include <ndnboost/test/interaction_based.hpp>
+#include <ndnboost/test/mock_object.hpp>
+#include <ndnboost/test/framework.hpp>     // for setup_error
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+// STL
+#include <stdexcept>
+#include <string>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace itest { // interaction-based testing
+
+// ************************************************************************** //
+// **************                    manager                   ************** //
+// ************************************************************************** //
+
+manager::manager()
+{
+    instance_ptr( true, this );
+}
+
+//____________________________________________________________________________//
+
+manager::~manager()
+{
+    instance_ptr( true );
+}
+
+//____________________________________________________________________________//
+    
+manager*
+manager::instance_ptr( bool reset, manager* new_ptr )
+{
+    static manager dummy( 0 );
+    
+    static manager* ptr = &dummy;
+    
+    if( reset ) {
+        if( new_ptr ) {
+            BOOST_TEST_SETUP_ASSERT( ptr == &dummy, BOOST_TEST_L( "Can't run two interation based test the same time" ) );
+                
+            ptr = new_ptr;
+        }
+        else
+            ptr = &dummy;
+    }
+    
+    return ptr;
+}
+    
+}  // namespace itest
+
+}  // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // not ancient compiler
+
+#endif // BOOST_TEST_INTERACTION_BASED_IPP_112105GER
diff --git a/ndnboost/test/impl/logged_expectations.ipp b/ndnboost/test/impl/logged_expectations.ipp
new file mode 100644
index 0000000..4db7b81
--- /dev/null
+++ b/ndnboost/test/impl/logged_expectations.ipp
@@ -0,0 +1,246 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the
+//  Boost Software License, ELOG_VER 1.0. (See accompanying file
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : Facilities to perform interaction based testng of logged expectations
+// ***************************************************************************
+
+#ifndef BOOST_TEST_LOGGED_EXPECTATIONS_IPP_120905GER
+#define BOOST_TEST_LOGGED_EXPECTATIONS_IPP_120905GER
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+
+#if BOOST_TEST_SUPPORT_INTERACTION_TESTING
+
+#include <ndnboost/test/detail/global_typedef.hpp>
+
+#include <ndnboost/test/utils/callback.hpp>
+#include <ndnboost/test/utils/iterator/token_iterator.hpp>
+
+#include <ndnboost/test/interaction_based.hpp>
+#include <ndnboost/test/test_tools.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+// Boost
+#include <ndnboost/lexical_cast.hpp>
+
+// STL
+#include <fstream>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+using namespace ::ndnboost::unit_test;
+
+namespace itest {
+
+// ************************************************************************** //
+// **************    logged expectation test implementation    ************** //
+// ************************************************************************** //
+
+struct expectations_logger : itest::manager {
+    // Constructor
+    expectations_logger( const_string log_file_name, bool test_or_log );
+
+    virtual bool        decision_point( const_string, std::size_t );
+    virtual unsigned    enter_scope( const_string, std::size_t, const_string scope_name );
+    virtual void        allocated( const_string, std::size_t, void*, std::size_t s );
+    virtual void        data_flow( const_string d );
+    virtual std::string return_value( const_string default_value );
+    
+private:
+    // Data members
+    bool            m_test_or_log;
+    std::fstream    m_log_file;
+};
+
+literal_string ELOG_VER     = "1.0";
+literal_string CLMN_SEP     = "|";
+static const char LINE_SEP  = '\n';
+
+literal_string FILE_SIG     = "ELOG";
+literal_string SCOPE_SIG    = "SCOPE";
+literal_string ALLOC_SIG    = "ALLOC";
+literal_string DP_SIG       = "SWITCH";
+literal_string DATA_SIG     = "DATA";
+literal_string RETURN_SIG   = "RETURN";
+
+//____________________________________________________________________________//
+
+expectations_logger::expectations_logger( const_string log_file_name, bool test_or_log )
+: m_test_or_log( test_or_log )
+{
+    BOOST_REQUIRE_MESSAGE( !log_file_name.is_empty(), "Empty expectations log file name" );
+
+    m_log_file.open( log_file_name.begin(), test_or_log ? std::ios::in : std::ios::out );
+
+    BOOST_REQUIRE_MESSAGE( m_log_file.is_open(),
+                           "Can't open expectations log file " << log_file_name
+                                << " for " << ( m_test_or_log ? "reading" : "writing") );
+
+    if( m_test_or_log ) {
+        std::string line;
+        
+        std::getline( m_log_file, line, LINE_SEP );
+        
+        const_string cline( line );
+        string_token_iterator tit( cline, (dropped_delimeters = CLMN_SEP, kept_delimeters = dt_none));
+
+        BOOST_CHECK_EQUAL( *tit, FILE_SIG ); 
+        ++tit;
+        BOOST_CHECK_EQUAL( *tit, ELOG_VER );
+    }
+    else {
+        m_log_file << FILE_SIG << CLMN_SEP << ELOG_VER << LINE_SEP;
+    }
+}
+
+//____________________________________________________________________________//
+
+bool
+expectations_logger::decision_point( const_string, std::size_t )
+{
+    if( m_test_or_log ) {
+        std::string line;
+        
+        std::getline( m_log_file, line, LINE_SEP );
+        
+        const_string cline( line );
+        string_token_iterator tit( cline, (dropped_delimeters = CLMN_SEP, kept_delimeters = dt_none));
+        
+        BOOST_CHECK_EQUAL( *tit, DP_SIG ); ++tit;
+        return lexical_cast<bool>( *tit );
+    }
+    else {
+        m_log_file << DP_SIG << CLMN_SEP << std::boolalpha << true << LINE_SEP;
+        
+        return true;
+    }
+}
+
+//____________________________________________________________________________//
+    
+unsigned
+expectations_logger::enter_scope( const_string, std::size_t, const_string scope_name )
+{
+    if( m_test_or_log ) {
+        std::string line;
+        
+        std::getline( m_log_file, line, LINE_SEP );
+        
+        const_string cline( line );
+        string_token_iterator tit( cline, (dropped_delimeters = CLMN_SEP, kept_delimeters = dt_none));
+        
+        BOOST_CHECK_EQUAL( *tit, SCOPE_SIG ); ++tit;
+        BOOST_CHECK_EQUAL( *tit, scope_name );
+    }
+    else {
+        m_log_file << SCOPE_SIG << CLMN_SEP << scope_name << LINE_SEP;
+    }
+    
+    return 0;
+}
+    
+//____________________________________________________________________________//
+
+void
+expectations_logger::allocated( const_string, std::size_t, void*, std::size_t s )
+{
+    if( m_test_or_log ) {
+        std::string line;
+        
+        std::getline( m_log_file, line, LINE_SEP );
+        
+        const_string cline( line );
+        string_token_iterator tit( cline, (dropped_delimeters = CLMN_SEP, kept_delimeters = dt_none));
+        
+        BOOST_CHECK_EQUAL( *tit, ALLOC_SIG ); ++tit;
+        BOOST_CHECK_EQUAL( lexical_cast<std::size_t>( *tit ), s );
+    }
+    else {
+        m_log_file << ALLOC_SIG << CLMN_SEP << s << LINE_SEP;
+    }
+}
+
+//____________________________________________________________________________//
+
+void
+expectations_logger::data_flow( const_string d )
+{
+    if( m_test_or_log ) {
+        std::string line;
+        
+        std::getline( m_log_file, line, LINE_SEP );
+        
+        const_string cline( line );
+        string_token_iterator tit( cline, (dropped_delimeters = CLMN_SEP, kept_delimeters = dt_none));
+        
+        BOOST_CHECK_EQUAL( *tit, DATA_SIG ); ++tit;
+        BOOST_CHECK_EQUAL( *tit, d );
+    }
+    else {
+        m_log_file << DATA_SIG << CLMN_SEP << d << LINE_SEP;
+    }
+}
+
+//____________________________________________________________________________//
+
+std::string
+expectations_logger::return_value( const_string default_value )
+{
+    if( m_test_or_log ) {
+        std::string line;
+        
+        std::getline( m_log_file, line, LINE_SEP );
+        
+        const_string cline( line );
+        string_token_iterator tit( cline, (dropped_delimeters = CLMN_SEP, kept_delimeters = dt_none));
+        
+        BOOST_CHECK_EQUAL( *tit, RETURN_SIG ); ++tit;
+        
+        return std::string( tit->begin(), tit->size() );
+    }
+    else {
+        m_log_file << RETURN_SIG << CLMN_SEP << default_value << LINE_SEP;
+                                 
+        return std::string();
+    }
+}
+
+//____________________________________________________________________________//
+    
+// ************************************************************************** //
+// **************           logged expectations test           ************** //
+// ************************************************************************** //
+
+void BOOST_TEST_DECL
+logged_expectations( callback0<> const& F, const_string log_file_name, bool test_or_log )
+{
+    expectations_logger el( log_file_name, test_or_log );
+
+    F();
+}
+
+//____________________________________________________________________________//
+
+}  // namespace itest
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // not ancient compiler
+
+#endif // BOOST_TEST_LOGGED_EXPECTATIONS_IPP_120905GER
diff --git a/ndnboost/test/impl/plain_report_formatter.ipp b/ndnboost/test/impl/plain_report_formatter.ipp
new file mode 100644
index 0000000..1f0aaac
--- /dev/null
+++ b/ndnboost/test/impl/plain_report_formatter.ipp
@@ -0,0 +1,198 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : plain report formatter definition
+// ***************************************************************************
+
+#ifndef BOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
+#define BOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
+
+// Boost.Test
+#include <ndnboost/test/output/plain_report_formatter.hpp>
+#include <ndnboost/test/utils/custom_manip.hpp>
+#include <ndnboost/test/results_collector.hpp>
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+
+// STL
+#include <iomanip>
+#include <ndnboost/config/no_tr1/cmath.hpp>
+#include <iostream>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::log10; }
+# endif
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace output {
+
+namespace {
+
+typedef custom_manip<struct quote_t> quote;
+
+template<typename T>
+inline std::ostream&
+operator<<( custom_printer<quote> const& p, T const& value )
+{
+    *p << '"' << value << '"';
+
+    return *p;
+}
+
+//____________________________________________________________________________//
+
+void
+print_stat_value( std::ostream& ostr, counter_t v, counter_t indent, counter_t total,
+                  const_string name, const_string res )
+{
+    if( v > 0 ) {
+        ostr << std::setw( indent ) << ""
+             << v << ' ' << name << ( v != 1 ? "s" : "" );
+        if( total > 0 )
+            ostr << " out of " << total;
+
+        ostr << ' ' << res << '\n';
+    }
+}
+
+//____________________________________________________________________________//
+
+} // local namespace
+
+// ************************************************************************** //
+// **************             plain_report_formatter           ************** //
+// ************************************************************************** //
+
+void
+plain_report_formatter::results_report_start( std::ostream& ostr )
+{
+    m_indent = 0;
+    ostr << '\n';
+}
+
+//____________________________________________________________________________//
+
+void
+plain_report_formatter::results_report_finish( std::ostream& ostr )
+{
+    ostr.flush();
+}
+
+//____________________________________________________________________________//
+
+void
+plain_report_formatter::test_unit_report_start( test_unit const& tu, std::ostream& ostr )
+{
+    test_results const& tr = results_collector.results( tu.p_id );
+
+    const_string descr;
+
+    if( tr.passed() )
+        descr = "passed";
+    else if( tr.p_skipped )
+        descr = "skipped";
+    else if( tr.p_aborted )
+        descr = "aborted";
+    else
+        descr = "failed";
+
+    ostr << std::setw( m_indent ) << ""
+         << "Test " << (tu.p_type == tut_case ? "case " : "suite " ) << quote() << tu.p_name << ' ' << descr;
+
+    if( tr.p_skipped ) {
+        ostr << " due to " << (tu.check_dependencies() ? "test aborting\n" : "failed dependancy\n" );
+        m_indent += 2;
+        return;
+    }
+    
+    counter_t total_assertions  = tr.p_assertions_passed + tr.p_assertions_failed;
+    counter_t total_tc          = tr.p_test_cases_passed + tr.p_test_cases_failed + tr.p_test_cases_skipped;
+
+    if( total_assertions > 0 || total_tc > 0 )
+        ostr << " with:";
+
+    ostr << '\n';
+    m_indent += 2;
+
+    print_stat_value( ostr, tr.p_assertions_passed, m_indent, total_assertions, "assertion", "passed" );
+    print_stat_value( ostr, tr.p_assertions_failed, m_indent, total_assertions, "assertion", "failed" );
+    print_stat_value( ostr, tr.p_expected_failures, m_indent, 0               , "failure"  , "expected" );
+    print_stat_value( ostr, tr.p_test_cases_passed, m_indent, total_tc        , "test case", "passed" );
+    print_stat_value( ostr, tr.p_test_cases_failed, m_indent, total_tc        , "test case", "failed" );
+    print_stat_value( ostr, tr.p_test_cases_skipped, m_indent, total_tc       , "test case", "skipped" );
+    print_stat_value( ostr, tr.p_test_cases_aborted, m_indent, total_tc       , "test case", "aborted" );
+    
+    ostr << '\n';
+}
+
+//____________________________________________________________________________//
+
+void
+plain_report_formatter::test_unit_report_finish( test_unit const&, std::ostream& )
+{
+    m_indent -= 2;
+}
+
+//____________________________________________________________________________//
+
+void
+plain_report_formatter::do_confirmation_report( test_unit const& tu, std::ostream& ostr )
+{
+    test_results const& tr = results_collector.results( tu.p_id );
+    
+    if( tr.passed() ) {
+        ostr << "*** No errors detected\n";
+        return;
+    }
+        
+    if( tr.p_skipped ) {
+        ostr << "*** Test " << tu.p_type_name << " skipped due to " 
+             << (tu.check_dependencies() ? "test aborting\n" : "failed dependancy\n" );
+        return;
+    }
+
+    if( tr.p_assertions_failed == 0 ) {
+        ostr << "*** errors detected in test " << tu.p_type_name << " " << quote() << tu.p_name
+             << "; see standard output for details\n";
+        return;
+    }
+
+    counter_t num_failures = tr.p_assertions_failed;
+    
+    ostr << "*** " << num_failures << " failure" << ( num_failures != 1 ? "s" : "" ) << " detected";
+    
+    if( tr.p_expected_failures > 0 )
+        ostr << " (" << tr.p_expected_failures << " failure" << ( tr.p_expected_failures != 1 ? "s" : "" ) << " expected)";
+    
+    ostr << " in test " << tu.p_type_name << " " << quote() << tu.p_name << "\n";
+}
+
+//____________________________________________________________________________//
+
+} // namespace output
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_PLAIN_REPORT_FORMATTER_IPP_020105GER
diff --git a/ndnboost/test/impl/progress_monitor.ipp b/ndnboost/test/impl/progress_monitor.ipp
new file mode 100644
index 0000000..ac93432
--- /dev/null
+++ b/ndnboost/test/impl/progress_monitor.ipp
@@ -0,0 +1,110 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : implements simple text based progress monitor
+// ***************************************************************************
+
+#ifndef BOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
+#define BOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
+
+// Boost.Test
+#include <ndnboost/test/progress_monitor.hpp>
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+
+#include <ndnboost/test/detail/unit_test_parameters.hpp>
+
+// Boost
+#include <ndnboost/progress.hpp>
+#include <ndnboost/scoped_ptr.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                progress_monitor              ************** //
+// ************************************************************************** //
+
+namespace {
+
+struct progress_monitor_impl {
+    // Constructor
+    progress_monitor_impl()
+        : m_stream( runtime_config::log_sink() )
+    {}
+
+    std::ostream*                m_stream;
+    scoped_ptr<progress_display> m_progress_display;
+};
+
+progress_monitor_impl& s_pm_impl() { static progress_monitor_impl the_inst; return the_inst; }
+
+} // local namespace
+
+//____________________________________________________________________________//
+
+void
+progress_monitor_t::test_start( counter_t test_cases_amount )
+{
+    s_pm_impl().m_progress_display.reset( new progress_display( test_cases_amount, *s_pm_impl().m_stream ) );
+}
+
+//____________________________________________________________________________//
+
+void
+progress_monitor_t::test_aborted()
+{
+    (*s_pm_impl().m_progress_display) += s_pm_impl().m_progress_display->count();
+}
+
+//____________________________________________________________________________//
+
+void
+progress_monitor_t::test_unit_finish( test_unit const& tu, unsigned long )
+{
+    if( tu.p_type == tut_case )
+        ++(*s_pm_impl().m_progress_display);
+}
+
+//____________________________________________________________________________//
+
+void
+progress_monitor_t::test_unit_skipped( test_unit const& tu )
+{
+    test_case_counter tcc;
+    traverse_test_tree( tu, tcc );
+    
+    (*s_pm_impl().m_progress_display) += tcc.p_count;
+}
+
+//____________________________________________________________________________//
+
+void
+progress_monitor_t::set_stream( std::ostream& ostr )
+{
+    s_pm_impl().m_stream = &ostr;
+}
+
+//____________________________________________________________________________//
+    
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
diff --git a/ndnboost/test/impl/results_collector.ipp b/ndnboost/test/impl/results_collector.ipp
new file mode 100644
index 0000000..7b676cf
--- /dev/null
+++ b/ndnboost/test/impl/results_collector.ipp
@@ -0,0 +1,294 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : implements Unit Test results collecting facility.
+// ***************************************************************************
+
+#ifndef BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
+#define BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
+
+// Boost.Test
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+#include <ndnboost/test/unit_test_log.hpp>
+#include <ndnboost/test/results_collector.hpp>
+#include <ndnboost/test/framework.hpp>
+
+// Boost
+#include <ndnboost/cstdlib.hpp>
+
+// STL
+#include <map>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                 test_results                 ************** //
+// ************************************************************************** //
+
+test_results::test_results()
+{
+    clear();
+}
+
+//____________________________________________________________________________//
+
+bool
+test_results::passed() const
+{
+    return  !p_skipped                                  &&
+            p_test_cases_failed == 0                    &&
+            p_assertions_failed <= p_expected_failures  &&
+            !p_aborted;
+}
+
+//____________________________________________________________________________//
+
+int
+test_results::result_code() const
+{
+    return passed() ? exit_success
+           : ( (p_assertions_failed > p_expected_failures || p_skipped )
+                    ? exit_test_failure
+                    : exit_exception_failure );
+}
+
+//____________________________________________________________________________//
+
+void
+test_results::operator+=( test_results const& tr )
+{
+    p_assertions_passed.value   += tr.p_assertions_passed;
+    p_assertions_failed.value   += tr.p_assertions_failed;
+    p_test_cases_passed.value   += tr.p_test_cases_passed;
+    p_test_cases_failed.value   += tr.p_test_cases_failed;
+    p_test_cases_skipped.value  += tr.p_test_cases_skipped;
+    p_test_cases_aborted.value  += tr.p_test_cases_aborted;
+}
+
+//____________________________________________________________________________//
+
+void
+test_results::clear()
+{
+    p_assertions_passed.value    = 0;
+    p_assertions_failed.value    = 0;
+    p_expected_failures.value    = 0;
+    p_test_cases_passed.value    = 0;
+    p_test_cases_failed.value    = 0;
+    p_test_cases_skipped.value   = 0;
+    p_test_cases_aborted.value   = 0;
+    p_aborted.value              = false;
+    p_skipped.value              = true;
+}
+
+//____________________________________________________________________________//
+    
+// ************************************************************************** //
+// **************               results_collector              ************** //
+// ************************************************************************** //
+
+#if !BOOST_WORKAROUND(BOOST_MSVC, <1300)
+
+namespace {
+
+struct results_collector_impl {
+    std::map<test_unit_id,test_results> m_results_store;
+};
+
+results_collector_impl& s_rc_impl() { static results_collector_impl the_inst; return the_inst; }
+
+} // local namespace
+
+#else
+
+struct results_collector_impl {
+    std::map<test_unit_id,test_results> m_results_store;
+};
+
+static results_collector_impl& s_rc_impl() { static results_collector_impl the_inst; return the_inst; }
+
+#endif
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::test_start( counter_t )
+{
+    s_rc_impl().m_results_store.clear();
+}
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::test_finish()
+{
+    // do nothing
+}
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::test_aborted()
+{
+    // do nothing
+}
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::test_unit_start( test_unit const& tu )
+{
+    // init test_results entry
+    test_results& tr = s_rc_impl().m_results_store[tu.p_id];
+
+    tr.clear();
+    
+    tr.p_expected_failures.value    = tu.p_expected_failures;
+    tr.p_skipped.value              = false;
+}
+
+//____________________________________________________________________________//
+
+class results_collect_helper : public test_tree_visitor {
+public:
+    explicit results_collect_helper( test_results& tr, test_unit const& ts ) : m_tr( tr ), m_ts( ts ) {}
+
+    void    visit( test_case const& tc )
+    {
+        test_results const& tr = results_collector.results( tc.p_id );
+        m_tr += tr;
+
+        if( tr.passed() )
+            m_tr.p_test_cases_passed.value++;
+        else if( tr.p_skipped )
+            m_tr.p_test_cases_skipped.value++;
+        else {
+            if( tr.p_aborted )
+                m_tr.p_test_cases_aborted.value++;
+            m_tr.p_test_cases_failed.value++;
+        }
+    }
+    bool    test_suite_start( test_suite const& ts )
+    {
+        if( m_ts.p_id == ts.p_id )
+            return true;
+        else {
+            m_tr += results_collector.results( ts.p_id );
+            return false;
+        }
+    }
+
+private:
+    // Data members
+    test_results&       m_tr;
+    test_unit const&    m_ts;
+};
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::test_unit_finish( test_unit const& tu, unsigned long )
+{
+    if( tu.p_type == tut_suite ) {
+        results_collect_helper ch( s_rc_impl().m_results_store[tu.p_id], tu );
+
+        traverse_test_tree( tu, ch );
+    }
+    else {
+        test_results const& tr = s_rc_impl().m_results_store[tu.p_id];
+        
+        bool num_failures_match = tr.p_aborted || tr.p_assertions_failed >= tr.p_expected_failures;
+        if( !num_failures_match )
+            BOOST_TEST_MESSAGE( "Test case " << tu.p_name << " has fewer failures than expected" );
+
+        bool check_any_assertions = tr.p_aborted || (tr.p_assertions_failed != 0) || (tr.p_assertions_passed != 0);
+        if( !check_any_assertions )
+            BOOST_TEST_MESSAGE( "Test case " << tu.p_name << " did not check any assertions" );
+    }
+}
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::test_unit_skipped( test_unit const& tu )
+{
+    if( tu.p_type == tut_suite ) {
+        test_case_counter tcc;
+        traverse_test_tree( tu, tcc );
+
+        test_results& tr = s_rc_impl().m_results_store[tu.p_id];
+
+        tr.clear();
+    
+        tr.p_skipped.value              = true;
+        tr.p_test_cases_skipped.value   = tcc.p_count;
+    }
+}
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::assertion_result( bool passed )
+{
+    test_results& tr = s_rc_impl().m_results_store[framework::current_test_case().p_id];
+
+    if( passed )
+        tr.p_assertions_passed.value++;
+    else
+        tr.p_assertions_failed.value++;
+
+    if( tr.p_assertions_failed == 1 )
+        first_failed_assertion();
+}
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::exception_caught( execution_exception const& )
+{
+    test_results& tr = s_rc_impl().m_results_store[framework::current_test_case().p_id];
+
+    tr.p_assertions_failed.value++;
+}
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::test_unit_aborted( test_unit const& tu )
+{
+    s_rc_impl().m_results_store[tu.p_id].p_aborted.value = true;
+}
+
+//____________________________________________________________________________//
+
+test_results const&
+results_collector_t::results( test_unit_id id ) const
+{
+    return s_rc_impl().m_results_store[id];
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
diff --git a/ndnboost/test/impl/results_reporter.ipp b/ndnboost/test/impl/results_reporter.ipp
new file mode 100644
index 0000000..1009a3d
--- /dev/null
+++ b/ndnboost/test/impl/results_reporter.ipp
@@ -0,0 +1,202 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : result reporting facilties
+// ***************************************************************************
+
+#ifndef BOOST_TEST_RESULTS_REPORTER_IPP_020105GER
+#define BOOST_TEST_RESULTS_REPORTER_IPP_020105GER
+
+// Boost.Test
+#include <ndnboost/test/results_reporter.hpp>
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+#include <ndnboost/test/results_collector.hpp>
+#include <ndnboost/test/framework.hpp>
+#include <ndnboost/test/output/plain_report_formatter.hpp>
+#include <ndnboost/test/output/xml_report_formatter.hpp>
+
+#include <ndnboost/test/detail/unit_test_parameters.hpp>
+
+// Boost
+#include <ndnboost/scoped_ptr.hpp>
+#include <ndnboost/io/ios_state.hpp>
+typedef ::ndnboost::io::ios_base_all_saver io_saver_type;
+
+// STL
+#include <iostream>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace results_reporter {
+
+// ************************************************************************** //
+// **************        result reporter implementation        ************** //
+// ************************************************************************** //
+
+namespace {
+
+struct results_reporter_impl : test_tree_visitor {
+    // Constructor
+    results_reporter_impl()
+    : m_output( runtime_config::report_sink() )
+    , m_stream_state_saver( new io_saver_type( *m_output ) )
+    , m_report_level( CONFIRMATION_REPORT )
+    , m_formatter( new output::plain_report_formatter )
+    {}
+
+    // test tree visitor interface implementation
+    void    visit( test_case const& tc )
+    {
+        m_formatter->test_unit_report_start( tc, *m_output );
+        m_formatter->test_unit_report_finish( tc, *m_output );
+    }
+    bool    test_suite_start( test_suite const& ts )
+    {
+        m_formatter->test_unit_report_start( ts, *m_output );
+
+        if( m_report_level == DETAILED_REPORT && !results_collector.results( ts.p_id ).p_skipped )
+            return true;
+
+        m_formatter->test_unit_report_finish( ts, *m_output );
+        return false;
+    }
+    void    test_suite_finish( test_suite const& ts )
+    {
+        m_formatter->test_unit_report_finish( ts, *m_output );
+    }
+
+    typedef scoped_ptr<io_saver_type> saver_ptr;
+
+    // Data members
+    std::ostream*       m_output;
+    saver_ptr           m_stream_state_saver;
+    report_level        m_report_level;
+    scoped_ptr<format>  m_formatter;
+};
+
+results_reporter_impl& s_rr_impl() { static results_reporter_impl the_inst; return the_inst; }
+
+} // local namespace
+
+// ************************************************************************** //
+// **************              report configuration            ************** //
+// ************************************************************************** //
+
+void
+set_level( report_level l )
+{
+    if( l != INV_REPORT_LEVEL )
+        s_rr_impl().m_report_level = l;
+}
+
+//____________________________________________________________________________//
+
+void
+set_stream( std::ostream& ostr )
+{
+    s_rr_impl().m_output = &ostr;
+    s_rr_impl().m_stream_state_saver.reset( new io_saver_type( ostr ) );
+}
+
+//____________________________________________________________________________//
+
+std::ostream&
+get_stream()
+{
+    return *s_rr_impl().m_output;
+}
+
+//____________________________________________________________________________//
+
+void
+set_format( output_format rf )
+{
+    switch( rf ) {
+    case CLF:
+        set_format( new output::plain_report_formatter );
+        break;
+    case XML:
+        set_format( new output::xml_report_formatter );
+        break;
+    default:
+        break;
+    }
+}
+
+//____________________________________________________________________________//
+
+void
+set_format( results_reporter::format* f )
+{
+    if( f )
+        s_rr_impl().m_formatter.reset( f );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************               report initiation              ************** //
+// ************************************************************************** //
+
+void
+make_report( report_level l, test_unit_id id )
+{
+    if( l == INV_REPORT_LEVEL )
+        l = s_rr_impl().m_report_level;
+
+    if( l == NO_REPORT )
+        return;
+
+    if( id == INV_TEST_UNIT_ID )
+        id = framework::master_test_suite().p_id;
+
+    s_rr_impl().m_stream_state_saver->restore();
+
+    report_level bkup = s_rr_impl().m_report_level;
+    s_rr_impl().m_report_level = l;
+
+    s_rr_impl().m_formatter->results_report_start( *s_rr_impl().m_output );
+
+    switch( l ) {
+    case CONFIRMATION_REPORT:
+        s_rr_impl().m_formatter->do_confirmation_report( framework::get<test_unit>( id ), *s_rr_impl().m_output );
+        break;
+    case SHORT_REPORT:
+    case DETAILED_REPORT:
+        traverse_test_tree( id, s_rr_impl() );
+        break;
+    default:
+        break;
+    }
+
+    s_rr_impl().m_formatter->results_report_finish( *s_rr_impl().m_output );
+    s_rr_impl().m_report_level = bkup;
+}
+
+//____________________________________________________________________________//
+
+} // namespace results_reporter
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_RESULTS_REPORTER_IPP_020105GER
diff --git a/ndnboost/test/impl/test_main.ipp b/ndnboost/test/impl/test_main.ipp
new file mode 100644
index 0000000..5991f1c
--- /dev/null
+++ b/ndnboost/test/impl/test_main.ipp
@@ -0,0 +1,68 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  (C) Copyright Beman Dawes 1995-2001.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $$Revision: 49312 $
+//
+//  Description : implements main function for Test Execution Monitor.
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TEST_MAIN_IPP_012205GER
+#define BOOST_TEST_TEST_MAIN_IPP_012205GER
+
+// Boost.Test
+#include <ndnboost/test/framework.hpp>
+#include <ndnboost/test/test_tools.hpp>
+#include <ndnboost/test/unit_test_suite.hpp>
+
+// Boost
+#include <ndnboost/cstdlib.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+extern int test_main( int argc, char* argv[] );    // prototype for user's test_main()
+
+struct test_main_caller {
+    test_main_caller( int argc, char** argv ) : m_argc( argc ), m_argv( argv ) {}
+    
+    void operator()() {
+        int test_main_result = test_main( m_argc, m_argv );
+
+        // translate a test_main non-success return into a test error
+        BOOST_CHECK( test_main_result == 0 || test_main_result == ndnboost::exit_success );
+    }
+  
+private:
+    // Data members    
+    int      m_argc;
+    char**   m_argv;
+};
+
+// ************************************************************************** //
+// **************                   test main                  ************** //
+// ************************************************************************** //
+
+::ndnboost::unit_test::test_suite*
+init_unit_test_suite( int argc, char* argv[] ) {
+    using namespace ::ndnboost::unit_test;
+    
+    framework::master_test_suite().p_name.value = "Test Program";
+    
+    framework::master_test_suite().add( BOOST_TEST_CASE( test_main_caller( argc, argv ) ) );
+    
+    return 0;
+}
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TEST_MAIN_IPP_012205GER
diff --git a/ndnboost/test/impl/test_tools.ipp b/ndnboost/test/impl/test_tools.ipp
new file mode 100644
index 0000000..b47ef81
--- /dev/null
+++ b/ndnboost/test/impl/test_tools.ipp
@@ -0,0 +1,628 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : supplies offline implementation for the Test Tools
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TEST_TOOLS_IPP_012205GER
+#define BOOST_TEST_TEST_TOOLS_IPP_012205GER
+
+// Boost.Test
+#include <ndnboost/test/test_tools.hpp>
+#include <ndnboost/test/unit_test_log.hpp>
+#include <ndnboost/test/output_test_stream.hpp>
+#include <ndnboost/test/framework.hpp>
+#include <ndnboost/test/execution_monitor.hpp> // execution_aborted
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+
+// Boost
+#include <ndnboost/config.hpp>
+
+// STL
+#include <fstream>
+#include <string>
+#include <cstring>
+#include <cctype>
+#include <cwchar>
+#include <stdexcept>
+#include <ios>
+
+// !! should we use #include <cstdarg>
+#include <stdarg.h>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::strcmp; using ::strlen; using ::isprint; }
+#if !defined( BOOST_NO_CWCHAR )
+namespace std { using ::wcscmp; }
+#endif
+# endif
+
+namespace ndnboost {
+
+namespace test_tools {
+
+// ************************************************************************** //
+// **************                print_log_value               ************** //
+// ************************************************************************** //
+
+void
+print_log_value<char>::operator()( std::ostream& ostr, char t )
+{
+    if( (std::isprint)( static_cast<unsigned char>(t) ) )
+        ostr << '\'' << t << '\'';
+    else
+        ostr << std::hex
+#if BOOST_TEST_USE_STD_LOCALE
+        << std::showbase
+#else
+        << "0x"
+#endif
+        << static_cast<int>(t);
+}
+
+//____________________________________________________________________________//
+
+void
+print_log_value<unsigned char>::operator()( std::ostream& ostr, unsigned char t )
+{
+    ostr << std::hex
+        // showbase is only available for new style streams:
+#if BOOST_TEST_USE_STD_LOCALE
+        << std::showbase
+#else
+        << "0x"
+#endif
+        << static_cast<int>(t);
+}
+
+//____________________________________________________________________________//
+
+void
+print_log_value<char const*>::operator()( std::ostream& ostr, char const* t )
+{
+    ostr << ( t ? t : "null string" );
+}
+
+//____________________________________________________________________________//
+
+void
+print_log_value<wchar_t const*>::operator()( std::ostream& ostr, wchar_t const* t )
+{
+    ostr << ( t ? t : L"null string" );
+}
+
+//____________________________________________________________________________//
+
+namespace tt_detail {
+
+// ************************************************************************** //
+// **************            TOOL BOX Implementation           ************** //
+// ************************************************************************** //
+
+using ::ndnboost::unit_test::lazy_ostream;
+
+bool
+check_impl( predicate_result const& pr, lazy_ostream const& check_descr,
+            const_string file_name, std::size_t line_num,
+            tool_level tl, check_type ct,
+            std::size_t num_of_args, ... )
+{
+    using namespace unit_test;
+
+    if( !framework::is_initialized() )
+        throw std::runtime_error( "can't use testing tools before framework is initialized" );
+
+    if( !!pr )
+        tl = PASS;
+
+    log_level    ll;
+    char const*  prefix;
+    char const*  suffix;
+       
+    switch( tl ) {
+    case PASS:
+        ll      = log_successful_tests;
+        prefix  = "check ";
+        suffix  = " passed";
+        break;
+    case WARN:
+        ll      = log_warnings;
+        prefix  = "condition ";
+        suffix  = " is not satisfied";
+        break;
+    case CHECK:
+        ll      = log_all_errors;
+        prefix  = "check ";
+        suffix  = " failed";
+        break;
+    case REQUIRE:
+        ll      = log_fatal_errors;
+        prefix  = "critical check ";
+        suffix  = " failed";
+        break;
+    default:
+        return true;
+    }
+
+    switch( ct ) {
+    case CHECK_PRED:
+        unit_test_log << unit_test::log::begin( file_name, line_num ) 
+                      << ll << prefix << check_descr << suffix;
+        
+        if( !pr.has_empty_message() )
+            unit_test_log << ". " << pr.message();
+        
+        unit_test_log << unit_test::log::end();
+        break;
+
+    case CHECK_MSG:
+        unit_test_log << unit_test::log::begin( file_name, line_num ) << ll;
+        
+        if( tl == PASS )
+            unit_test_log << prefix << "'" << check_descr << "'" << suffix;
+        else
+            unit_test_log << check_descr;
+        
+        if( !pr.has_empty_message() )
+            unit_test_log << ". " << pr.message();
+
+        unit_test_log << unit_test::log::end();
+        break;
+
+    case CHECK_EQUAL: 
+    case CHECK_NE: 
+    case CHECK_LT: 
+    case CHECK_LE: 
+    case CHECK_GT: 
+    case CHECK_GE: {
+        static char const* check_str [] = { " == ", " != ", " < " , " <= ", " > " , " >= " };
+        static char const* rever_str [] = { " != ", " == ", " >= ", " > " , " <= ", " < "  };
+
+        va_list args;
+
+        va_start( args, num_of_args );
+        char const*         arg1_descr  = va_arg( args, char const* );
+        lazy_ostream const* arg1_val    = va_arg( args, lazy_ostream const* );
+        char const*         arg2_descr  = va_arg( args, char const* );
+        lazy_ostream const* arg2_val    = va_arg( args, lazy_ostream const* );
+
+        unit_test_log << unit_test::log::begin( file_name, line_num ) 
+                      << ll << prefix << arg1_descr << check_str[ct-CHECK_EQUAL] << arg2_descr << suffix;
+
+        if( tl != PASS )
+            unit_test_log << " [" << *arg1_val << rever_str[ct-CHECK_EQUAL] << *arg2_val << "]" ;
+
+        va_end( args );
+        
+        if( !pr.has_empty_message() )
+            unit_test_log << ". " << pr.message();
+
+        unit_test_log << unit_test::log::end();
+        break;
+    }
+
+    case CHECK_CLOSE:
+    case CHECK_CLOSE_FRACTION: {
+        va_list args;
+
+        va_start( args, num_of_args );
+        char const*         arg1_descr  = va_arg( args, char const* );
+        lazy_ostream const* arg1_val    = va_arg( args, lazy_ostream const* );
+        char const*         arg2_descr  = va_arg( args, char const* );
+        lazy_ostream const* arg2_val    = va_arg( args, lazy_ostream const* );
+        /* toler_descr = */               va_arg( args, char const* );
+        lazy_ostream const* toler_val   = va_arg( args, lazy_ostream const* );
+
+        unit_test_log << unit_test::log::begin( file_name, line_num ) << ll;
+
+        unit_test_log << "difference{" << pr.message() << (ct == CHECK_CLOSE ? "%" : "")
+                      << "} between " << arg1_descr << "{" << *arg1_val
+                      << "} and "               << arg2_descr << "{" << *arg2_val
+                      << ( tl == PASS ? "} doesn't exceed " : "} exceeds " )
+                      << *toler_val;
+        if( ct == CHECK_CLOSE )
+            unit_test_log << "%";
+
+        va_end( args );
+        
+        unit_test_log << unit_test::log::end();
+        break;
+    }
+    case CHECK_SMALL: {
+        va_list args;
+
+        va_start( args, num_of_args );
+        char const*         arg1_descr  = va_arg( args, char const* );
+        lazy_ostream const* arg1_val    = va_arg( args, lazy_ostream const* );
+        /* toler_descr = */               va_arg( args, char const* );
+        lazy_ostream const* toler_val   = va_arg( args, lazy_ostream const* );
+
+        unit_test_log << unit_test::log::begin( file_name, line_num ) << ll;
+
+        unit_test_log << "absolute value of " << arg1_descr << "{" << *arg1_val << "}" 
+                      << ( tl == PASS ? " doesn't exceed " : " exceeds " )
+                      << *toler_val;
+
+        va_end( args );
+        
+        if( !pr.has_empty_message() )
+            unit_test_log << ". " << pr.message();
+
+        unit_test_log << unit_test::log::end();
+        break;
+    }
+
+    case CHECK_PRED_WITH_ARGS: {
+        unit_test_log << unit_test::log::begin( file_name, line_num ) 
+                      << ll << prefix << check_descr;
+
+        // print predicate call description
+        {
+            va_list args;
+            va_start( args, num_of_args );
+
+            unit_test_log << "( ";
+            for( std::size_t i = 0; i < num_of_args; ++i ) {
+                unit_test_log << va_arg( args, char const* );
+                va_arg( args, lazy_ostream const* ); // skip argument value;
+                
+                if( i != num_of_args-1 )
+                    unit_test_log << ", ";
+            }
+            unit_test_log << " )" << suffix;
+            va_end( args );
+        }
+                        
+        if( tl != PASS ) {
+            va_list args;
+            va_start( args, num_of_args );
+
+            unit_test_log << " for ( ";
+            for( std::size_t i = 0; i < num_of_args; ++i ) {
+                va_arg( args, char const* ); // skip argument description;            
+                unit_test_log << *va_arg( args, lazy_ostream const* );
+                
+                if( i != num_of_args-1 )
+                    unit_test_log << ", ";
+            }
+            unit_test_log << " )";
+            va_end( args );
+        }
+       
+        if( !pr.has_empty_message() )
+            unit_test_log << ". " << pr.message();
+
+        unit_test_log << unit_test::log::end();
+        break;
+    }
+
+    case CHECK_EQUAL_COLL: {
+        va_list args;
+
+        va_start( args, num_of_args );
+        char const* left_begin_descr    = va_arg( args, char const* );
+        char const* left_end_descr      = va_arg( args, char const* );
+        char const* right_begin_descr   = va_arg( args, char const* );
+        char const* right_end_descr     = va_arg( args, char const* );
+
+        unit_test_log << unit_test::log::begin( file_name, line_num ) 
+                      << ll << prefix 
+                      << "{ " << left_begin_descr  << ", " << left_end_descr  << " } == { " 
+                              << right_begin_descr << ", " << right_end_descr << " }"
+                      << suffix;
+
+        va_end( args );
+        
+        if( !pr.has_empty_message() )
+            unit_test_log << ". " << pr.message();
+
+        unit_test_log << unit_test::log::end();
+        break;
+    }
+
+    case CHECK_BITWISE_EQUAL: {
+        va_list args;
+
+        va_start( args, num_of_args );
+        char const* left_descr    = va_arg( args, char const* );
+        char const* right_descr   = va_arg( args, char const* );
+
+        unit_test_log << unit_test::log::begin( file_name, line_num )
+                      << ll << prefix << left_descr  << " =.= " << right_descr << suffix;
+
+        va_end( args );
+        
+        if( !pr.has_empty_message() )
+            unit_test_log << ". " << pr.message();
+
+        unit_test_log << unit_test::log::end();
+        break;
+    }
+    }
+
+    switch( tl ) {
+    case PASS:
+        framework::assertion_result( true );
+        return true;
+
+    case WARN:
+        return false;
+
+    case CHECK:
+        framework::assertion_result( false );
+        return false;
+        
+    case REQUIRE:
+        framework::assertion_result( false );
+
+        framework::test_unit_aborted( framework::current_test_case() );
+
+        throw execution_aborted();
+    }
+
+    return true;
+}
+
+//____________________________________________________________________________//
+
+predicate_result
+equal_impl( char const* left, char const* right )
+{
+    return (left && right) ? std::strcmp( left, right ) == 0 : (left == right);
+}
+
+//____________________________________________________________________________//
+
+#if !defined( BOOST_NO_CWCHAR )
+
+predicate_result
+equal_impl( wchar_t const* left, wchar_t const* right )
+{
+    return (left && right) ? std::wcscmp( left, right ) == 0 : (left == right);
+}
+
+#endif // !defined( BOOST_NO_CWCHAR )
+
+//____________________________________________________________________________//
+
+bool
+is_defined_impl( const_string symbol_name, const_string symbol_value )
+{
+    symbol_value.trim_left( 2 );
+    return symbol_name != symbol_value;
+}
+
+//____________________________________________________________________________//
+
+} // namespace tt_detail
+
+// ************************************************************************** //
+// **************               output_test_stream             ************** //
+// ************************************************************************** //
+
+struct output_test_stream::Impl
+{
+    std::fstream    m_pattern;
+    bool            m_match_or_save;
+    bool            m_text_or_binary;
+    std::string     m_synced_string;
+
+    char            get_char()
+    {
+        char res;
+        do {
+            m_pattern.get( res );
+        } while( m_text_or_binary && res == '\r' && !m_pattern.fail() && !m_pattern.eof() );
+
+        return res;
+    }
+
+    void            check_and_fill( predicate_result& res )
+    {
+        if( !res.p_predicate_value )
+            res.message() << "Output content: \"" << m_synced_string << '\"';
+    }
+};
+
+//____________________________________________________________________________//
+
+output_test_stream::output_test_stream( const_string pattern_file_name, bool match_or_save, bool text_or_binary )
+: m_pimpl( new Impl )
+{
+    if( !pattern_file_name.is_empty() ) {
+        std::ios::openmode m = match_or_save ? std::ios::in : std::ios::out;
+        if( !text_or_binary )
+            m |= std::ios::binary;
+
+        m_pimpl->m_pattern.open( pattern_file_name.begin(), m );
+
+        BOOST_WARN_MESSAGE( m_pimpl->m_pattern.is_open(),
+                             "Can't open pattern file " << pattern_file_name
+                                << " for " << (match_or_save ? "reading" : "writing") );
+    }
+
+    m_pimpl->m_match_or_save    = match_or_save;
+    m_pimpl->m_text_or_binary   = text_or_binary;
+}
+
+//____________________________________________________________________________//
+
+output_test_stream::~output_test_stream()
+{
+    delete m_pimpl;
+}
+
+//____________________________________________________________________________//
+
+predicate_result
+output_test_stream::is_empty( bool flush_stream )
+{
+    sync();
+
+    result_type res( m_pimpl->m_synced_string.empty() );
+
+    m_pimpl->check_and_fill( res );
+
+    if( flush_stream )
+        flush();
+
+    return res;
+}
+
+//____________________________________________________________________________//
+
+predicate_result
+output_test_stream::check_length( std::size_t length_, bool flush_stream )
+{
+    sync();
+
+    result_type res( m_pimpl->m_synced_string.length() == length_ );
+
+    m_pimpl->check_and_fill( res );
+
+    if( flush_stream )
+        flush();
+
+    return res;
+}
+
+//____________________________________________________________________________//
+
+predicate_result
+output_test_stream::is_equal( const_string arg, bool flush_stream )
+{
+    sync();
+
+    result_type res( const_string( m_pimpl->m_synced_string ) == arg );
+
+    m_pimpl->check_and_fill( res );
+
+    if( flush_stream )
+        flush();
+
+    return res;
+}
+
+//____________________________________________________________________________//
+
+predicate_result
+output_test_stream::match_pattern( bool flush_stream )
+{
+    sync();
+
+    result_type result( true );
+
+    if( !m_pimpl->m_pattern.is_open() ) {
+        result = false;
+        result.message() << "Pattern file can't be opened!";
+    }
+    else {
+        if( m_pimpl->m_match_or_save ) {
+            for ( std::string::size_type i = 0; i < m_pimpl->m_synced_string.length(); ++i ) {
+                char c = m_pimpl->get_char();
+
+                result = !m_pimpl->m_pattern.fail() &&
+                         !m_pimpl->m_pattern.eof()  &&
+                         (m_pimpl->m_synced_string[i] == c);
+
+                if( !result ) {
+                    std::string::size_type suffix_size  = (std::min)( m_pimpl->m_synced_string.length() - i,
+                                                                    static_cast<std::string::size_type>(5) );
+
+                    // try to log area around the mismatch
+                    result.message() << "Mismatch at position " << i << '\n'
+                        << "..." << m_pimpl->m_synced_string.substr( i, suffix_size ) << "..." << '\n'
+                        << "..." << c;
+
+                    std::string::size_type counter = suffix_size;
+                    while( --counter ) {
+                        char c = m_pimpl->get_char();
+
+                        if( m_pimpl->m_pattern.fail() || m_pimpl->m_pattern.eof() )
+                            break;
+
+                        result.message() << c;
+                    }
+
+                    result.message() << "...";
+
+                    // skip rest of the bytes. May help for further matching
+                    m_pimpl->m_pattern.ignore( 
+                        static_cast<std::streamsize>( m_pimpl->m_synced_string.length() - i - suffix_size) );
+                    break;
+                }
+            }
+        }
+        else {
+            m_pimpl->m_pattern.write( m_pimpl->m_synced_string.c_str(),
+                                      static_cast<std::streamsize>( m_pimpl->m_synced_string.length() ) );
+            m_pimpl->m_pattern.flush();
+        }
+    }
+
+    if( flush_stream )
+        flush();
+
+    return result;
+}
+
+//____________________________________________________________________________//
+
+void
+output_test_stream::flush()
+{
+    m_pimpl->m_synced_string.erase();
+
+#ifndef BOOST_NO_STRINGSTREAM
+    str( std::string() );
+#else
+    seekp( 0, std::ios::beg );
+#endif
+}
+
+//____________________________________________________________________________//
+
+std::size_t
+output_test_stream::length()
+{
+    sync();
+
+    return m_pimpl->m_synced_string.length();
+}
+
+//____________________________________________________________________________//
+
+void
+output_test_stream::sync()
+{
+#ifdef BOOST_NO_STRINGSTREAM
+    m_pimpl->m_synced_string.assign( str(), pcount() );
+    freeze( false );
+#else
+    m_pimpl->m_synced_string = str();
+#endif
+}
+
+//____________________________________________________________________________//
+
+} // namespace test_tools
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TEST_TOOLS_IPP_012205GER
diff --git a/ndnboost/test/impl/unit_test_log.ipp b/ndnboost/test/impl/unit_test_log.ipp
new file mode 100644
index 0000000..63d089e
--- /dev/null
+++ b/ndnboost/test/impl/unit_test_log.ipp
@@ -0,0 +1,444 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : implemets Unit Test Log
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
+#define BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
+
+// Boost.Test
+#include <ndnboost/test/unit_test_log.hpp>
+#include <ndnboost/test/unit_test_log_formatter.hpp>
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+#include <ndnboost/test/execution_monitor.hpp>
+
+#include <ndnboost/test/detail/unit_test_parameters.hpp>
+
+#include <ndnboost/test/utils/basic_cstring/compare.hpp>
+
+#include <ndnboost/test/output/compiler_log_formatter.hpp>
+#include <ndnboost/test/output/xml_log_formatter.hpp>
+
+// Boost
+#include <ndnboost/scoped_ptr.hpp>
+#include <ndnboost/io/ios_state.hpp>
+typedef ::ndnboost::io::ios_base_all_saver io_saver_type;
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************             entry_value_collector            ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+entry_value_collector const&
+entry_value_collector::operator<<( lazy_ostream const& v ) const
+{
+    unit_test_log << v;
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+entry_value_collector const& 
+entry_value_collector::operator<<( const_string v ) const
+{
+    unit_test_log << v;
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+entry_value_collector::~entry_value_collector()
+{
+    if( m_last )
+        unit_test_log << log::end();
+}
+
+//____________________________________________________________________________//
+
+} // namespace ut_detail
+
+// ************************************************************************** //
+// **************                 unit_test_log                ************** //
+// ************************************************************************** //
+
+namespace {
+
+struct unit_test_log_impl {
+    // Constructor
+    unit_test_log_impl()
+    : m_stream( runtime_config::log_sink() )
+    , m_stream_state_saver( new io_saver_type( *m_stream ) )
+    , m_threshold_level( log_all_errors )
+    , m_log_formatter( new output::compiler_log_formatter )
+    {
+    }
+
+    // log data
+    typedef scoped_ptr<unit_test_log_formatter> formatter_ptr;
+    typedef scoped_ptr<io_saver_type>           saver_ptr;
+
+    std::ostream*       m_stream;
+    saver_ptr           m_stream_state_saver;
+    log_level           m_threshold_level;
+    formatter_ptr       m_log_formatter;
+
+    // entry data
+    bool                m_entry_in_progress;
+    bool                m_entry_started;
+    log_entry_data      m_entry_data;
+
+    // check point data
+    log_checkpoint_data m_checkpoint_data;
+
+    // helper functions
+    std::ostream&       stream()            { return *m_stream; }
+    void                set_checkpoint( const_string file, std::size_t line_num, const_string msg )
+    {
+        assign_op( m_checkpoint_data.m_message, msg, 0 );
+        m_checkpoint_data.m_file_name    = file;
+        m_checkpoint_data.m_line_num    = line_num;
+    }
+};
+
+unit_test_log_impl& s_log_impl() { static unit_test_log_impl the_inst; return the_inst; }
+
+} // local namespace
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::test_start( counter_t test_cases_amount )
+{
+    if( s_log_impl().m_threshold_level == log_nothing )
+        return;
+
+    s_log_impl().m_log_formatter->log_start( s_log_impl().stream(), test_cases_amount );
+
+    if( runtime_config::show_build_info() )
+        s_log_impl().m_log_formatter->log_build_info( s_log_impl().stream() );
+
+    s_log_impl().m_entry_in_progress = false;
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::test_finish()
+{
+    if( s_log_impl().m_threshold_level == log_nothing )
+        return;
+
+    s_log_impl().m_log_formatter->log_finish( s_log_impl().stream() );
+
+    s_log_impl().stream().flush();
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::test_aborted()
+{
+    BOOST_TEST_LOG_ENTRY( log_messages ) << "Test is aborted";
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::test_unit_start( test_unit const& tu )
+{
+    if( s_log_impl().m_threshold_level > log_test_units )
+        return;
+
+    if( s_log_impl().m_entry_in_progress )
+        *this << log::end();
+
+    s_log_impl().m_log_formatter->test_unit_start( s_log_impl().stream(), tu );
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::test_unit_finish( test_unit const& tu, unsigned long elapsed )
+{
+    if( s_log_impl().m_threshold_level > log_test_units )
+        return;
+
+    s_log_impl().m_checkpoint_data.clear();
+
+    if( s_log_impl().m_entry_in_progress )
+        *this << log::end();
+
+    s_log_impl().m_log_formatter->test_unit_finish( s_log_impl().stream(), tu, elapsed );
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::test_unit_skipped( test_unit const& tu )
+{
+    if( s_log_impl().m_threshold_level > log_test_units )
+        return;
+
+    if( s_log_impl().m_entry_in_progress )
+        *this << log::end();
+
+    s_log_impl().m_log_formatter->test_unit_skipped( s_log_impl().stream(), tu );
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::test_unit_aborted( test_unit const& )
+{
+    // do nothing
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::assertion_result( bool )
+{
+    // do nothing
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::exception_caught( execution_exception const& ex )
+{
+    log_level l =
+        ex.code() <= execution_exception::cpp_exception_error   ? log_cpp_exception_errors :
+        (ex.code() <= execution_exception::timeout_error        ? log_system_errors
+                                                                : log_fatal_errors );
+
+    if( l >= s_log_impl().m_threshold_level ) {
+        if( s_log_impl().m_entry_in_progress )
+            *this << log::end();
+
+        s_log_impl().m_log_formatter->log_exception( s_log_impl().stream(), s_log_impl().m_checkpoint_data, ex );
+    }
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::set_checkpoint( const_string file, std::size_t line_num, const_string msg )
+{
+    s_log_impl().set_checkpoint( file, line_num, msg );
+}
+
+//____________________________________________________________________________//
+
+char
+set_unix_slash( char in )
+{
+    return in == '\\' ? '/' : in;
+}
+    
+unit_test_log_t&
+unit_test_log_t::operator<<( log::begin const& b )
+{
+    if( s_log_impl().m_entry_in_progress )
+        *this << log::end();
+
+    s_log_impl().m_stream_state_saver->restore();
+
+    s_log_impl().m_entry_data.clear();
+
+    assign_op( s_log_impl().m_entry_data.m_file_name, b.m_file_name, 0 );
+
+    // normalize file name
+    std::transform( s_log_impl().m_entry_data.m_file_name.begin(), s_log_impl().m_entry_data.m_file_name.end(),
+                    s_log_impl().m_entry_data.m_file_name.begin(),
+                    &set_unix_slash );
+
+    s_log_impl().m_entry_data.m_line_num = b.m_line_num;
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+unit_test_log_t&
+unit_test_log_t::operator<<( log::end const& )
+{
+    if( s_log_impl().m_entry_in_progress )
+        s_log_impl().m_log_formatter->log_entry_finish( s_log_impl().stream() );
+
+    s_log_impl().m_entry_in_progress = false;
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+unit_test_log_t&
+unit_test_log_t::operator<<( log_level l )
+{
+    s_log_impl().m_entry_data.m_level = l;
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+ut_detail::entry_value_collector
+unit_test_log_t::operator()( log_level l )
+{
+    *this << l;
+
+    return ut_detail::entry_value_collector();
+}
+
+//____________________________________________________________________________//
+
+bool
+unit_test_log_t::log_entry_start()
+{
+    if( s_log_impl().m_entry_in_progress ) 
+        return true;
+
+    switch( s_log_impl().m_entry_data.m_level ) {
+    case log_successful_tests:
+        s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
+                                                       unit_test_log_formatter::BOOST_UTL_ET_INFO );
+        break;
+    case log_messages:
+        s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
+                                                       unit_test_log_formatter::BOOST_UTL_ET_MESSAGE );
+        break;
+    case log_warnings:
+        s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
+                                                       unit_test_log_formatter::BOOST_UTL_ET_WARNING );
+        break;
+    case log_all_errors:
+    case log_cpp_exception_errors:
+    case log_system_errors:
+        s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
+                                                       unit_test_log_formatter::BOOST_UTL_ET_ERROR );
+        break;
+    case log_fatal_errors:
+        s_log_impl().m_log_formatter->log_entry_start( s_log_impl().stream(), s_log_impl().m_entry_data,
+                                                       unit_test_log_formatter::BOOST_UTL_ET_FATAL_ERROR );
+        break;
+    case log_nothing:
+    case log_test_units:
+    case invalid_log_level:
+        return false;
+    }
+
+    s_log_impl().m_entry_in_progress = true;
+
+    return true;
+}
+
+//____________________________________________________________________________//
+
+unit_test_log_t&
+unit_test_log_t::operator<<( const_string value )
+{
+    if( s_log_impl().m_entry_data.m_level >= s_log_impl().m_threshold_level && !value.empty() && log_entry_start() )
+        s_log_impl().m_log_formatter->log_entry_value( s_log_impl().stream(), value );
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+unit_test_log_t&
+unit_test_log_t::operator<<( lazy_ostream const& value )
+{
+    if( s_log_impl().m_entry_data.m_level >= s_log_impl().m_threshold_level && !value.empty() && log_entry_start() )
+        s_log_impl().m_log_formatter->log_entry_value( s_log_impl().stream(), value );
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::set_stream( std::ostream& str )
+{
+    if( s_log_impl().m_entry_in_progress )
+        return;
+
+    s_log_impl().m_stream = &str;
+    s_log_impl().m_stream_state_saver.reset( new io_saver_type( str ) );
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::set_threshold_level( log_level lev )
+{
+    if( s_log_impl().m_entry_in_progress || lev == invalid_log_level )
+        return;
+
+    s_log_impl().m_threshold_level = lev;
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::set_format( output_format log_format )
+{
+    if( s_log_impl().m_entry_in_progress )
+        return;
+
+    if( log_format == CLF )
+        set_formatter( new output::compiler_log_formatter );
+    else
+        set_formatter( new output::xml_log_formatter );
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::set_formatter( unit_test_log_formatter* the_formatter )
+{
+    s_log_impl().m_log_formatter.reset( the_formatter );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************            unit_test_log_formatter           ************** //
+// ************************************************************************** //
+
+void
+unit_test_log_formatter::log_entry_value( std::ostream& ostr, lazy_ostream const& value )
+{
+    log_entry_value( ostr, (wrap_stringstream().ref() << value).str() );
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
diff --git a/ndnboost/test/impl/unit_test_main.ipp b/ndnboost/test/impl/unit_test_main.ipp
new file mode 100644
index 0000000..bde871f
--- /dev/null
+++ b/ndnboost/test/impl/unit_test_main.ipp
@@ -0,0 +1,246 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : main function implementation for Unit Test Framework
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
+#define BOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
+
+// Boost.Test
+#include <ndnboost/test/framework.hpp>
+#include <ndnboost/test/results_collector.hpp>
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+#include <ndnboost/test/results_reporter.hpp>
+
+#include <ndnboost/test/detail/unit_test_parameters.hpp>
+
+#if !defined(__BORLANDC__) && !BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) && !BOOST_WORKAROUND( __SUNPRO_CC, < 0x5100 )
+#define BOOST_TEST_SUPPORT_RUN_BY_NAME
+#include <ndnboost/test/utils/iterator/token_iterator.hpp>
+#endif
+
+// Boost
+#include <ndnboost/cstdlib.hpp>
+#include <ndnboost/bind.hpp>
+
+// STL
+#include <stdexcept>
+#include <iostream>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                 test_case_filter             ************** //
+// ************************************************************************** //
+
+class test_case_filter : public test_tree_visitor {
+public:
+    struct single_filter {
+        single_filter( const_string in )
+        {
+            if( in == "*" )
+                m_kind  = SFK_ALL;
+            else if( first_char( in ) == '*' && last_char( in ) == '*' ) {
+                m_kind  = SFK_SUBSTR;
+                m_value = in.substr( 1, in.size()-1 );
+            }
+            else if( first_char( in ) == '*' ) {
+                m_kind  = SFK_TRAILING;
+                m_value = in.substr( 1 );
+            }
+            else if( last_char( in ) == '*' ) {
+                m_kind  = SFK_LEADING;
+                m_value = in.substr( 0, in.size()-1 );
+            }
+            else {
+                m_kind  = SFK_MATCH;
+                m_value = in;
+            }
+        };
+
+        bool            pass( test_unit const& tu ) const
+        {
+            const_string name( tu.p_name );
+    
+            switch( m_kind ) {
+            default:
+            case SFK_ALL:
+                return true;
+
+            case SFK_LEADING:
+                return name.substr( 0, m_value.size() ) == m_value;
+
+            case SFK_TRAILING:
+                return name.size() >= m_value.size() && name.substr( name.size() - m_value.size() ) == m_value;
+
+            case SFK_SUBSTR:
+                return name.find( m_value ) != const_string::npos;
+
+            case SFK_MATCH:
+                return m_value == tu.p_name.get();
+            }
+        }
+        enum kind { SFK_ALL, SFK_LEADING, SFK_TRAILING, SFK_SUBSTR, SFK_MATCH };
+
+        kind            m_kind;
+        const_string    m_value;
+    };
+    // Constructor
+#ifndef BOOST_TEST_SUPPORT_RUN_BY_NAME
+    explicit        test_case_filter( const_string ) : m_depth( 0 ) {}
+#else
+    explicit        test_case_filter( const_string tc_to_run ) 
+    : m_depth( 0 )
+    {
+        string_token_iterator tit( tc_to_run, (dropped_delimeters = "/", kept_delimeters = dt_none) );
+
+        while( tit != string_token_iterator() ) {
+            m_filters.push_back( 
+                std::vector<single_filter>( string_token_iterator( *tit, (dropped_delimeters = ",", kept_delimeters = dt_none)  ), 
+                                            string_token_iterator() ) );
+
+            ++tit;           
+        }
+    }
+#endif
+    
+    void            filter_unit( test_unit const& tu )
+    {
+        if( (++m_depth - 1) > m_filters.size() ) {
+            tu.p_enabled.value = true;
+            return;
+        }
+
+        if( m_depth == 1 )
+            return;
+
+        std::vector<single_filter> const& filters = m_filters[m_depth-2];
+
+        tu.p_enabled.value =
+            std::find_if( filters.begin(), filters.end(), bind( &single_filter::pass, _1, ndnboost::ref(tu) ) ) != filters.end();
+    }
+
+    // test tree visitor interface
+    virtual void    visit( test_case const& tc )
+    {
+        if( m_depth < m_filters.size() ) {
+            tc.p_enabled.value = false;
+            return;
+        }
+
+        filter_unit( tc );
+
+        --m_depth;
+    }
+
+    virtual bool    test_suite_start( test_suite const& ts )
+    { 
+        filter_unit( ts );
+
+        if( !ts.p_enabled )
+            --m_depth;
+
+        return ts.p_enabled;
+    }
+
+    virtual void    test_suite_finish( test_suite const& )  { --m_depth; }
+
+private:
+    // Data members
+    std::vector<std::vector<single_filter> >    m_filters;
+    unsigned                                    m_depth;
+};
+
+// ************************************************************************** //
+// **************                  unit_test_main              ************** //
+// ************************************************************************** //
+
+int BOOST_TEST_DECL
+unit_test_main( init_unit_test_func init_func, int argc, char* argv[] )
+{
+    try {
+        framework::init( init_func, argc, argv );
+
+        if( !runtime_config::test_to_run().is_empty() ) {
+            test_case_filter filter( runtime_config::test_to_run() );
+
+            traverse_test_tree( framework::master_test_suite().p_id, filter );
+        }
+
+        framework::run();
+
+        results_reporter::make_report();
+
+        return runtime_config::no_result_code() 
+                    ? ndnboost::exit_success
+                    : results_collector.results( framework::master_test_suite().p_id ).result_code();
+    }
+    catch( framework::nothing_to_test const& ) {
+        return ndnboost::exit_success;
+    }
+    catch( framework::internal_error const& ex ) {
+        results_reporter::get_stream() << "Boost.Test framework internal error: " << ex.what() << std::endl;
+        
+        return ndnboost::exit_exception_failure;
+    }
+    catch( framework::setup_error const& ex ) {
+        results_reporter::get_stream() << "Test setup error: " << ex.what() << std::endl;
+        
+        return ndnboost::exit_exception_failure;
+    }
+    catch( ... ) {
+        results_reporter::get_stream() << "Boost.Test framework internal error: unknown reason" << std::endl;
+        
+        return ndnboost::exit_exception_failure;
+    }
+}
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+#if !defined(BOOST_TEST_DYN_LINK) && !defined(BOOST_TEST_NO_MAIN)
+
+// ************************************************************************** //
+// **************        main function for tests using lib     ************** //
+// ************************************************************************** //
+
+int BOOST_TEST_CALL_DECL
+main( int argc, char* argv[] )
+{
+    // prototype for user's unit test init function
+#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
+    extern bool init_unit_test();
+
+    ndnboost::unit_test::init_unit_test_func init_func = &init_unit_test;
+#else
+    extern ::ndnboost::unit_test::test_suite* init_unit_test_suite( int argc, char* argv[] );
+
+    ndnboost::unit_test::init_unit_test_func init_func = &init_unit_test_suite;
+#endif
+
+    return ::ndnboost::unit_test::unit_test_main( init_func, argc, argv );
+}
+
+#endif // !BOOST_TEST_DYN_LINK && !BOOST_TEST_NO_MAIN
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_MAIN_IPP_012205GER
diff --git a/ndnboost/test/impl/unit_test_monitor.ipp b/ndnboost/test/impl/unit_test_monitor.ipp
new file mode 100644
index 0000000..0932bf3
--- /dev/null
+++ b/ndnboost/test/impl/unit_test_monitor.ipp
@@ -0,0 +1,101 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : implements specific subclass of Executon Monitor used by Unit
+//  Test Framework to monitor test cases run.
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
+#define BOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
+
+// Boost.Test
+#include <ndnboost/test/unit_test_monitor.hpp>
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+#include <ndnboost/test/test_tools.hpp>
+#include <ndnboost/test/framework.hpp>
+
+#include <ndnboost/test/detail/unit_test_parameters.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace {
+
+template<typename F>
+struct zero_return_wrapper_t {
+    explicit zero_return_wrapper_t( F const& f ) : m_f( f ) {}
+    
+    int operator()() { m_f(); return 0; }
+    
+    F const& m_f;
+};
+
+template<typename F>
+zero_return_wrapper_t<F>
+zero_return_wrapper( F const& f )
+{
+    return zero_return_wrapper_t<F>( f );
+}
+
+}
+
+// ************************************************************************** //
+// **************               unit_test_monitor              ************** //
+// ************************************************************************** //
+
+unit_test_monitor_t::error_level
+unit_test_monitor_t::execute_and_translate( test_case const& tc )
+{
+    try {
+        p_catch_system_errors.value     = runtime_config::catch_sys_errors();
+        p_timeout.value                 = tc.p_timeout.get();
+        p_auto_start_dbg.value          = runtime_config::auto_start_dbg();
+        p_use_alt_stack.value           = runtime_config::use_alt_stack();
+        p_detect_fp_exceptions.value    = runtime_config::detect_fp_exceptions();
+
+        execute( callback0<int>( zero_return_wrapper( tc.test_func() ) ) );
+    }
+    catch( execution_exception const& ex ) {
+        framework::exception_caught( ex );
+        framework::test_unit_aborted( framework::current_test_case() );
+
+        // translate execution_exception::error_code to error_level
+        switch( ex.code() ) {
+        case execution_exception::no_error:             return test_ok;
+        case execution_exception::user_error:           return unexpected_exception;
+        case execution_exception::cpp_exception_error:  return unexpected_exception;
+        case execution_exception::system_error:         return os_exception;
+        case execution_exception::timeout_error:        return os_timeout;
+        case execution_exception::user_fatal_error:
+        case execution_exception::system_fatal_error:   return fatal_error;
+        default:                                        return unexpected_exception;
+        }
+    }
+
+    return test_ok;
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
diff --git a/ndnboost/test/impl/unit_test_parameters.ipp b/ndnboost/test/impl/unit_test_parameters.ipp
new file mode 100644
index 0000000..ffc29c9
--- /dev/null
+++ b/ndnboost/test/impl/unit_test_parameters.ipp
@@ -0,0 +1,527 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 63640 $
+//
+//  Description : simple implementation for Unit Test Framework parameter
+//  handling routines. May be rewritten in future to use some kind of
+//  command-line arguments parsing facility and environment variable handling
+//  facility
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_PARAMETERS_IPP_012205GER
+#define BOOST_TEST_UNIT_TEST_PARAMETERS_IPP_012205GER
+
+// Boost.Test
+#include <ndnboost/test/detail/unit_test_parameters.hpp>
+#include <ndnboost/test/utils/basic_cstring/basic_cstring.hpp>
+#include <ndnboost/test/utils/basic_cstring/compare.hpp>
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+#include <ndnboost/test/utils/fixed_mapping.hpp>
+#include <ndnboost/test/debug.hpp>
+#include <ndnboost/test/framework.hpp>
+
+// Boost.Runtime.Param
+#include <ndnboost/test/utils/runtime/cla/dual_name_parameter.hpp>
+#include <ndnboost/test/utils/runtime/cla/parser.hpp>
+
+namespace rt  = ndnboost::runtime;
+namespace cla = rt::cla;
+
+
+#ifndef UNDER_CE
+#include <ndnboost/test/utils/runtime/env/variable.hpp>
+
+namespace env = rt::env;
+#endif
+
+
+// Boost
+#include <ndnboost/config.hpp>
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+#include <ndnboost/lexical_cast.hpp>
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+// STL
+#include <map>
+#include <cstdlib>
+#include <iostream>
+#include <fstream>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::getenv; using ::strncmp; using ::strcmp; }
+# endif
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************    input operations for unit_test's enums    ************** //
+// ************************************************************************** //
+
+std::istream&
+operator>>( std::istream& in, unit_test::log_level& ll )
+{
+    static fixed_mapping<const_string,unit_test::log_level,case_ins_less<char const> > log_level_name(
+        "all"           , log_successful_tests,
+        "success"       , log_successful_tests,
+        "test_suite"    , log_test_units,
+        "unit_scope"    , log_test_units,
+        "message"       , log_messages,
+        "warning"       , log_warnings,
+        "error"         , log_all_errors,
+        "cpp_exception" , log_cpp_exception_errors,
+        "system_error"  , log_system_errors,
+        "fatal_error"   , log_fatal_errors,
+        "nothing"       , log_nothing,
+
+        invalid_log_level
+        );
+
+    std::string val;
+    in >> val;
+
+    ll = log_level_name[val];
+    BOOST_TEST_SETUP_ASSERT( ll != unit_test::invalid_log_level, "invalid log level " + val );
+
+    return in;
+}
+
+//____________________________________________________________________________//
+
+std::istream&
+operator>>( std::istream& in, unit_test::report_level& rl )
+{
+    fixed_mapping<const_string,unit_test::report_level,case_ins_less<char const> > report_level_name (
+        "confirm",  CONFIRMATION_REPORT,
+        "short",    SHORT_REPORT,
+        "detailed", DETAILED_REPORT,
+        "no",       NO_REPORT,
+
+        INV_REPORT_LEVEL
+        );
+
+    std::string val;
+    in >> val;
+
+    rl = report_level_name[val];
+    BOOST_TEST_SETUP_ASSERT( rl != INV_REPORT_LEVEL, "invalid report level " + val );
+
+    return in;
+}
+
+//____________________________________________________________________________//
+
+std::istream&
+operator>>( std::istream& in, unit_test::output_format& of )
+{
+    fixed_mapping<const_string,unit_test::output_format,case_ins_less<char const> > output_format_name (
+        "HRF", unit_test::CLF,
+        "CLF", unit_test::CLF,
+        "XML", unit_test::XML,
+
+        unit_test::INV_OF
+        );
+
+    std::string val;
+    in >> val;
+
+    of = output_format_name[val];
+    BOOST_TEST_SETUP_ASSERT( of != unit_test::INV_OF, "invalid output format " + val );
+
+    return in;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                 runtime_config               ************** //
+// ************************************************************************** //
+
+namespace runtime_config {
+
+namespace {
+
+// framework parameters and corresponding command-line arguments
+std::string AUTO_START_DBG    = "auto_start_dbg";
+std::string BREAK_EXEC_PATH   = "break_exec_path";
+std::string BUILD_INFO        = "build_info";
+std::string CATCH_SYS_ERRORS  = "catch_system_errors";
+std::string DETECT_FP_EXCEPT  = "detect_fp_exceptions";
+std::string DETECT_MEM_LEAKS  = "detect_memory_leaks";
+std::string LOG_FORMAT        = "log_format";
+std::string LOG_LEVEL         = "log_level";
+std::string LOG_SINK          = "log_sink";
+std::string OUTPUT_FORMAT     = "output_format";
+std::string RANDOM_SEED       = "random";
+std::string REPORT_FORMAT     = "report_format";
+std::string REPORT_LEVEL      = "report_level";
+std::string REPORT_SINK       = "report_sink";
+std::string RESULT_CODE       = "result_code";
+std::string TESTS_TO_RUN      = "run_test";
+std::string SAVE_TEST_PATTERN = "save_pattern";
+std::string SHOW_PROGRESS     = "show_progress";
+std::string USE_ALT_STACK     = "use_alt_stack";
+
+fixed_mapping<const_string,const_string> parameter_2_env_var(
+    AUTO_START_DBG    , "BOOST_TEST_AUTO_START_DBG",
+    BREAK_EXEC_PATH   , "BOOST_TEST_BREAK_EXEC_PATH",
+    BUILD_INFO        , "BOOST_TEST_BUILD_INFO",
+    CATCH_SYS_ERRORS  , "BOOST_TEST_CATCH_SYSTEM_ERRORS",
+    DETECT_FP_EXCEPT  , "BOOST_TEST_DETECT_FP_EXCEPTIONS",
+    DETECT_MEM_LEAKS  , "BOOST_TEST_DETECT_MEMORY_LEAK",
+    LOG_FORMAT        , "BOOST_TEST_LOG_FORMAT",
+    LOG_LEVEL         , "BOOST_TEST_LOG_LEVEL",
+    LOG_SINK          , "BOOST_TEST_LOG_SINK",
+    OUTPUT_FORMAT     , "BOOST_TEST_OUTPUT_FORMAT",
+    RANDOM_SEED       , "BOOST_TEST_RANDOM",
+    REPORT_FORMAT     , "BOOST_TEST_REPORT_FORMAT",
+    REPORT_LEVEL      , "BOOST_TEST_REPORT_LEVEL",
+    REPORT_SINK       , "BOOST_TEST_REPORT_SINK",
+    RESULT_CODE       , "BOOST_TEST_RESULT_CODE",
+    TESTS_TO_RUN      , "BOOST_TESTS_TO_RUN",
+    SAVE_TEST_PATTERN , "BOOST_TEST_SAVE_PATTERN",
+    SHOW_PROGRESS     , "BOOST_TEST_SHOW_PROGRESS",
+    USE_ALT_STACK     , "BOOST_TEST_USE_ALT_STACK",
+
+    ""
+);
+
+//____________________________________________________________________________//
+
+// storage for the CLAs
+cla::parser     s_cla_parser;
+std::string     s_empty;
+
+output_format   s_report_format;
+output_format   s_log_format;
+
+//____________________________________________________________________________//
+
+template<typename T>
+T
+retrieve_parameter( const_string parameter_name, cla::parser const& s_cla_parser, T const& default_value = T(), T const& optional_value = T() )
+{
+    rt::const_argument_ptr arg = s_cla_parser[parameter_name];
+    if( arg ) {
+        if( rtti::type_id<T>() == rtti::type_id<bool>() ||
+            !static_cast<cla::parameter const&>( arg->p_formal_parameter.get() ).p_optional_value )
+            return s_cla_parser.get<T>( parameter_name );
+
+        optional<T> val = s_cla_parser.get<optional<T> >( parameter_name );
+        if( val )
+            return *val;
+        else
+            return optional_value;
+    }
+
+    ndnboost::optional<T> v;
+
+#ifndef UNDER_CE
+    env::get( parameter_2_env_var[parameter_name], v );
+#endif
+
+    if( v )
+        return *v;
+    else
+        return default_value;
+}
+
+//____________________________________________________________________________//
+
+} // local namespace 
+
+void
+init( int& argc, char** argv )
+{
+    using namespace cla;
+
+    try {
+        s_cla_parser - cla::ignore_mismatch
+          << cla::dual_name_parameter<bool>( AUTO_START_DBG + "|d" )
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
+               cla::description = "Automatically starts debugger if system level error (signal) occurs")
+          << cla::named_parameter<std::string>( BREAK_EXEC_PATH )
+            - (cla::prefix = "--",cla::separator = "=",cla::guess_name,cla::optional,
+               cla::description = "For the exception safety testing allows to break at specific execution path")
+          << cla::dual_name_parameter<bool>( BUILD_INFO + "|i" )
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
+               cla::description = "Shows library build information" )
+          << cla::dual_name_parameter<bool>( CATCH_SYS_ERRORS + "|s" )
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
+               cla::description = "Allows to switch between catching and ignoring system errors (signals)")
+          << cla::named_parameter<bool>( DETECT_FP_EXCEPT )
+            - (cla::prefix = "--",cla::separator = "=",cla::guess_name,cla::optional,
+               cla::description = "Allows to switch between catching and ignoring floating point exceptions")
+          << cla::named_parameter<long>( DETECT_MEM_LEAKS )
+            - (cla::prefix = "--",cla::separator = "=",cla::guess_name,cla::optional,
+               cla::description = "Allows to switch between catching and ignoring memory leaks")
+          << cla::dual_name_parameter<unit_test::output_format>( LOG_FORMAT + "|f" )
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
+               cla::description = "Specifies log format")
+          << cla::dual_name_parameter<unit_test::log_level>( LOG_LEVEL + "|l" )
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
+               cla::description = "Specifies log level")
+          << cla::dual_name_parameter<std::string>( LOG_SINK + "|k" )
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
+               cla::description = "Specifies log sink:stdout(default),stderr or file name")
+          << cla::dual_name_parameter<unit_test::output_format>( OUTPUT_FORMAT + "|o" )
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
+               cla::description = "Specifies output format (both log and report)")
+          << cla::dual_name_parameter<int>( RANDOM_SEED + "|a" )
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,cla::optional_value,
+               cla::description = "Allows to switch between sequential and random order of test units execution.\n"
+                                  "Optionally allows to specify concrete seed for random number generator")
+          << cla::dual_name_parameter<unit_test::output_format>( REPORT_FORMAT + "|m" )
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
+               cla::description = "Specifies report format")
+          << cla::dual_name_parameter<unit_test::report_level>(REPORT_LEVEL + "|r")
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
+               cla::description = "Specifies report level")
+          << cla::dual_name_parameter<std::string>( REPORT_SINK + "|e" )
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
+               cla::description = "Specifies report sink:stderr(default),stdout or file name")
+          << cla::dual_name_parameter<bool>( RESULT_CODE + "|c" )
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
+               cla::description = "Allows to disable test modules's result code generation")
+          << cla::dual_name_parameter<std::string>( TESTS_TO_RUN + "|t" )
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
+               cla::description = "Allows to filter which test units to run")
+          << cla::named_parameter<bool>( SAVE_TEST_PATTERN )
+            - (cla::prefix = "--",cla::separator = "=",cla::guess_name,cla::optional,
+               cla::description = "Allows to switch between saving and matching against test pattern file")
+          << cla::dual_name_parameter<bool>( SHOW_PROGRESS + "|p" )
+            - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional,
+               cla::description = "Turns on progress display")
+          << cla::named_parameter<bool>( USE_ALT_STACK )
+            - (cla::prefix = "--",cla::separator = "=",cla::guess_name,cla::optional,
+               cla::description = "Turns on/off usage of an alternative stack for signal handling")
+
+          << cla::dual_name_parameter<bool>( "help|?" )
+            - (cla::prefix = "--|-",cla::separator = "=",cla::guess_name,cla::optional,
+               cla::description = "this help message")
+            ;
+
+        s_cla_parser.parse( argc, argv );
+
+        if( s_cla_parser["help"] ) {
+            s_cla_parser.help( std::cout );
+            throw framework::nothing_to_test();
+        }
+
+        s_report_format     = retrieve_parameter( REPORT_FORMAT, s_cla_parser, unit_test::CLF );
+        s_log_format        = retrieve_parameter( LOG_FORMAT, s_cla_parser, unit_test::CLF );
+
+        unit_test::output_format of = retrieve_parameter( OUTPUT_FORMAT, s_cla_parser, unit_test::INV_OF );
+
+        if( of != unit_test::INV_OF )
+            s_report_format = s_log_format = of;
+    }
+    catch( rt::logic_error const& ex ) {
+        std::ostringstream err;
+        
+        err << "Fail to process runtime parameters: " << ex.msg() << std::endl;
+        s_cla_parser.usage( err );
+
+        throw framework::setup_error( err.str() );
+    }
+}
+
+//____________________________________________________________________________//
+
+unit_test::log_level
+log_level()
+{
+    return retrieve_parameter( LOG_LEVEL, s_cla_parser, unit_test::log_all_errors );
+}
+
+//____________________________________________________________________________//
+
+bool
+no_result_code()
+{
+    return !retrieve_parameter( RESULT_CODE, s_cla_parser, true );
+}
+
+//____________________________________________________________________________//
+
+unit_test::report_level
+report_level()
+{
+    return retrieve_parameter( REPORT_LEVEL, s_cla_parser, unit_test::CONFIRMATION_REPORT );
+}
+
+//____________________________________________________________________________//
+
+const_string
+test_to_run()
+{
+    static std::string s_test_to_run = retrieve_parameter( TESTS_TO_RUN, s_cla_parser, s_empty );
+
+    return s_test_to_run;
+}
+
+//____________________________________________________________________________//
+
+const_string
+break_exec_path()
+{
+    static std::string s_break_exec_path = retrieve_parameter( BREAK_EXEC_PATH, s_cla_parser, s_empty );
+
+    return s_break_exec_path;
+}
+
+//____________________________________________________________________________//
+
+bool
+save_pattern()
+{
+    return retrieve_parameter( SAVE_TEST_PATTERN, s_cla_parser, false );
+}
+
+//____________________________________________________________________________//
+
+bool
+show_progress()
+{
+    return retrieve_parameter( SHOW_PROGRESS, s_cla_parser, false );
+}
+
+//____________________________________________________________________________//
+
+bool
+show_build_info()
+{
+    return retrieve_parameter( BUILD_INFO, s_cla_parser, false );
+}
+
+//____________________________________________________________________________//
+
+bool
+catch_sys_errors()
+{
+    return retrieve_parameter( CATCH_SYS_ERRORS, s_cla_parser, 
+#ifdef BOOST_TEST_DEFAULTS_TO_CORE_DUMP
+        false
+#else
+        true 
+#endif
+        );
+}
+
+//____________________________________________________________________________//
+
+bool
+auto_start_dbg()
+{
+    // !! set debugger as an option
+    return retrieve_parameter( AUTO_START_DBG, s_cla_parser, false );
+;
+}
+
+//____________________________________________________________________________//
+
+bool
+use_alt_stack()
+{
+    return retrieve_parameter( USE_ALT_STACK, s_cla_parser, true );
+}
+
+//____________________________________________________________________________//
+
+bool
+detect_fp_exceptions()
+{
+    return retrieve_parameter( DETECT_FP_EXCEPT, s_cla_parser, false );
+}
+
+//____________________________________________________________________________//
+
+output_format
+report_format()
+{
+    return s_report_format;
+}
+
+//____________________________________________________________________________//
+
+output_format
+log_format()
+{
+    return s_log_format;
+}
+
+//____________________________________________________________________________//
+
+std::ostream*
+report_sink()
+{
+    std::string sink_name = retrieve_parameter( REPORT_SINK, s_cla_parser, s_empty );
+
+    if( sink_name.empty() || sink_name == "stderr" )
+        return &std::cerr;    
+    
+    if( sink_name == "stdout" )
+        return &std::cout;
+
+    static std::ofstream log_file( sink_name.c_str() );
+    return &log_file;
+}
+
+//____________________________________________________________________________//
+
+std::ostream*
+log_sink()
+{
+    std::string sink_name = retrieve_parameter( LOG_SINK, s_cla_parser, s_empty );
+
+    if( sink_name.empty() || sink_name == "stdout" )
+        return &std::cout;    
+
+    if( sink_name == "stderr" )
+        return &std::cerr;    
+
+    static std::ofstream report_file( sink_name.c_str() );
+    return &report_file;
+}
+
+//____________________________________________________________________________//
+
+long
+detect_memory_leaks()
+{
+    return retrieve_parameter( DETECT_MEM_LEAKS, s_cla_parser, static_cast<long>(1) );
+}
+
+//____________________________________________________________________________//
+
+int
+random_seed()
+{
+    return retrieve_parameter( RANDOM_SEED, s_cla_parser, 0, 1 );
+}
+
+//____________________________________________________________________________//
+
+} // namespace runtime_config
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_PARAMETERS_IPP_012205GER
diff --git a/ndnboost/test/impl/unit_test_suite.ipp b/ndnboost/test/impl/unit_test_suite.ipp
new file mode 100644
index 0000000..983682d
--- /dev/null
+++ b/ndnboost/test/impl/unit_test_suite.ipp
@@ -0,0 +1,346 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : privides core implementation for Unit Test Framework.
+//                Extensions can be provided in separate files
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
+#define BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
+
+// Boost.Test
+#include <ndnboost/detail/workaround.hpp>
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+#include <ndnboost/test/framework.hpp>
+#include <ndnboost/test/utils/foreach.hpp>
+#include <ndnboost/test/results_collector.hpp>
+#include <ndnboost/test/detail/unit_test_parameters.hpp>
+
+// Boost
+#include <ndnboost/timer.hpp>
+
+// STL
+#include <algorithm>
+#include <vector>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
+    BOOST_WORKAROUND(_STLPORT_VERSION, <= 0x450) \
+    /**/
+    using std::rand; // rand is in std and random_shuffle is in _STL
+#endif
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                   test_unit                  ************** //
+// ************************************************************************** //
+
+test_unit::test_unit( const_string name, test_unit_type t )
+: p_type( t )
+, p_type_name( t == tut_case ? "case" : "suite" )
+, p_id( INV_TEST_UNIT_ID )
+, p_name( std::string( name.begin(), name.size() ) )
+, p_enabled( true )
+{
+}
+
+//____________________________________________________________________________//
+
+test_unit::~test_unit()
+{
+    framework::deregister_test_unit( this );
+}
+
+//____________________________________________________________________________//
+
+void
+test_unit::depends_on( test_unit* tu )
+{
+    m_dependencies.push_back( tu->p_id );
+}
+
+//____________________________________________________________________________//
+
+bool
+test_unit::check_dependencies() const
+{
+    BOOST_TEST_FOREACH( test_unit_id, tu_id, m_dependencies ) {
+        if( !unit_test::results_collector.results( tu_id ).passed() )
+            return false;
+    }
+
+    return true;
+}
+
+//____________________________________________________________________________//
+
+void
+test_unit::increase_exp_fail( unsigned num )
+{
+    p_expected_failures.value += num;
+
+    if( p_parent_id != 0 )
+        framework::get<test_suite>( p_parent_id ).increase_exp_fail( num );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                   test_case                  ************** //
+// ************************************************************************** //
+
+test_case::test_case( const_string name, callback0<> const& test_func )
+: test_unit( name, static_cast<test_unit_type>(type) )
+, m_test_func( test_func )
+{
+     // !! weirdest MSVC BUG; try to remove this statement; looks like it eats first token of next statement   
+#if BOOST_WORKAROUND(BOOST_MSVC,<1300)   
+     0;   
+#endif 
+    framework::register_test_unit( this );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                  test_suite                  ************** //
+// ************************************************************************** //
+
+//____________________________________________________________________________//
+
+test_suite::test_suite( const_string name )
+: test_unit( name, static_cast<test_unit_type>(type) )
+{
+    framework::register_test_unit( this );
+}
+
+//____________________________________________________________________________//
+
+void
+test_suite::add( test_unit* tu, counter_t expected_failures, unsigned timeout )
+{
+    if( timeout != 0 )
+        tu->p_timeout.value = timeout;
+
+    m_members.push_back( tu->p_id );
+    tu->p_parent_id.value = p_id;
+
+    if( tu->p_expected_failures )
+        increase_exp_fail( tu->p_expected_failures );
+
+    if( expected_failures )
+        tu->increase_exp_fail( expected_failures );
+}
+
+//____________________________________________________________________________//
+
+void
+test_suite::add( test_unit_generator const& gen, unsigned timeout )
+{
+    test_unit* tu;
+    while((tu = gen.next(), tu))
+        add( tu, 0, timeout );
+}
+
+//____________________________________________________________________________//
+
+void
+test_suite::remove( test_unit_id id )
+{
+    std::vector<test_unit_id>::iterator it = std::find( m_members.begin(), m_members.end(), id );
+
+    if( it != m_members.end() )
+        m_members.erase( it );
+}
+
+//____________________________________________________________________________//
+
+test_unit_id
+test_suite::get( const_string tu_name ) const
+{
+    BOOST_TEST_FOREACH( test_unit_id, id, m_members ) {
+        if( tu_name == framework::get( id, ut_detail::test_id_2_unit_type( id ) ).p_name.get() )
+            return id;
+    }
+
+    return INV_TEST_UNIT_ID;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************               traverse_test_tree             ************** //
+// ************************************************************************** //
+
+void
+traverse_test_tree( test_case const& tc, test_tree_visitor& V )
+{
+    if( tc.p_enabled )
+    V.visit( tc );
+}
+
+//____________________________________________________________________________//
+
+void
+traverse_test_tree( test_suite const& suite, test_tree_visitor& V )
+{
+    if( !suite.p_enabled || !V.test_suite_start( suite ) )
+        return;
+
+    try {
+        if( runtime_config::random_seed() == 0 ) {
+            BOOST_TEST_FOREACH( test_unit_id, id, suite.m_members )
+                traverse_test_tree( id, V );
+        }
+        else {
+            std::vector<test_unit_id> members( suite.m_members );
+            std::random_shuffle( members.begin(), members.end() );
+            BOOST_TEST_FOREACH( test_unit_id, id, members )
+                traverse_test_tree( id, V );
+        }
+        
+    } catch( test_being_aborted const& ) {
+        V.test_suite_finish( suite );
+        framework::test_unit_aborted( suite );
+
+        throw;
+    }
+
+    V.test_suite_finish( suite );
+}
+
+//____________________________________________________________________________//
+
+void
+traverse_test_tree( test_unit_id id, test_tree_visitor& V )
+{
+    if( ut_detail::test_id_2_unit_type( id ) == tut_case )
+        traverse_test_tree( framework::get<test_case>( id ), V );
+    else
+        traverse_test_tree( framework::get<test_suite>( id ), V );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                test_case_counter             ************** //
+// ************************************************************************** //
+
+void
+test_case_counter::visit( test_case const& tc )
+{
+    if( tc.p_enabled )
+        ++p_count.value;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************               object generators              ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+std::string
+normalize_test_case_name( const_string name )
+{
+    return ( name[0] == '&'
+                ? std::string( name.begin()+1, name.size()-1 )
+                : std::string( name.begin(), name.size() ) );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************           auto_test_unit_registrar           ************** //
+// ************************************************************************** //
+
+auto_test_unit_registrar::auto_test_unit_registrar( test_case* tc, counter_t exp_fail )
+{
+    curr_ts_store().back()->add( tc, exp_fail );
+}
+
+//____________________________________________________________________________//
+
+auto_test_unit_registrar::auto_test_unit_registrar( const_string ts_name )
+{
+    test_unit_id id = curr_ts_store().back()->get( ts_name );
+
+    test_suite* ts;
+
+    if( id != INV_TEST_UNIT_ID ) {
+        ts = &framework::get<test_suite>( id ); // !! test for invalid tu type
+        BOOST_ASSERT( ts->p_parent_id == curr_ts_store().back()->p_id );
+    }
+    else {
+        ts = new test_suite( ts_name );
+        curr_ts_store().back()->add( ts );
+    }
+
+    curr_ts_store().push_back( ts );
+}
+
+//____________________________________________________________________________//
+
+auto_test_unit_registrar::auto_test_unit_registrar( test_unit_generator const& tc_gen )
+{
+    curr_ts_store().back()->add( tc_gen );
+}
+
+//____________________________________________________________________________//
+
+auto_test_unit_registrar::auto_test_unit_registrar( int )
+{
+    if( curr_ts_store().size() == 0 )
+        return; // report error?
+
+    curr_ts_store().pop_back();
+}
+
+//____________________________________________________________________________//
+
+std::list<test_suite*>&
+auto_test_unit_registrar::curr_ts_store()
+{
+    static std::list<test_suite*> inst( 1, &framework::master_test_suite() );
+    return inst;
+}
+
+//____________________________________________________________________________//
+
+} // namespace ut_detail
+
+// ************************************************************************** //
+// **************                global_fixture                ************** //
+// ************************************************************************** //
+
+global_fixture::global_fixture()
+{
+    framework::register_observer( *this );
+} 
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
diff --git a/ndnboost/test/impl/xml_log_formatter.ipp b/ndnboost/test/impl/xml_log_formatter.ipp
new file mode 100644
index 0000000..0bf6460
--- /dev/null
+++ b/ndnboost/test/impl/xml_log_formatter.ipp
@@ -0,0 +1,180 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : implements XML Log formatter
+// ***************************************************************************
+
+#ifndef BOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
+#define BOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
+
+// Boost.Test
+#include <ndnboost/test/output/xml_log_formatter.hpp>
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+#include <ndnboost/test/framework.hpp>
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+
+#include <ndnboost/test/utils/xml_printer.hpp>
+
+// Boost
+#include <ndnboost/version.hpp>
+
+// STL
+#include <iostream>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace output {
+
+static const_string tu_type_name( test_unit const& tu )
+{
+    return tu.p_type == tut_case ? "TestCase" : "TestSuite";
+}
+
+// ************************************************************************** //
+// **************               xml_log_formatter              ************** //
+// ************************************************************************** //
+
+void
+xml_log_formatter::log_start( std::ostream& ostr, counter_t )
+{
+    ostr  << "<TestLog>";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_finish( std::ostream& ostr )
+{
+    ostr  << "</TestLog>";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_build_info( std::ostream& ostr )
+{
+    ostr  << "<BuildInfo"
+            << " platform"  << attr_value() << BOOST_PLATFORM
+            << " compiler"  << attr_value() << BOOST_COMPILER
+            << " stl"       << attr_value() << BOOST_STDLIB
+            << " boost=\""  << BOOST_VERSION/100000     << "."
+                            << BOOST_VERSION/100 % 1000 << "."
+                            << BOOST_VERSION % 100      << '\"'
+            << "/>";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::test_unit_start( std::ostream& ostr, test_unit const& tu )
+{
+    ostr << "<" << tu_type_name( tu ) << " name" << attr_value() << tu.p_name.get() << ">";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::test_unit_finish( std::ostream& ostr, test_unit const& tu, unsigned long elapsed )
+{
+    if( tu.p_type == tut_case )
+        ostr << "<TestingTime>" << elapsed << "</TestingTime>";
+        
+    ostr << "</" << tu_type_name( tu ) << ">";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::test_unit_skipped( std::ostream& ostr, test_unit const& tu )
+{
+    ostr << "<" << tu_type_name( tu )
+         << " name"    << attr_value() << tu.p_name.get()
+         << " skipped" << attr_value() << "yes"
+         << "/>";
+}
+    
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_exception( std::ostream& ostr, log_checkpoint_data const& checkpoint_data, execution_exception const& ex )
+{
+    execution_exception::location const& loc = ex.where();
+
+    ostr << "<Exception file" << attr_value() << loc.m_file_name
+         << " line"           << attr_value() << loc.m_line_num;
+
+    if( !loc.m_function.is_empty() )
+        ostr << " function"   << attr_value() << loc.m_function;
+
+    ostr << ">" << cdata() << ex.what();
+
+    if( !checkpoint_data.m_file_name.is_empty() ) {
+        ostr << "<LastCheckpoint file" << attr_value() << checkpoint_data.m_file_name
+             << " line"                << attr_value() << checkpoint_data.m_line_num
+             << ">"
+             << cdata() << checkpoint_data.m_message
+             << "</LastCheckpoint>";
+    }
+
+    ostr << "</Exception>";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_entry_start( std::ostream& ostr, log_entry_data const& entry_data, log_entry_types let )
+{
+    static literal_string xml_tags[] = { "Info", "Message", "Warning", "Error", "FatalError" };
+
+    m_curr_tag = xml_tags[let];
+    ostr << '<' << m_curr_tag
+         << BOOST_TEST_L( " file" ) << attr_value() << entry_data.m_file_name
+         << BOOST_TEST_L( " line" ) << attr_value() << entry_data.m_line_num
+         << BOOST_TEST_L( "><![CDATA[" );
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_entry_value( std::ostream& ostr, const_string value )
+{
+    ostr << value;
+}
+
+//____________________________________________________________________________//
+
+void
+xml_log_formatter::log_entry_finish( std::ostream& ostr )
+{
+    ostr << BOOST_TEST_L( "]]></" ) << m_curr_tag << BOOST_TEST_L( ">" );
+
+    m_curr_tag.clear();
+}
+
+//____________________________________________________________________________//
+
+} // namespace output
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_XML_LOG_FORMATTER_IPP_020105GER
diff --git a/ndnboost/test/impl/xml_report_formatter.ipp b/ndnboost/test/impl/xml_report_formatter.ipp
new file mode 100644
index 0000000..92655ee
--- /dev/null
+++ b/ndnboost/test/impl/xml_report_formatter.ipp
@@ -0,0 +1,115 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : XML report formatter
+// ***************************************************************************
+
+#ifndef BOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
+#define BOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
+
+// Boost.Test
+#include <ndnboost/test/results_collector.hpp>
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+#include <ndnboost/test/output/xml_report_formatter.hpp>
+
+#include <ndnboost/test/utils/xml_printer.hpp>
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace output {
+
+void
+xml_report_formatter::results_report_start( std::ostream& ostr )
+{
+    ostr << "<TestResult>";
+}
+
+//____________________________________________________________________________//
+
+void
+xml_report_formatter::results_report_finish( std::ostream& ostr )
+{
+    ostr << "</TestResult>";
+}
+
+
+//____________________________________________________________________________//
+
+void
+xml_report_formatter::test_unit_report_start( test_unit const& tu, std::ostream& ostr )
+{
+    test_results const& tr = results_collector.results( tu.p_id );
+
+    const_string descr;
+
+    if( tr.passed() )
+        descr = "passed";
+    else if( tr.p_skipped )
+        descr = "skipped";
+    else if( tr.p_aborted )
+        descr = "aborted";
+    else
+        descr = "failed";
+
+    ostr << '<' << ( tu.p_type == tut_case ? "TestCase" : "TestSuite" ) 
+         << " name"     << attr_value() << tu.p_name.get()
+         << " result"   << attr_value() << descr
+         << " assertions_passed"        << attr_value() << tr.p_assertions_passed
+         << " assertions_failed"        << attr_value() << tr.p_assertions_failed
+         << " expected_failures"        << attr_value() << tr.p_expected_failures;
+
+    if( tu.p_type == tut_suite )
+        ostr << " test_cases_passed"    << attr_value() << tr.p_test_cases_passed
+             << " test_cases_failed"    << attr_value() << tr.p_test_cases_failed
+             << " test_cases_skipped"   << attr_value() << tr.p_test_cases_skipped
+             << " test_cases_aborted"   << attr_value() << tr.p_test_cases_aborted;
+             
+    
+    ostr << '>';
+}
+
+//____________________________________________________________________________//
+
+void
+xml_report_formatter::test_unit_report_finish( test_unit const& tu, std::ostream& ostr )
+{
+    ostr << "</" << ( tu.p_type == tut_case ? "TestCase" : "TestSuite" ) << '>';
+}
+
+//____________________________________________________________________________//
+
+void
+xml_report_formatter::do_confirmation_report( test_unit const& tu, std::ostream& ostr )
+{
+    test_unit_report_start( tu, ostr );
+    test_unit_report_finish( tu, ostr );    
+}
+
+//____________________________________________________________________________//
+
+} // namespace output
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_XML_REPORT_FORMATTER_IPP_020105GER
diff --git a/ndnboost/test/interaction_based.hpp b/ndnboost/test/interaction_based.hpp
new file mode 100644
index 0000000..bb38d21
--- /dev/null
+++ b/ndnboost/test/interaction_based.hpp
@@ -0,0 +1,262 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : Facilities to perform interaction-based testing
+// ***************************************************************************
+
+#ifndef BOOST_TEST_INTERACTION_BASED_HPP_112105GER
+#define BOOST_TEST_INTERACTION_BASED_HPP_112105GER
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+#include <ndnboost/test/detail/global_typedef.hpp>
+
+#include <ndnboost/test/utils/wrap_stringstream.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+// Boost
+#include <ndnboost/lexical_cast.hpp>
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************               BOOST_ITEST_EPOINT             ************** //
+// ************************************************************************** //
+
+#define BOOST_ITEST_EPOINT( description ) \
+    ::ndnboost::itest::manager::instance().exception_point( BOOST_TEST_L(__FILE__), __LINE__, description )
+/**/
+
+// ************************************************************************** //
+// **************               BOOST_ITEST_DPOINT             ************** //
+// ************************************************************************** //
+
+#define BOOST_ITEST_DPOINT() \
+    ::ndnboost::itest::manager::instance().decision_point( BOOST_TEST_L(__FILE__), __LINE__ )
+/**/
+
+// ************************************************************************** //
+// **************                BOOST_ITEST_SCOPE             ************** //
+// ************************************************************************** //
+
+#define BOOST_ITEST_SCOPE( scope_name ) \
+    ::ndnboost::itest::scope_guard itest_scope_guard ## __LINE__( BOOST_TEST_L(__FILE__), __LINE__, BOOST_STRINGIZE(scope_name) )
+/**/
+
+// ************************************************************************** //
+// **************                 BOOST_ITEST_NEW              ************** //
+// ************************************************************************** //
+
+#define BOOST_ITEST_NEW( type_name ) \
+    new ( ::ndnboost::itest::location( BOOST_TEST_L(__FILE__), __LINE__ ) ) type_name
+/**/
+
+// ************************************************************************** //
+// **************              BOOST_ITEST_DATA_FLOW           ************** //
+// ************************************************************************** //
+
+#define BOOST_ITEST_DATA_FLOW( v ) \
+    ::ndnboost::itest::manager::instance().generic_data_flow( v )
+/**/
+
+// ************************************************************************** //
+// **************               BOOST_ITEST_RETURN             ************** //
+// ************************************************************************** //
+
+#define BOOST_ITEST_RETURN( type, default_value ) \
+    ::ndnboost::itest::manager::instance().generic_return<type>( default_value )
+/**/
+
+// ************************************************************************** //
+// **************              BOOST_ITEST_MOCK_FUNC           ************** //
+// ************************************************************************** //
+
+#define BOOST_ITEST_MOCK_FUNC( function_name )          \
+    BOOST_ITEST_SCOPE( function_name );                 \
+    BOOST_ITEST_EPOINT( 0 );                            \
+    return ::ndnboost::itest::mock_object<>::prototype();  \
+/**/
+
+namespace ndnboost {
+
+namespace itest { // interaction-based testing
+
+using unit_test::const_string;
+
+// ************************************************************************** //
+// **************                    manager                   ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL manager {
+public:
+    // instance access
+    static manager&     instance() { return *instance_ptr(); }
+
+    // Mock objects interface hooks
+    virtual void        exception_point( const_string /*file*/, 
+                                         std::size_t /*line_num*/, 
+                                         const_string /*descr*/ ){}
+    virtual bool        decision_point( const_string /*file*/, 
+                                        std::size_t /*line_num*/ )          { return true; }
+    virtual unsigned    enter_scope( const_string /*file*/, 
+                                     std::size_t /*line_num*/,
+                                     const_string /*scope_name*/){ return 0; }
+    virtual void        leave_scope( unsigned )                             {}
+    virtual void        allocated( const_string /*file*/, 
+                                   std::size_t /*line_num*/, 
+                                   void* /*p*/, std::size_t /*s*/ )         {}
+    virtual void        freed( void* /*p*/ )                                {}
+    virtual void        data_flow( const_string /*d*/ )                     {}
+    virtual std::string return_value( const_string /*default_value */ )     { return ""; }
+
+    template<typename T>
+    void                generic_data_flow( T const& t )
+    {
+        wrap_stringstream ws;
+
+        data_flow( (ws << t).str() );
+    }
+    template<typename T, typename DefaultValueType>
+    T                   generic_return( DefaultValueType const& dv )
+    {
+        wrap_stringstream ws;
+
+        std::string const& res = return_value( (ws << dv).str() );
+
+        if( res.empty() )
+            return dv;
+
+        return lexical_cast<T>( res );
+    }
+
+protected:
+    manager();
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) 
+public:
+#endif
+    BOOST_TEST_PROTECTED_VIRTUAL ~manager();
+
+private:
+    struct dummy_constr{};
+    explicit manager( dummy_constr* ) {}
+
+    static manager*     instance_ptr( bool reset = false, manager* ptr = 0 );
+}; // manager
+
+// ************************************************************************** //
+// **************                  scope_guard                 ************** //
+// ************************************************************************** //
+
+class scope_guard {
+public:
+    // Constructor
+    scope_guard( const_string file, std::size_t line_num, const_string scope_name )
+    {
+        m_scope_index = manager::instance().enter_scope( file, line_num, scope_name );
+    }
+    ~scope_guard()
+    {
+        manager::instance().leave_scope( m_scope_index );
+    }
+
+    unsigned m_scope_index;
+};
+
+// ************************************************************************** //
+// **************                    location                  ************** //
+// ************************************************************************** //
+
+struct location {
+    location( const_string file, std::size_t line ) 
+    : m_file_name( file )
+    , m_line_num( line )
+    {}
+
+    const_string    m_file_name;
+    std::size_t     m_line_num;
+};
+
+}  // namespace itest
+
+} // namespace ndnboost
+
+// ************************************************************************** //
+// **************              operator new overload           ************** //
+// ************************************************************************** //
+
+#if !defined(BOOST_ITEST_NO_NEW_OVERLOADS)
+
+// STL
+#include <cstdlib>
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::malloc; using ::free; }
+# endif
+# ifdef _CRTDBG_MAP_ALLOC
+namespace std { using ::_malloc_dbg; using ::_free_dbg; }
+# endif
+
+inline void*
+operator new( std::size_t s, ::ndnboost::itest::location const& l )
+{
+    void* res = std::malloc(s ? s : 1);
+
+    if( res )
+        ::ndnboost::itest::manager::instance().allocated( l.m_file_name, l.m_line_num, res, s );
+    else
+        throw std::bad_alloc();
+        
+    return res;
+}
+
+//____________________________________________________________________________//
+
+inline void*
+operator new[]( std::size_t s, ::ndnboost::itest::location const& l )
+{
+    void* res = std::malloc(s ? s : 1);
+
+    if( res )
+        ::ndnboost::itest::manager::instance().allocated( l.m_file_name, l.m_line_num, res, s );
+    else
+        throw std::bad_alloc();
+        
+    return res;
+}
+
+//____________________________________________________________________________//
+
+inline void
+operator delete( void* p, ::ndnboost::itest::location const& )
+{
+    ::ndnboost::itest::manager::instance().freed( p );
+
+    std::free( p );
+}
+
+//____________________________________________________________________________//
+
+inline void
+operator delete[]( void* p, ::ndnboost::itest::location const& )
+{
+    ::ndnboost::itest::manager::instance().freed( p );
+
+    std::free( p );
+}
+
+//____________________________________________________________________________//
+
+#endif
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_INTERACTION_BASED_HPP_112105GER
diff --git a/ndnboost/test/minimal.hpp b/ndnboost/test/minimal.hpp
new file mode 100644
index 0000000..9f4ca44
--- /dev/null
+++ b/ndnboost/test/minimal.hpp
@@ -0,0 +1,143 @@
+//  (C) Copyright Gennadiy Rozental 2002-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : simple minimal testing definitions and implementation
+// ***************************************************************************
+
+#ifndef BOOST_TEST_MINIMAL_HPP_071894GER
+#define BOOST_TEST_MINIMAL_HPP_071894GER
+
+#define BOOST_CHECK(exp)       \
+  ( (exp)                      \
+      ? static_cast<void>(0)   \
+      : ndnboost::minimal_test::report_error(#exp,__FILE__,__LINE__, BOOST_CURRENT_FUNCTION) )
+
+#define BOOST_REQUIRE(exp)     \
+  ( (exp)                      \
+      ? static_cast<void>(0)   \
+      : ndnboost::minimal_test::report_critical_error(#exp,__FILE__,__LINE__,BOOST_CURRENT_FUNCTION))
+
+#define BOOST_ERROR( msg_ )    \
+        ndnboost::minimal_test::report_error( (msg_),__FILE__,__LINE__, BOOST_CURRENT_FUNCTION, true )
+#define BOOST_FAIL( msg_ )     \
+        ndnboost::minimal_test::report_critical_error( (msg_),__FILE__,__LINE__, BOOST_CURRENT_FUNCTION, true )
+
+//____________________________________________________________________________//
+
+// Boost.Test
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/impl/execution_monitor.ipp>
+#include <ndnboost/test/impl/debug.ipp>
+#include <ndnboost/test/utils/class_properties.hpp>
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+
+// Boost
+#include <ndnboost/cstdlib.hpp>            // for exit codes#include <ndnboost/cstdlib.hpp>            // for exit codes
+#include <ndnboost/current_function.hpp>   // for BOOST_CURRENT_FUNCTION
+
+// STL
+#include <iostream>                     // std::cerr, std::endl
+#include <string>                       // std::string
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+int test_main( int argc, char* argv[] );  // prototype for users test_main()
+
+namespace ndnboost {
+namespace minimal_test {
+
+typedef ndnboost::unit_test::const_string const_string;
+
+inline unit_test::counter_t& errors_counter() { static unit_test::counter_t ec = 0; return ec; }
+
+inline void
+report_error( const char* msg, const char* file, int line, const_string func_name, bool is_msg = false )
+{
+    ++errors_counter();
+    std::cerr << file << "(" << line << "): ";
+
+    if( is_msg )
+        std::cerr << msg;
+    else
+        std::cerr << "test " << msg << " failed";
+
+    if( func_name != "(unknown)" )
+        std::cerr << " in function: '" << func_name << "'";
+
+    std::cerr << std::endl;
+}
+
+inline void
+report_critical_error( const char* msg, const char* file, int line, const_string func_name, bool is_msg = false )
+{
+    report_error( msg, file, line, func_name, is_msg );
+
+    throw ndnboost::execution_aborted();
+}
+
+class caller {
+public:
+    // constructor
+    caller( int argc, char** argv )
+    : m_argc( argc ), m_argv( argv ) {}
+
+    // execution monitor hook implementation
+    int operator()() { return test_main( m_argc, m_argv ); }
+
+private:
+    // Data members
+    int         m_argc;
+    char**      m_argv;
+}; // monitor
+
+} // namespace minimal_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+int BOOST_TEST_CALL_DECL main( int argc, char* argv[] )
+{
+    using namespace ndnboost::minimal_test;
+
+    try {
+        ::ndnboost::execution_monitor ex_mon;
+        int run_result = ex_mon.execute( caller( argc, argv ) );
+
+        BOOST_CHECK( run_result == 0 || run_result == ndnboost::exit_success );
+    }
+    catch( ndnboost::execution_exception const& exex ) {
+        if( exex.code() != ndnboost::execution_exception::no_error )
+            BOOST_ERROR( (std::string( "exception \"" ).
+                            append( exex.what().begin(), exex.what().end() ).
+                            append( "\" caught" ) ).c_str() );
+        std::cerr << "\n**** Testing aborted.";
+    }
+
+    if( ndnboost::minimal_test::errors_counter() != 0 ) {
+        std::cerr << "\n**** " << errors_counter()
+                  << " error" << (errors_counter() > 1 ? "s" : "" ) << " detected\n";
+
+        return ndnboost::exit_test_failure;
+    }
+
+    std::cout << "\n**** no errors detected\n";
+    
+    return ndnboost::exit_success;
+}
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_MINIMAL_HPP_071894GER
diff --git a/ndnboost/test/mock_object.hpp b/ndnboost/test/mock_object.hpp
new file mode 100644
index 0000000..f2ad7d0
--- /dev/null
+++ b/ndnboost/test/mock_object.hpp
@@ -0,0 +1,328 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : Facilities to perform exception safety_tests
+// ***************************************************************************
+
+#ifndef BOOST_TEST_MOCK_OBJECT_HPP_112205GER
+#define BOOST_TEST_MOCK_OBJECT_HPP_112205GER
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+#include <ndnboost/test/interaction_based.hpp>
+
+// Boost
+#include <ndnboost/preprocessor/punctuation/comma.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace itest {
+
+// ************************************************************************** //
+// **************                mock_object_base              ************** //
+// ************************************************************************** //
+
+class mock_object_base {
+public:
+    mock_object_base() {}
+
+    template<typename T1>
+    mock_object_base( T1 const& ) {}
+
+    template<typename T1, typename T2>
+    mock_object_base( T1 const&, T2 const& ) {}
+
+    template<typename T1, typename T2, typename T3>
+    mock_object_base( T1 const&, T2 const&, T3 const& ) {}
+
+    template<typename T1, typename T2, typename T3, typename T4>
+    mock_object_base( T1 const&, T2 const&, T3 const&, T4 const& ) {}
+
+    template<typename T1, typename T2, typename T3, typename T4, typename T5>
+    mock_object_base( T1 const&, T2 const&, T3 const&, T4 const&, T5 const& ) {}
+};
+
+// ************************************************************************** //
+// **************      mock_object implementation helpers      ************** //
+// ************************************************************************** //
+
+#define MO_OP_IMPL( op, descr, ret )                        \
+    BOOST_ITEST_SCOPE( mock_object::operator op );          \
+    BOOST_ITEST_EPOINT( descr );                            \
+    return ret                                              \
+/**/
+
+#define MO_UNARY_OP( op, descr )                            \
+self_type const& operator op() const                        \
+{                                                           \
+    MO_OP_IMPL( op, descr, prototype() );                   \
+}                                                           \
+/**/
+
+#define MO_UNARY_BOOL_OP( op, descr )                       \
+bool operator op() const                                    \
+{                                                           \
+    MO_OP_IMPL( op, descr, (!!BOOST_ITEST_DPOINT()) );      \
+}                                                           \
+/**/
+
+#define MO_BINARY_OP( op, descr )                           \
+template<int i1, typename Base1,int i2, typename Base2>     \
+inline mock_object<i1,Base1> const&                         \
+operator op( mock_object<i1,Base1> const& mo,               \
+             mock_object<i2,Base2> const& )                 \
+{                                                           \
+    MO_OP_IMPL( op, descr, mo );                            \
+}                                                           \
+                                                            \
+template<int i, typename Base, typename T>                  \
+inline mock_object<i,Base> const&                           \
+operator op( mock_object<i,Base> const& mo, T const& )      \
+{                                                           \
+    MO_OP_IMPL( op, descr, mo );                            \
+}                                                           \
+                                                            \
+template<int i, typename Base, typename T>                  \
+inline mock_object<i,Base> const&                           \
+operator op( T const&, mock_object<i,Base> const& mo )      \
+{                                                           \
+    MO_OP_IMPL( op, descr, mo );                            \
+}                                                           \
+/**/
+
+#define MO_BINARY_BOOL_OP( op, descr )                      \
+template<int i1, typename Base1,int i2, typename Base2>     \
+inline bool                                                 \
+operator op( mock_object<i1,Base1> const&,                  \
+             mock_object<i2,Base2> const& )                 \
+{                                                           \
+    MO_OP_IMPL( op, descr, BOOST_ITEST_DPOINT() );          \
+}                                                           \
+                                                            \
+template<int i, typename Base, typename T>                  \
+inline bool                                                 \
+operator op( mock_object<i,Base> const&, T const& )         \
+{                                                           \
+    MO_OP_IMPL( op, descr, BOOST_ITEST_DPOINT() );          \
+}                                                           \
+                                                            \
+template<int i, typename Base, typename T>                  \
+inline bool                                                 \
+operator op( T const&, mock_object<i,Base> const& )         \
+{                                                           \
+    MO_OP_IMPL( op, descr, BOOST_ITEST_DPOINT() );          \
+}                                                           \
+/**/
+
+// ************************************************************************** //
+// **************                  mock_object                 ************** //
+// ************************************************************************** //
+
+template<int i = 0, typename Base=mock_object_base>
+class mock_object;
+
+template<int i, typename Base>
+class mock_object : public Base {
+    // Private typeefs
+    typedef mock_object<i,Base> self_type;
+    struct dummy { void nonnull() {}; };
+    typedef void (dummy::*safe_bool)();
+
+    // prototype constructor
+    mock_object( dummy* ) {}
+
+public:
+    static mock_object& prototype()
+    {
+        static mock_object p( reinterpret_cast<dummy*>(0) ); 
+        return p;
+    }
+
+    // Constructors
+    mock_object()
+    {
+        BOOST_ITEST_SCOPE( mock_object::mock_object );
+        BOOST_ITEST_EPOINT( "Mock object default constructor" );
+    }
+
+    template<typename T1>
+    mock_object( T1 const& arg1 )
+    : mock_object_base( arg1 )
+    {
+        BOOST_ITEST_SCOPE( mock_object::mock_object );
+        BOOST_ITEST_EPOINT( "Mock object constructor" );
+    }
+
+    template<typename T1, typename T2>
+    mock_object( T1 const& arg1, T2 const& arg2 )
+    : mock_object_base( arg1, arg2 )
+    {
+        BOOST_ITEST_SCOPE( mock_object::mock_object );
+        BOOST_ITEST_EPOINT( "Mock object constructor" );
+    }
+
+    template<typename T1, typename T2, typename T3>
+    mock_object( T1 const& arg1, T2 const& arg2, T3 const& arg3 )
+    : mock_object_base( arg1, arg2, arg3 )
+    {
+        BOOST_ITEST_SCOPE( mock_object::mock_object );
+        BOOST_ITEST_EPOINT( "Mock object constructor" );
+    }
+
+    template<typename T1, typename T2, typename T3, typename T4>
+    mock_object( T1 const& arg1, T2 const& arg2, T3 const& arg3, T4 const& arg4 )
+    : mock_object_base( arg1, arg2, arg3, arg4 )
+    {
+        BOOST_ITEST_SCOPE( mock_object::mock_object );
+        BOOST_ITEST_EPOINT( "Mock object constructor" );
+    }
+
+    template<typename T1, typename T2, typename T3, typename T4, typename T5>
+    mock_object( T1 const& arg1, T2 const& arg2, T3 const& arg3, T4 const& arg4, T5 const& arg5 )
+    : mock_object_base( arg1, arg2, arg3, arg4, arg5 )
+    {
+        BOOST_ITEST_SCOPE( mock_object::mock_object );
+        BOOST_ITEST_EPOINT( "Mock object constructor" );
+    }
+
+    mock_object( mock_object const& )
+    {
+        BOOST_ITEST_SCOPE( mock_object::mock_object );
+        BOOST_ITEST_EPOINT( "Mock object copy constructor" );
+    }
+
+    // assignment
+    self_type const&    operator =( mock_object const& ) const
+    {
+        MO_OP_IMPL( =, "Copy assignment", prototype() );
+    }
+
+    template <typename T>
+    self_type const&    operator =( T const& ) const
+    {
+        MO_OP_IMPL( =, "Copy assignment", prototype() );
+    }
+
+    // Unary operators
+    MO_UNARY_BOOL_OP( !, "Logical NOT operator" )
+    MO_UNARY_OP( &, "Address-of operator" )
+    MO_UNARY_OP( ~, "One's complement operator" )
+    MO_UNARY_OP( *, "Pointer dereference" )
+    MO_UNARY_OP( +, "Unary plus" )
+
+    // Increment and Decrement
+    MO_UNARY_OP( ++, "Prefix increment" )
+    MO_UNARY_OP( --, "Prefix decrement" )
+    self_type const&    operator ++(int) const
+    {
+        MO_OP_IMPL( ++, "Postfix increment", prototype() );
+    }
+    self_type const&    operator --(int) const
+    {
+        MO_OP_IMPL( --, "Postfix decrement", prototype() );
+    }
+
+    // Bool context convertion
+    operator safe_bool() const
+    {
+        MO_OP_IMPL( safe_bool, "Bool context conversion",
+                    (BOOST_ITEST_DPOINT() ? 0 : &dummy::nonnull) );
+    }
+
+    // Function-call operators
+    self_type const&    operator ()() const
+    {
+        MO_OP_IMPL( (), "0-arity function-call", prototype() );
+    }
+    template<typename T1>
+    self_type const&    operator ()( T1 const& arg1 ) const
+    {
+        MO_OP_IMPL( (), "1-arity function-call", prototype() );
+    }
+    template<typename T1, typename T2>
+    self_type const&    operator ()( T1 const&, T2 const& ) const
+    {
+        MO_OP_IMPL( (), "2-arity function-call", prototype() );
+    }
+    template<typename T1, typename T2, typename T3>
+    self_type const&    operator ()( T1 const&, T2 const&, T3 const& ) const
+    {
+        MO_OP_IMPL( (), "3-arity function-call", prototype() );
+    }
+    template<typename T1, typename T2, typename T3, typename T4>
+    self_type const&    operator ()( T1 const&, T2 const&, T3 const&, T4 const& ) const
+    {
+        MO_OP_IMPL( (), "4-arity function-call", prototype() );
+    }
+    template<typename T1, typename T2, typename T3, typename T4, typename T5>
+    self_type const&    operator ()( T1 const&, T2 const&, T3 const&, T4 const&, T5 const& ) const
+    {
+        MO_OP_IMPL( (), "5-arity function-call", prototype() );
+    }
+
+    // Substripting
+    template<typename T>
+    self_type const&    operator []( T const& ) const
+    {
+        MO_OP_IMPL( [], "Substripting", prototype() );
+    }
+
+    // Class member access
+    self_type const*    operator->() const
+    {
+        MO_OP_IMPL( ->, "Class member access", this );
+    }
+};
+
+// !! MO_BINARY_OP( BOOST_PP_COMMA(), "Comma operator" )
+
+MO_BINARY_BOOL_OP( !=, "Inequality" )
+MO_BINARY_OP( %, "Modulus" )
+MO_BINARY_OP( %=, "Modulus/assignment" )
+MO_BINARY_OP( &, "Bitwise AND" )
+MO_BINARY_BOOL_OP( &&, "Logical AND" )
+MO_BINARY_OP( &=, "Bitwise AND/assignment" )
+MO_BINARY_OP( *, "Multiplication" )
+MO_BINARY_OP( *=, "Multiplication/assignment" )
+MO_BINARY_OP( +, "Addition" )
+MO_BINARY_OP( +=, "Addition/assignment" )
+//MO_BINARY_OP( -, "Subtraction" )
+MO_BINARY_OP( -=, "Subtraction/assignment" )
+MO_BINARY_OP( ->*, "Pointer-to-member selection" )
+MO_BINARY_OP( /, "Division" )
+MO_BINARY_OP( /=, "Division/assignment" )
+MO_BINARY_BOOL_OP( <, "Less than" )
+MO_BINARY_OP( <<=, "Left shift/assignment" )
+MO_BINARY_BOOL_OP( <=, "Less than or equal to" )
+MO_BINARY_BOOL_OP( ==, "Equality" )
+MO_BINARY_BOOL_OP( >, "Greater than" )
+MO_BINARY_BOOL_OP( >=, "Greater than or equal to" )
+MO_BINARY_OP( >>=, "Right shift/assignment" )
+MO_BINARY_OP( ^, "Exclusive OR" )
+MO_BINARY_OP( ^=, "Exclusive OR/assignment" )
+MO_BINARY_OP( |, "Bitwise inclusive OR" )
+MO_BINARY_OP( |=, "Bitwise inclusive OR/assignment" )
+MO_BINARY_BOOL_OP( ||, "Logical OR" )
+
+MO_BINARY_OP( <<, "Left shift" )
+MO_BINARY_OP( >>, "Right shift" )
+
+} // namespace itest
+
+} // namespace ndnboost
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_MOCK_OBJECT_HPP_112205GER
diff --git a/ndnboost/test/output/compiler_log_formatter.hpp b/ndnboost/test/output/compiler_log_formatter.hpp
new file mode 100644
index 0000000..acef150
--- /dev/null
+++ b/ndnboost/test/output/compiler_log_formatter.hpp
@@ -0,0 +1,68 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : contains compiler like Log formatter definition
+// ***************************************************************************
+
+#ifndef BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
+#define BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
+
+// Boost.Test
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/unit_test_log_formatter.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace output {
+
+// ************************************************************************** //
+// **************             compiler_log_formatter           ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL compiler_log_formatter : public unit_test_log_formatter {
+public:
+    // Formatter interface
+    void    log_start( std::ostream&, counter_t test_cases_amount );
+    void    log_finish( std::ostream& );
+    void    log_build_info( std::ostream& );
+
+    void    test_unit_start( std::ostream&, test_unit const& tu );
+    void    test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed );
+    void    test_unit_skipped( std::ostream&, test_unit const& tu );
+
+    void    log_exception( std::ostream&, log_checkpoint_data const&, execution_exception const& ex );
+
+    void    log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let );
+    void    log_entry_value( std::ostream&, const_string value );
+    void    log_entry_value( std::ostream&, lazy_ostream const& value );
+    void    log_entry_finish( std::ostream& );
+
+protected:
+    virtual void    print_prefix( std::ostream&, const_string file, std::size_t line );
+};
+
+} // namespace output
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_COMPILER_LOG_FORMATTER_HPP_020105GER
diff --git a/ndnboost/test/output/plain_report_formatter.hpp b/ndnboost/test/output/plain_report_formatter.hpp
new file mode 100644
index 0000000..a9bd022
--- /dev/null
+++ b/ndnboost/test/output/plain_report_formatter.hpp
@@ -0,0 +1,62 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : plain report formatter implementation
+// ***************************************************************************
+
+#ifndef BOOST_TEST_PLAIN_REPORT_FORMATTER_HPP_020105GER
+#define BOOST_TEST_PLAIN_REPORT_FORMATTER_HPP_020105GER
+
+// Boost.Test
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/results_reporter.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace output {
+
+// ************************************************************************** //
+// **************             plain_report_formatter           ************** //
+// ************************************************************************** //
+
+class plain_report_formatter : public results_reporter::format {
+public:
+    // Formatter interface
+    void    results_report_start( std::ostream& ostr );
+    void    results_report_finish( std::ostream& ostr );
+
+    void    test_unit_report_start( test_unit const&, std::ostream& ostr );
+    void    test_unit_report_finish( test_unit const&, std::ostream& ostr );
+
+    void    do_confirmation_report( test_unit const&, std::ostream& ostr );
+
+private:
+    // Data members
+    counter_t m_indent;
+};
+
+} // namespace output
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_PLAIN_REPORT_FORMATTER_HPP_020105GER
diff --git a/ndnboost/test/output/xml_log_formatter.hpp b/ndnboost/test/output/xml_log_formatter.hpp
new file mode 100644
index 0000000..59ffdcc
--- /dev/null
+++ b/ndnboost/test/output/xml_log_formatter.hpp
@@ -0,0 +1,72 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : contains XML Log formatter definition
+// ***************************************************************************
+
+#ifndef BOOST_TEST_XML_LOG_FORMATTER_020105GER
+#define BOOST_TEST_XML_LOG_FORMATTER_020105GER
+
+// Boost.Test
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/unit_test_log_formatter.hpp>
+
+// STL
+#include <cstddef> // std::size_t
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace output {
+
+// ************************************************************************** //
+// **************               xml_log_formatter              ************** //
+// ************************************************************************** //
+
+class xml_log_formatter : public unit_test_log_formatter {
+public:
+    // Formatter interface
+    void    log_start( std::ostream&, counter_t test_cases_amount );
+    void    log_finish( std::ostream& );
+    void    log_build_info( std::ostream& );
+
+    void    test_unit_start( std::ostream&, test_unit const& tu );
+    void    test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed );
+    void    test_unit_skipped( std::ostream&, test_unit const& tu );
+
+    void    log_exception( std::ostream&, log_checkpoint_data const&, execution_exception const& ex );
+
+    void    log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let );
+    using   unit_test_log_formatter::log_entry_value; // bring base class functions into overload set
+    void    log_entry_value( std::ostream&, const_string value );
+    void    log_entry_finish( std::ostream& );
+
+private:
+    // Data members
+    const_string    m_curr_tag;
+};
+
+} // namespace output
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_XML_LOG_FORMATTER_020105GER
diff --git a/ndnboost/test/output/xml_report_formatter.hpp b/ndnboost/test/output/xml_report_formatter.hpp
new file mode 100644
index 0000000..17fbe8d
--- /dev/null
+++ b/ndnboost/test/output/xml_report_formatter.hpp
@@ -0,0 +1,58 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : XML report formatter implementation
+// ***************************************************************************
+
+#ifndef BOOST_TEST_XML_REPORT_FORMATTER_HPP_020105GER
+#define BOOST_TEST_XML_REPORT_FORMATTER_HPP_020105GER
+
+// Boost.Test
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/results_reporter.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace output {
+
+// ************************************************************************** //
+// **************              xml_report_formatter            ************** //
+// ************************************************************************** //
+
+class xml_report_formatter : public results_reporter::format {
+public:
+    // Formatter interface
+    void    results_report_start( std::ostream& ostr );
+    void    results_report_finish( std::ostream& ostr );
+
+    void    test_unit_report_start( test_unit const&, std::ostream& ostr );
+    void    test_unit_report_finish( test_unit const&, std::ostream& ostr );
+
+    void    do_confirmation_report( test_unit const&, std::ostream& ostr );
+};
+
+} // namespace output
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_XML_REPORT_FORMATTER_HPP_020105GER
diff --git a/ndnboost/test/output_test_stream.hpp b/ndnboost/test/output_test_stream.hpp
new file mode 100644
index 0000000..a62aaef
--- /dev/null
+++ b/ndnboost/test/output_test_stream.hpp
@@ -0,0 +1,78 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : output_test_stream class definition
+// ***************************************************************************
+
+#ifndef BOOST_TEST_OUTPUT_TEST_STREAM_HPP_012705GER
+#define BOOST_TEST_OUTPUT_TEST_STREAM_HPP_012705GER
+
+// Boost.Test
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/utils/wrap_stringstream.hpp>
+#include <ndnboost/test/predicate_result.hpp>
+
+// STL
+#include <cstddef>          // for std::size_t
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************               output_test_stream             ************** //
+// ************************************************************************** //
+
+// class to be used to simplify testing of ostream-based output operations
+
+namespace ndnboost {
+
+namespace test_tools {
+
+class BOOST_TEST_DECL output_test_stream : public wrap_stringstream::wrapped_stream {
+    typedef unit_test::const_string const_string;
+    typedef predicate_result        result_type;
+public:
+    // Constructor
+    explicit        output_test_stream( const_string    pattern_file_name = const_string(),
+                                        bool            match_or_save     = true,
+                                        bool            text_or_binary    = true );
+
+    // Destructor
+    ~output_test_stream();
+
+    // checking function
+    result_type     is_empty( bool flush_stream = true );
+    result_type     check_length( std::size_t length, bool flush_stream = true );
+    result_type     is_equal( const_string arg_, bool flush_stream = true );
+    result_type     match_pattern( bool flush_stream = true );
+
+    // explicit flush
+    void            flush();
+
+private:
+    // helper functions
+    std::size_t     length();
+    void            sync();
+
+    struct Impl;
+    Impl*           m_pimpl;
+};
+
+} // namespace test_tools
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_OUTPUT_TEST_STREAM_HPP_012705GER
diff --git a/ndnboost/test/predicate_result.hpp b/ndnboost/test/predicate_result.hpp
new file mode 100644
index 0000000..13dc668
--- /dev/null
+++ b/ndnboost/test/predicate_result.hpp
@@ -0,0 +1,88 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : enhanced result for test predicate that include message explaining failure
+// ***************************************************************************
+
+#ifndef BOOST_TEST_PREDICATE_RESULT_HPP_012705GER
+#define BOOST_TEST_PREDICATE_RESULT_HPP_012705GER
+
+// Boost.Test
+#include <ndnboost/test/utils/class_properties.hpp>
+#include <ndnboost/test/utils/wrap_stringstream.hpp>
+#include <ndnboost/test/utils/basic_cstring/basic_cstring.hpp>
+
+// Boost
+#include <ndnboost/shared_ptr.hpp>
+#include <ndnboost/detail/workaround.hpp>
+
+// STL
+#include <cstddef>          // for std::size_t
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace test_tools {
+
+// ************************************************************************** //
+// **************                predicate_result              ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL predicate_result {
+    typedef unit_test::const_string      const_string;
+    struct dummy { void nonnull() {}; };
+    typedef void (dummy::*safe_bool)();
+
+public:
+    // Constructor
+    predicate_result( bool pv_ ) 
+    : p_predicate_value( pv_ )
+    {}
+
+    template<typename BoolConvertable>
+    predicate_result( BoolConvertable const& pv_ ) : p_predicate_value( !!pv_ ) {}
+
+    // Access methods
+    bool                operator!() const           { return !p_predicate_value; }
+    void                operator=( bool pv_ )       { p_predicate_value.value = pv_; }
+    operator            safe_bool() const           { return !!p_predicate_value ? &dummy::nonnull : 0; }
+
+    // Public properties
+    BOOST_READONLY_PROPERTY( bool, (predicate_result) ) p_predicate_value;
+
+    // Access methods
+    bool                has_empty_message() const   { return !m_message; }
+    wrap_stringstream&  message()
+    {
+        if( !m_message )
+            m_message.reset( new wrap_stringstream );
+
+        return *m_message;
+    }
+    const_string        message() const                   { return !m_message ? const_string() : const_string( m_message->str() ); }
+
+private:
+    // Data members
+    shared_ptr<wrap_stringstream> m_message;
+};
+
+} // namespace test_tools
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_PREDICATE_RESULT_HPP_012705GER
diff --git a/ndnboost/test/progress_monitor.hpp b/ndnboost/test/progress_monitor.hpp
new file mode 100644
index 0000000..bca78ad
--- /dev/null
+++ b/ndnboost/test/progress_monitor.hpp
@@ -0,0 +1,70 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : defines simple text based progress monitor
+// ***************************************************************************
+
+#ifndef BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
+#define BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
+
+// Boost.Test
+#include <ndnboost/test/test_observer.hpp>
+#include <ndnboost/test/utils/trivial_singleton.hpp>
+
+// STL
+#include <iosfwd>   // for std::ostream&
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                progress_monitor              ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL progress_monitor_t : public test_observer, public singleton<progress_monitor_t> {
+public:
+    // test observer interface
+    void    test_start( counter_t test_cases_amount );
+    void    test_finish() {}
+    void    test_aborted();
+
+    void    test_unit_start( test_unit const& ) {}
+    void    test_unit_finish( test_unit const&, unsigned long );
+    void    test_unit_skipped( test_unit const& );
+    void    test_unit_aborted( test_unit const& ) {}
+
+    void    assertion_result( bool ) {}
+    void    exception_caught( execution_exception const& ) {}
+
+    // configuration
+    void    set_stream( std::ostream& );
+
+private:
+    BOOST_TEST_SINGLETON_CONS( progress_monitor_t );
+}; // progress_monitor_t
+
+BOOST_TEST_SINGLETON_INST( progress_monitor )
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
+
diff --git a/ndnboost/test/results_collector.hpp b/ndnboost/test/results_collector.hpp
new file mode 100644
index 0000000..858bc51
--- /dev/null
+++ b/ndnboost/test/results_collector.hpp
@@ -0,0 +1,112 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : defines class unit_test_result that is responsible for 
+//  gathering test results and presenting this information to end-user
+// ***************************************************************************
+
+#ifndef BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
+#define BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
+
+// Boost.Test
+#include <ndnboost/test/test_observer.hpp>
+
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/detail/fwd_decl.hpp>
+
+#include <ndnboost/test/utils/trivial_singleton.hpp>
+#include <ndnboost/test/utils/class_properties.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************      first failed assertion debugger hook    ************** //
+// ************************************************************************** //
+
+namespace {
+inline void first_failed_assertion() {}
+}
+
+// ************************************************************************** //
+// **************                 test_results                 ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_results {
+public:
+    test_results();
+
+    typedef BOOST_READONLY_PROPERTY( counter_t, (results_collector_t)(test_results)(results_collect_helper) ) counter_prop;
+    typedef BOOST_READONLY_PROPERTY( bool,      (results_collector_t)(test_results)(results_collect_helper) ) bool_prop;
+
+    counter_prop    p_assertions_passed;
+    counter_prop    p_assertions_failed;
+    counter_prop    p_expected_failures;
+    counter_prop    p_test_cases_passed;
+    counter_prop    p_test_cases_failed;
+    counter_prop    p_test_cases_skipped;
+    counter_prop    p_test_cases_aborted;
+    bool_prop       p_aborted;
+    bool_prop       p_skipped;
+
+    // "conclusion" methods
+    bool            passed() const;
+    int             result_code() const;
+
+    // collection helper
+    void            operator+=( test_results const& );
+
+    void            clear();
+};
+
+// ************************************************************************** //
+// **************               results_collector              ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL results_collector_t : public test_observer, public singleton<results_collector_t> {
+public:
+    // test_observer interface implementation
+    void                test_start( counter_t test_cases_amount );
+    void                test_finish();
+    void                test_aborted();
+
+    void                test_unit_start( test_unit const& );
+    void                test_unit_finish( test_unit const&, unsigned long elapsed );
+    void                test_unit_skipped( test_unit const& );
+    void                test_unit_aborted( test_unit const& );
+
+    void                assertion_result( bool passed );
+    void                exception_caught( execution_exception const& );
+
+    // results access
+    test_results const& results( test_unit_id ) const;
+
+private:
+    BOOST_TEST_SINGLETON_CONS( results_collector_t );
+};
+
+BOOST_TEST_SINGLETON_INST( results_collector )
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
+
diff --git a/ndnboost/test/results_reporter.hpp b/ndnboost/test/results_reporter.hpp
new file mode 100644
index 0000000..013523c
--- /dev/null
+++ b/ndnboost/test/results_reporter.hpp
@@ -0,0 +1,88 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : defines class unit_test_result that is responsible for 
+//  gathering test results and presenting this information to end-user
+// ***************************************************************************
+
+#ifndef BOOST_TEST_RESULTS_REPORTER_HPP_021205GER
+#define BOOST_TEST_RESULTS_REPORTER_HPP_021205GER
+
+// Boost.Test
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/detail/fwd_decl.hpp>
+
+// STL
+#include <iosfwd>   // for std::ostream&
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace results_reporter {
+
+// ************************************************************************** //
+// **************              formatter interface             ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL format {
+public:
+    // Destructor
+    virtual ~format() {}
+
+    virtual void    results_report_start( std::ostream& ostr ) = 0;
+    virtual void    results_report_finish( std::ostream& ostr ) = 0;
+
+    virtual void    test_unit_report_start( test_unit const&, std::ostream& ostr ) = 0;
+    virtual void    test_unit_report_finish( test_unit const&, std::ostream& ostr ) = 0;
+
+    virtual void    do_confirmation_report( test_unit const&, std::ostream& ostr ) = 0;
+};
+
+// ************************************************************************** //
+// **************              report configuration            ************** //
+// ************************************************************************** //
+
+BOOST_TEST_DECL void    set_level( report_level );
+BOOST_TEST_DECL void    set_stream( std::ostream& );
+BOOST_TEST_DECL void    set_format( output_format );
+BOOST_TEST_DECL void    set_format( results_reporter::format* );
+
+BOOST_TEST_DECL std::ostream& get_stream();
+
+// ************************************************************************** //
+// **************               report initiation              ************** //
+// ************************************************************************** //
+
+BOOST_TEST_DECL void    make_report( report_level l = INV_REPORT_LEVEL, test_unit_id = INV_TEST_UNIT_ID );
+inline void             confirmation_report( test_unit_id id = INV_TEST_UNIT_ID )   
+{ make_report( CONFIRMATION_REPORT, id ); }
+inline void             short_report( test_unit_id id = INV_TEST_UNIT_ID )
+{ make_report( SHORT_REPORT, id ); }
+inline void             detailed_report( test_unit_id id = INV_TEST_UNIT_ID )
+{ make_report( DETAILED_REPORT, id ); }
+
+} // namespace results_reporter
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_RESULTS_REPORTER_HPP_021205GER
+
diff --git a/ndnboost/test/test_observer.hpp b/ndnboost/test/test_observer.hpp
new file mode 100644
index 0000000..21a0846
--- /dev/null
+++ b/ndnboost/test/test_observer.hpp
@@ -0,0 +1,65 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : defines abstract interface for test observer
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TEST_OBSERVER_HPP_021005GER
+#define BOOST_TEST_TEST_OBSERVER_HPP_021005GER
+
+// Boost.Test
+#include <ndnboost/test/detail/fwd_decl.hpp>
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/detail/config.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                 test_observer                ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_observer {
+public:
+    // test observer interface
+    virtual void    test_start( counter_t /* test_cases_amount */ ) {}
+    virtual void    test_finish() {}
+    virtual void    test_aborted() {}
+
+    virtual void    test_unit_start( test_unit const& ) {}
+    virtual void    test_unit_finish( test_unit const&, unsigned long /* elapsed */ ) {}
+    virtual void    test_unit_skipped( test_unit const& ) {}
+    virtual void    test_unit_aborted( test_unit const& ) {}
+
+    virtual void    assertion_result( bool /* passed */ ) {}
+    virtual void    exception_caught( execution_exception const& ) {}
+
+    virtual int     priority() { return 0; }
+
+protected:
+    BOOST_TEST_PROTECTED_VIRTUAL ~test_observer() {}
+};
+
+} // unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TEST_OBSERVER_HPP_021005GER
+
diff --git a/ndnboost/test/test_tools.hpp b/ndnboost/test/test_tools.hpp
new file mode 100644
index 0000000..49a0f73
--- /dev/null
+++ b/ndnboost/test/test_tools.hpp
@@ -0,0 +1,719 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : contains definition for all test tools in test toolbox
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TEST_TOOLS_HPP_012705GER
+#define BOOST_TEST_TEST_TOOLS_HPP_012705GER
+
+// Boost.Test
+#include <ndnboost/test/predicate_result.hpp>
+#include <ndnboost/test/unit_test_log.hpp>
+#include <ndnboost/test/floating_point_comparison.hpp>
+
+#include <ndnboost/test/detail/config.hpp>
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/detail/workaround.hpp>
+
+#include <ndnboost/test/utils/wrap_stringstream.hpp>
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+#include <ndnboost/test/utils/lazy_ostream.hpp>
+
+// Boost
+#include <ndnboost/preprocessor/seq/for_each.hpp>
+#include <ndnboost/preprocessor/seq/size.hpp>
+#include <ndnboost/preprocessor/seq/enum.hpp> 
+#include <ndnboost/preprocessor/repetition/repeat.hpp>
+#include <ndnboost/preprocessor/punctuation/comma_if.hpp>
+#include <ndnboost/preprocessor/arithmetic/add.hpp>
+
+#include <ndnboost/limits.hpp>
+
+#include <ndnboost/type_traits/is_array.hpp>
+#include <ndnboost/type_traits/is_function.hpp>
+#include <ndnboost/type_traits/is_abstract.hpp>
+
+#include <ndnboost/mpl/or.hpp>
+
+// STL
+#include <cstddef>          // for std::size_t
+#include <iosfwd>
+#include <ios>              // for std::boolalpha
+#include <climits>          // for CHAR_BIT
+
+#ifdef BOOST_MSVC
+# pragma warning(disable: 4127) // conditional expression is constant
+#endif
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                    TOOL BOX                  ************** //
+// ************************************************************************** //
+
+// In macros below following argument abbreviations are used:
+// P - predicate
+// M - message
+// S - statement
+// E - exception
+// L - left argument
+// R - right argument
+// TL - tool level
+// CT - check type
+// ARGS - arguments list
+
+#define BOOST_TEST_TOOL_IMPL( func, P, check_descr, TL, CT )            \
+    ::ndnboost::test_tools::tt_detail::func(                               \
+        P,                                                              \
+        ::ndnboost::unit_test::lazy_ostream::instance() << check_descr,    \
+        BOOST_TEST_L(__FILE__),                                         \
+        static_cast<std::size_t>(__LINE__),                             \
+        ::ndnboost::test_tools::tt_detail::TL,                             \
+        ::ndnboost::test_tools::tt_detail::CT                              \
+/**/
+
+//____________________________________________________________________________//
+
+#define BOOST_CHECK_IMPL( P, check_descr, TL, CT )                  \
+do {                                                                \
+    BOOST_TEST_PASSPOINT();                                         \
+    BOOST_TEST_TOOL_IMPL( check_impl, P, check_descr, TL, CT ), 0 );\
+} while( ::ndnboost::test_tools::dummy_cond )                          \
+/**/
+
+//____________________________________________________________________________//
+
+#define BOOST_TEST_PASS_ARG_INFO( r, data, arg ) , arg, BOOST_STRINGIZE( arg )
+
+#define BOOST_CHECK_WITH_ARGS_IMPL( P, check_descr, TL, CT, ARGS )  \
+do {                                                                \
+    BOOST_TEST_PASSPOINT();                                         \
+    BOOST_TEST_TOOL_IMPL( check_frwd, P, check_descr, TL, CT )      \
+    BOOST_PP_SEQ_FOR_EACH( BOOST_TEST_PASS_ARG_INFO, '_', ARGS ) ); \
+} while( ::ndnboost::test_tools::dummy_cond )                          \
+/**/
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN( P )                     BOOST_CHECK_IMPL( (P), BOOST_TEST_STRINGIZE( P ), WARN, CHECK_PRED )
+#define BOOST_CHECK( P )                    BOOST_CHECK_IMPL( (P), BOOST_TEST_STRINGIZE( P ), CHECK, CHECK_PRED )
+#define BOOST_REQUIRE( P )                  BOOST_CHECK_IMPL( (P), BOOST_TEST_STRINGIZE( P ), REQUIRE, CHECK_PRED )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_MESSAGE( P, M )          BOOST_CHECK_IMPL( (P), M, WARN, CHECK_MSG )
+#define BOOST_CHECK_MESSAGE( P, M )         BOOST_CHECK_IMPL( (P), M, CHECK, CHECK_MSG )
+#define BOOST_REQUIRE_MESSAGE( P, M )       BOOST_CHECK_IMPL( (P), M, REQUIRE, CHECK_MSG )
+
+//____________________________________________________________________________//
+
+#define BOOST_ERROR( M )                    BOOST_CHECK_MESSAGE( false, M )
+#define BOOST_FAIL( M )                     BOOST_REQUIRE_MESSAGE( false, M )
+
+//____________________________________________________________________________//
+
+#define BOOST_CHECK_THROW_IMPL( S, E, P, prefix, TL )                                                   \
+    try {                                                                                               \
+        BOOST_TEST_PASSPOINT();                                                                         \
+        S;                                                                                              \
+        BOOST_CHECK_IMPL( false, "exception " BOOST_STRINGIZE( E ) " is expected", TL, CHECK_MSG ); }   \
+    catch( E const& ex ) {                                                                              \
+        ::ndnboost::unit_test::ut_detail::ignore_unused_variable_warning( ex );                            \
+        BOOST_CHECK_IMPL( P, prefix BOOST_STRINGIZE( E ) " is caught", TL, CHECK_MSG );                 \
+    }                                                                                                   \
+/**/
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_THROW( S, E )            BOOST_CHECK_THROW_IMPL( S, E, true, "exception ", WARN )
+#define BOOST_CHECK_THROW( S, E )           BOOST_CHECK_THROW_IMPL( S, E, true, "exception ", CHECK )
+#define BOOST_REQUIRE_THROW( S, E )         BOOST_CHECK_THROW_IMPL( S, E, true, "exception ", REQUIRE )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_EXCEPTION( S, E, P )     BOOST_CHECK_THROW_IMPL( S, E, P( ex ), "incorrect exception ", WARN )
+#define BOOST_CHECK_EXCEPTION( S, E, P )    BOOST_CHECK_THROW_IMPL( S, E, P( ex ), "incorrect exception ", CHECK )
+#define BOOST_REQUIRE_EXCEPTION( S, E, P )  BOOST_CHECK_THROW_IMPL( S, E, P( ex ), "incorrect exception ", REQUIRE )
+
+//____________________________________________________________________________//
+
+#define BOOST_CHECK_NO_THROW_IMPL( S, TL )                                                          \
+    try {                                                                                           \
+        S;                                                                                          \
+        BOOST_CHECK_IMPL( true, "no exceptions thrown by " BOOST_STRINGIZE( S ), TL, CHECK_MSG ); } \
+    catch( ... ) {                                                                                  \
+        BOOST_CHECK_IMPL( false, "exception thrown by " BOOST_STRINGIZE( S ), TL, CHECK_MSG );      \
+    }                                                                                               \
+/**/
+
+#define BOOST_WARN_NO_THROW( S )            BOOST_CHECK_NO_THROW_IMPL( S, WARN )
+#define BOOST_CHECK_NO_THROW( S )           BOOST_CHECK_NO_THROW_IMPL( S, CHECK )
+#define BOOST_REQUIRE_NO_THROW( S )         BOOST_CHECK_NO_THROW_IMPL( S, REQUIRE )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_EQUAL( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::equal_impl_frwd(), "", WARN, CHECK_EQUAL, (L)(R) )
+#define BOOST_CHECK_EQUAL( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::equal_impl_frwd(), "", CHECK, CHECK_EQUAL, (L)(R) )
+#define BOOST_REQUIRE_EQUAL( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::equal_impl_frwd(), "", REQUIRE, CHECK_EQUAL, (L)(R) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_NE( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::ne_impl(), "", WARN, CHECK_NE, (L)(R) )
+#define BOOST_CHECK_NE( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::ne_impl(), "", CHECK, CHECK_NE, (L)(R) )
+#define BOOST_REQUIRE_NE( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::ne_impl(), "", REQUIRE, CHECK_NE, (L)(R) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_LT( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::lt_impl(), "", WARN, CHECK_LT, (L)(R) )
+#define BOOST_CHECK_LT( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::lt_impl(), "", CHECK, CHECK_LT, (L)(R) )
+#define BOOST_REQUIRE_LT( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::lt_impl(), "", REQUIRE, CHECK_LT, (L)(R) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_LE( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::le_impl(), "", WARN, CHECK_LE, (L)(R) )
+#define BOOST_CHECK_LE( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::le_impl(), "", CHECK, CHECK_LE, (L)(R) )
+#define BOOST_REQUIRE_LE( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::le_impl(), "", REQUIRE, CHECK_LE, (L)(R) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_GT( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::gt_impl(), "", WARN, CHECK_GT, (L)(R) )
+#define BOOST_CHECK_GT( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::gt_impl(), "", CHECK, CHECK_GT, (L)(R) )
+#define BOOST_REQUIRE_GT( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::gt_impl(), "", REQUIRE, CHECK_GT, (L)(R) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_GE( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::ge_impl(), "", WARN, CHECK_GE, (L)(R) )
+#define BOOST_CHECK_GE( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::ge_impl(), "", CHECK, CHECK_GE, (L)(R) )
+#define BOOST_REQUIRE_GE( L, R ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::tt_detail::ge_impl(), "", REQUIRE, CHECK_GE, (L)(R) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_CLOSE( L, R, T ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::check_is_close, "", WARN, CHECK_CLOSE, \
+        (L)(R)(::ndnboost::test_tools::percent_tolerance(T)) )
+#define BOOST_CHECK_CLOSE( L, R, T ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::check_is_close, "", CHECK, CHECK_CLOSE, \
+        (L)(R)(::ndnboost::test_tools::percent_tolerance(T)) )
+#define BOOST_REQUIRE_CLOSE( L, R, T ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::check_is_close, "", REQUIRE, CHECK_CLOSE, \
+        (L)(R)(::ndnboost::test_tools::percent_tolerance(T)) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_CLOSE_FRACTION( L, R, T ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::check_is_close, "", WARN, CHECK_CLOSE_FRACTION, \
+    (L)(R)(::ndnboost::test_tools::fraction_tolerance(T)) )
+#define BOOST_CHECK_CLOSE_FRACTION( L, R, T ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::check_is_close, "", CHECK, CHECK_CLOSE_FRACTION, \
+    (L)(R)(::ndnboost::test_tools::fraction_tolerance(T)) )
+#define BOOST_REQUIRE_CLOSE_FRACTION( L, R, T ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::check_is_close, "", REQUIRE, CHECK_CLOSE_FRACTION, \
+    (L)(R)(::ndnboost::test_tools::fraction_tolerance(T)) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_SMALL( FPV, T ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::check_is_small, "", WARN, CHECK_SMALL, (FPV)(T) )
+#define BOOST_CHECK_SMALL( FPV, T ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::check_is_small, "", CHECK, CHECK_SMALL, (FPV)(T) )
+#define BOOST_REQUIRE_SMALL( FPV, T ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( ::ndnboost::test_tools::check_is_small, "", REQUIRE, CHECK_SMALL, (FPV)(T) )
+
+//____________________________________________________________________________//
+
+#define BOOST_WARN_PREDICATE( P, ARGS ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( P, BOOST_TEST_STRINGIZE( P ), WARN, CHECK_PRED_WITH_ARGS, ARGS )
+#define BOOST_CHECK_PREDICATE( P, ARGS ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( P, BOOST_TEST_STRINGIZE( P ), CHECK, CHECK_PRED_WITH_ARGS, ARGS )
+#define BOOST_REQUIRE_PREDICATE( P, ARGS ) \
+    BOOST_CHECK_WITH_ARGS_IMPL( P, BOOST_TEST_STRINGIZE( P ), REQUIRE, CHECK_PRED_WITH_ARGS, ARGS )
+
+//____________________________________________________________________________//
+
+#define BOOST_EQUAL_COLLECTIONS_IMPL( L_begin, L_end, R_begin, R_end, TL )      \
+    BOOST_TEST_TOOL_IMPL( check_impl, ::ndnboost::test_tools::tt_detail::equal_coll_impl( \
+        (L_begin), (L_end), (R_begin), (R_end) ), "", TL, CHECK_EQUAL_COLL ),   \
+    4,                                                                          \
+    BOOST_STRINGIZE( L_begin ), BOOST_STRINGIZE( L_end ),                       \
+    BOOST_STRINGIZE( R_begin ), BOOST_STRINGIZE( R_end ) )                      \
+/**/
+
+#define BOOST_WARN_EQUAL_COLLECTIONS( L_begin, L_end, R_begin, R_end )          \
+    BOOST_EQUAL_COLLECTIONS_IMPL( L_begin, L_end, R_begin, R_end, WARN )
+#define BOOST_CHECK_EQUAL_COLLECTIONS( L_begin, L_end, R_begin, R_end )         \
+    BOOST_EQUAL_COLLECTIONS_IMPL( L_begin, L_end, R_begin, R_end, CHECK )
+#define BOOST_REQUIRE_EQUAL_COLLECTIONS( L_begin, L_end, R_begin, R_end )       \
+    BOOST_EQUAL_COLLECTIONS_IMPL( L_begin, L_end, R_begin, R_end, REQUIRE )
+
+//____________________________________________________________________________//
+
+#define BOOST_BITWISE_EQUAL_IMPL( L, R, TL )                                    \
+    BOOST_TEST_TOOL_IMPL( check_impl,                                           \
+      ::ndnboost::test_tools::tt_detail::bitwise_equal_impl( (L), (R) ),           \
+      "", TL, CHECK_BITWISE_EQUAL ),                                            \
+    2, BOOST_STRINGIZE( L ), BOOST_STRINGIZE( R ) )                             \
+/**/
+
+#define BOOST_WARN_BITWISE_EQUAL( L, R )    BOOST_BITWISE_EQUAL_IMPL( L, R, WARN )
+#define BOOST_CHECK_BITWISE_EQUAL( L, R )   BOOST_BITWISE_EQUAL_IMPL( L, R, CHECK )
+#define BOOST_REQUIRE_BITWISE_EQUAL( L, R ) BOOST_BITWISE_EQUAL_IMPL( L, R, REQUIRE )
+
+//____________________________________________________________________________//
+
+#define BOOST_IS_DEFINED( symb )            ::ndnboost::test_tools::tt_detail::is_defined_impl( #symb, BOOST_STRINGIZE(= symb) )
+
+//____________________________________________________________________________//
+
+// ***************************** //
+// deprecated interface
+
+#define BOOST_BITWISE_EQUAL( L, R )         BOOST_CHECK_BITWISE_EQUAL( L, R )
+#define BOOST_MESSAGE( M )                  BOOST_TEST_MESSAGE( M )
+#define BOOST_CHECKPOINT( M )               BOOST_TEST_CHECKPOINT( M )
+
+namespace ndnboost {
+
+namespace test_tools {
+
+typedef unit_test::const_string      const_string;
+
+namespace { bool dummy_cond = false; }
+
+// ************************************************************************** //
+// **************                print_log_value               ************** //
+// ************************************************************************** //
+
+template<typename T>
+struct print_log_value {
+    void    operator()( std::ostream& ostr, T const& t )
+    {
+        // avoid warning: 'ndnboost::test_tools::<unnamed>::dummy_cond' defined but not used 
+        if (::ndnboost::test_tools::dummy_cond) {}
+
+        typedef typename mpl::or_<is_array<T>,is_function<T>,is_abstract<T> >::type cant_use_nl;
+
+        set_precision( ostr, cant_use_nl() );
+
+        ostr << t; // by default print the value
+    }
+
+    void set_precision( std::ostream& ostr, mpl::false_ )
+    {
+        if( std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::radix == 2 )
+            ostr.precision( 2 + std::numeric_limits<T>::digits * 301/1000 ); 
+    }
+
+    void set_precision( std::ostream&, mpl::true_ ) {}
+};
+
+//____________________________________________________________________________//
+
+#define BOOST_TEST_DONT_PRINT_LOG_VALUE( the_type )         \
+namespace ndnboost { namespace test_tools {                    \
+template<>                                                  \
+struct print_log_value<the_type > {                         \
+    void operator()( std::ostream&, the_type const& ) {}    \
+};                                                          \
+}}                                                          \
+/**/
+
+//____________________________________________________________________________//
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+template<typename T, std::size_t N >
+struct print_log_value< T[N] > {
+    void    operator()( std::ostream& ostr, T const* t )
+    {
+        ostr << t;
+    }
+};
+#endif
+
+//____________________________________________________________________________//
+
+template<>
+struct BOOST_TEST_DECL print_log_value<bool> {
+    void    operator()( std::ostream& ostr, bool t )
+    {
+         ostr << std::boolalpha << t;
+    }
+};
+
+//____________________________________________________________________________//
+
+template<>
+struct BOOST_TEST_DECL print_log_value<char> {
+    void    operator()( std::ostream& ostr, char t );
+};
+
+//____________________________________________________________________________//
+
+template<>
+struct BOOST_TEST_DECL print_log_value<unsigned char> {
+    void    operator()( std::ostream& ostr, unsigned char t );
+};
+
+//____________________________________________________________________________//
+
+template<>
+struct BOOST_TEST_DECL print_log_value<char const*> {
+    void    operator()( std::ostream& ostr, char const* t );
+};
+
+//____________________________________________________________________________//
+
+template<>
+struct BOOST_TEST_DECL print_log_value<wchar_t const*> {
+    void    operator()( std::ostream& ostr, wchar_t const* t );
+};
+
+//____________________________________________________________________________//
+
+namespace tt_detail {
+
+// ************************************************************************** //
+// **************              tools classification            ************** //
+// ************************************************************************** //
+
+enum check_type {
+    CHECK_PRED, 
+    CHECK_MSG,
+    CHECK_EQUAL,
+    CHECK_NE,
+    CHECK_LT,
+    CHECK_LE,
+    CHECK_GT,
+    CHECK_GE,
+    CHECK_CLOSE,
+    CHECK_CLOSE_FRACTION,
+    CHECK_SMALL,
+    CHECK_BITWISE_EQUAL,
+    CHECK_PRED_WITH_ARGS,
+    CHECK_EQUAL_COLL
+};
+
+enum tool_level {
+    WARN, CHECK, REQUIRE, PASS
+};
+
+// ************************************************************************** //
+// **************                 print_helper                 ************** //
+// ************************************************************************** //
+// Adds level of indirection to the output operation, allowing us to customize 
+// it for types that do not support operator << directly or for any other reason
+
+template<typename T>
+struct print_helper_t {
+    explicit    print_helper_t( T const& t ) : m_t( t ) {}
+
+    T const&    m_t;
+};
+
+//____________________________________________________________________________//
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) 
+// Borland suffers premature pointer decay passing arrays by reference
+template<typename T, std::size_t N >
+struct print_helper_t< T[N] > {
+    explicit    print_helper_t( T const * t ) : m_t( t ) {}
+
+    T const *   m_t;
+};
+#endif
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline print_helper_t<T> print_helper( T const& t )
+{
+    return print_helper_t<T>( t );
+}
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline std::ostream& 
+operator<<( std::ostream& ostr, print_helper_t<T> const& ph )
+{
+    print_log_value<T>()( ostr, ph.m_t );
+
+    return ostr;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************            TOOL BOX Implementation           ************** //
+// ************************************************************************** //
+
+BOOST_TEST_DECL 
+bool check_impl( predicate_result const& pr, ::ndnboost::unit_test::lazy_ostream const& check_descr,
+                 const_string file_name, std::size_t line_num,
+                 tool_level tl, check_type ct,
+                 std::size_t num_args, ... );
+
+//____________________________________________________________________________//
+
+#define TEMPL_PARAMS( z, m, dummy ) , typename BOOST_JOIN( Arg, m )
+#define FUNC_PARAMS( z, m, dummy )                                                  \
+ , BOOST_JOIN( Arg, m ) const& BOOST_JOIN( arg, m )                                 \
+ , char const* BOOST_JOIN( BOOST_JOIN( arg, m ), _descr )                           \
+/**/
+
+#define PRED_PARAMS( z, m, dummy ) BOOST_PP_COMMA_IF( m ) BOOST_JOIN( arg, m ) 
+
+#define ARG_INFO( z, m, dummy )                                                     \
+ , BOOST_JOIN( BOOST_JOIN( arg, m ), _descr )                                       \
+ , &static_cast<const unit_test::lazy_ostream&>(unit_test::lazy_ostream::instance() \
+        << ::ndnboost::test_tools::tt_detail::print_helper( BOOST_JOIN( arg, m ) ))    \
+/**/
+
+#define IMPL_FRWD( z, n, dummy )                                                    \
+template<typename Pred                                                              \
+         BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), TEMPL_PARAMS, _ )>            \
+inline bool                                                                         \
+check_frwd( Pred P, unit_test::lazy_ostream const& check_descr,                     \
+            const_string file_name, std::size_t line_num,                           \
+            tool_level tl, check_type ct                                            \
+            BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), FUNC_PARAMS, _ )           \
+)                                                                                   \
+{                                                                                   \
+    return                                                                          \
+    check_impl( P( BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), PRED_PARAMS, _ ) ), \
+                check_descr, file_name, line_num, tl, ct,                           \
+                BOOST_PP_ADD( n, 1 )                                                \
+                BOOST_PP_REPEAT_ ## z( BOOST_PP_ADD( n, 1 ), ARG_INFO, _ )          \
+    );                                                                              \
+}                                                                                   \
+/**/
+
+#ifndef BOOST_TEST_MAX_PREDICATE_ARITY
+#define BOOST_TEST_MAX_PREDICATE_ARITY 5
+#endif
+
+BOOST_PP_REPEAT( BOOST_TEST_MAX_PREDICATE_ARITY, IMPL_FRWD, _ )
+
+#undef TEMPL_PARAMS
+#undef FUNC_PARAMS
+#undef PRED_INFO
+#undef ARG_INFO
+#undef IMPL_FRWD
+
+//____________________________________________________________________________//
+
+template <class Left, class Right>
+predicate_result equal_impl( Left const& left, Right const& right )
+{
+    return left == right;
+}
+
+//____________________________________________________________________________//
+
+predicate_result        BOOST_TEST_DECL equal_impl( char const* left, char const* right );
+inline predicate_result equal_impl( char* left, char const* right ) { return equal_impl( static_cast<char const*>(left), static_cast<char const*>(right) ); }
+inline predicate_result equal_impl( char const* left, char* right ) { return equal_impl( static_cast<char const*>(left), static_cast<char const*>(right) ); }
+inline predicate_result equal_impl( char* left, char* right )       { return equal_impl( static_cast<char const*>(left), static_cast<char const*>(right) ); }
+
+#if !defined( BOOST_NO_CWCHAR )
+predicate_result        BOOST_TEST_DECL equal_impl( wchar_t const* left, wchar_t const* right );
+inline predicate_result equal_impl( wchar_t* left, wchar_t const* right ) { return equal_impl( static_cast<wchar_t const*>(left), static_cast<wchar_t const*>(right) ); }
+inline predicate_result equal_impl( wchar_t const* left, wchar_t* right ) { return equal_impl( static_cast<wchar_t const*>(left), static_cast<wchar_t const*>(right) ); }
+inline predicate_result equal_impl( wchar_t* left, wchar_t* right )       { return equal_impl( static_cast<wchar_t const*>(left), static_cast<wchar_t const*>(right) ); }
+#endif
+
+//____________________________________________________________________________//
+
+struct equal_impl_frwd {
+    template <typename Left, typename Right>
+    inline predicate_result
+    call_impl( Left const& left, Right const& right, mpl::false_ ) const
+    {
+        return equal_impl( left, right );
+    }
+
+    template <typename Left, typename Right>
+    inline predicate_result
+    call_impl( Left const& left, Right const& right, mpl::true_ ) const
+    {
+        return (*this)( right, &left[0] );
+    }
+
+    template <typename Left, typename Right>
+    inline predicate_result
+    operator()( Left const& left, Right const& right ) const
+    {
+        typedef typename is_array<Left>::type left_is_array;
+        return call_impl( left, right, left_is_array() );
+    }
+};
+
+//____________________________________________________________________________//
+
+struct ne_impl {
+    template <class Left, class Right>
+    predicate_result operator()( Left const& left, Right const& right )
+    {
+        return !equal_impl_frwd()( left, right );
+    }
+};
+
+//____________________________________________________________________________//
+
+struct lt_impl {
+    template <class Left, class Right>
+    predicate_result operator()( Left const& left, Right const& right )
+    {
+        return left < right;
+    }
+};
+
+//____________________________________________________________________________//
+
+struct le_impl {
+    template <class Left, class Right>
+    predicate_result operator()( Left const& left, Right const& right )
+    {
+        return left <= right;
+    }
+};
+
+//____________________________________________________________________________//
+
+struct gt_impl {
+    template <class Left, class Right>
+    predicate_result operator()( Left const& left, Right const& right )
+    {
+        return left > right;
+    }
+};
+
+//____________________________________________________________________________//
+
+struct ge_impl {
+    template <class Left, class Right>
+    predicate_result operator()( Left const& left, Right const& right )
+    {
+        return left >= right;
+    }
+};
+
+//____________________________________________________________________________//
+
+template <typename Left, typename Right>
+inline predicate_result
+equal_coll_impl( Left left_begin, Left left_end, Right right_begin, Right right_end )
+{
+    predicate_result    res( true );
+    std::size_t         pos = 0;
+
+    for( ; left_begin != left_end && right_begin != right_end; ++left_begin, ++right_begin, ++pos ) {
+        if( *left_begin != *right_begin ) {
+            res = false;
+            res.message() << "\nMismatch in a position " << pos << ": "  << *left_begin << " != " << *right_begin;
+        }
+    }
+
+    if( left_begin != left_end ) {
+        std::size_t r_size = pos;
+        while( left_begin != left_end ) {
+            ++pos;
+            ++left_begin;
+        }
+
+        res = false;
+        res.message() << "\nCollections size mismatch: " << pos << " != " << r_size;
+    }
+
+    if( right_begin != right_end ) {
+        std::size_t l_size = pos;
+        while( right_begin != right_end ) {
+            ++pos;
+            ++right_begin;
+        }
+
+        res = false;
+        res.message() << "\nCollections size mismatch: " << l_size << " != " << pos;
+    }
+
+    return res;
+}
+
+//____________________________________________________________________________//
+
+template <class Left, class Right>
+inline predicate_result
+bitwise_equal_impl( Left const& left, Right const& right )
+{
+    predicate_result    res( true );
+
+    std::size_t left_bit_size  = sizeof(Left)*CHAR_BIT;
+    std::size_t right_bit_size = sizeof(Right)*CHAR_BIT;
+
+    static Left const leftOne( 1 );
+    static Right const rightOne( 1 );
+
+    std::size_t total_bits = left_bit_size < right_bit_size ? left_bit_size : right_bit_size;
+
+    for( std::size_t counter = 0; counter < total_bits; ++counter ) {
+        if( ( left & ( leftOne << counter ) ) != ( right & ( rightOne << counter ) ) ) {
+            res = false;
+            res.message() << "\nMismatch in a position " << counter;
+        }
+    }
+
+    if( left_bit_size != right_bit_size ) {
+        res = false;
+        res.message() << "\nOperands bit sizes mismatch: " << left_bit_size << " != " << right_bit_size;
+    }
+
+    return res;
+}
+
+//____________________________________________________________________________//
+
+bool BOOST_TEST_DECL is_defined_impl( const_string symbol_name, const_string symbol_value );
+
+//____________________________________________________________________________//
+
+} // namespace tt_detail
+
+} // namespace test_tools
+
+namespace test_toolbox = test_tools;
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TEST_TOOLS_HPP_012705GER
diff --git a/ndnboost/test/unit_test_log.hpp b/ndnboost/test/unit_test_log.hpp
new file mode 100644
index 0000000..844b6d7
--- /dev/null
+++ b/ndnboost/test/unit_test_log.hpp
@@ -0,0 +1,177 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : defines singleton class unit_test_log and all manipulators.
+//  unit_test_log has output stream like interface. It's implementation is
+//  completely hidden with pimple idiom
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_LOG_HPP_071894GER
+#define BOOST_TEST_UNIT_TEST_LOG_HPP_071894GER
+
+// Boost.Test
+#include <ndnboost/test/test_observer.hpp>
+
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/detail/log_level.hpp>
+#include <ndnboost/test/detail/fwd_decl.hpp>
+
+#include <ndnboost/test/utils/wrap_stringstream.hpp>
+#include <ndnboost/test/utils/trivial_singleton.hpp>
+#include <ndnboost/test/utils/lazy_ostream.hpp>
+
+// Boost
+#include <ndnboost/utility.hpp>
+
+// STL
+#include <iosfwd>   // for std::ostream&
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                log manipulators              ************** //
+// ************************************************************************** //
+
+namespace log {
+
+struct BOOST_TEST_DECL begin {
+    begin( const_string fn, std::size_t ln )
+    : m_file_name( fn )
+    , m_line_num( ln )
+    {}
+
+    const_string m_file_name;
+    std::size_t m_line_num;
+};
+
+struct end {};
+
+} // namespace log
+
+// ************************************************************************** //
+// **************             entry_value_collector            ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+class BOOST_TEST_DECL entry_value_collector {
+public:
+    // Constructors
+    entry_value_collector() : m_last( true ) {}
+    entry_value_collector( entry_value_collector const& rhs ) : m_last( true ) { rhs.m_last = false; }
+    ~entry_value_collector();
+
+    // collection interface
+    entry_value_collector const& operator<<( lazy_ostream const& ) const;
+    entry_value_collector const& operator<<( const_string ) const;
+
+private:
+    // Data members
+    mutable bool    m_last;
+};
+
+} // namespace ut_detail
+
+// ************************************************************************** //
+// **************                 unit_test_log                ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL unit_test_log_t : public test_observer, public singleton<unit_test_log_t> {
+public:
+    // test_observer interface implementation
+    void                test_start( counter_t test_cases_amount );
+    void                test_finish();
+    void                test_aborted();
+
+    void                test_unit_start( test_unit const& );
+    void                test_unit_finish( test_unit const&, unsigned long elapsed );
+    void                test_unit_skipped( test_unit const& );
+    void                test_unit_aborted( test_unit const& );
+
+    void                assertion_result( bool passed );
+    void                exception_caught( execution_exception const& );
+
+    virtual int         priority() { return 1; }
+
+    // log configuration methods
+    void                set_stream( std::ostream& );
+    void                set_threshold_level( log_level );
+    void                set_format( output_format );
+    void                set_formatter( unit_test_log_formatter* );
+
+    // test progress logging
+    void                set_checkpoint( const_string file, std::size_t line_num, const_string msg = const_string() );
+
+    // entry logging
+    unit_test_log_t&    operator<<( log::begin const& );        // begin entry 
+    unit_test_log_t&    operator<<( log::end const& );          // end entry
+    unit_test_log_t&    operator<<( log_level );                // set entry level
+    unit_test_log_t&    operator<<( const_string );             // log entry value
+    unit_test_log_t&    operator<<( lazy_ostream const& );      // log entry value
+
+    ut_detail::entry_value_collector operator()( log_level );   // initiate entry collection
+
+private:
+    bool            log_entry_start();
+
+    BOOST_TEST_SINGLETON_CONS( unit_test_log_t );
+}; // unit_test_log_t
+
+BOOST_TEST_SINGLETON_INST( unit_test_log )
+
+// helper macros
+#define BOOST_TEST_LOG_ENTRY( ll )                                                  \
+    (::ndnboost::unit_test::unit_test_log                                              \
+        << ::ndnboost::unit_test::log::begin( BOOST_TEST_L(__FILE__), __LINE__ ))(ll)  \
+/**/
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+// ************************************************************************** //
+// **************       Unit test log interface helpers        ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_MESSAGE( M )                                 \
+    BOOST_TEST_LOG_ENTRY( ::ndnboost::unit_test::log_messages )    \
+    << (::ndnboost::unit_test::lazy_ostream::instance() << M)      \
+/**/
+
+//____________________________________________________________________________//
+
+#define BOOST_TEST_PASSPOINT()                                  \
+    ::ndnboost::unit_test::unit_test_log.set_checkpoint(           \
+        BOOST_TEST_L(__FILE__),                                 \
+        static_cast<std::size_t>(__LINE__) )                    \
+/**/
+
+//____________________________________________________________________________//
+
+#define BOOST_TEST_CHECKPOINT( M )                              \
+    ::ndnboost::unit_test::unit_test_log.set_checkpoint(           \
+        BOOST_TEST_L(__FILE__),                                 \
+        static_cast<std::size_t>(__LINE__),                     \
+        (::ndnboost::wrap_stringstream().ref() << M).str() )       \
+/**/
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_LOG_HPP_071894GER
+
diff --git a/ndnboost/test/unit_test_log_formatter.hpp b/ndnboost/test/unit_test_log_formatter.hpp
new file mode 100644
index 0000000..6449c83
--- /dev/null
+++ b/ndnboost/test/unit_test_log_formatter.hpp
@@ -0,0 +1,123 @@
+//  (C) Copyright Gennadiy Rozental 2003-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : 
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_LOG_FORMATTER_HPP_071894GER
+#define BOOST_TEST_UNIT_TEST_LOG_FORMATTER_HPP_071894GER
+
+// Boost.Test
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/detail/log_level.hpp>
+#include <ndnboost/test/detail/fwd_decl.hpp>
+
+#include <ndnboost/test/execution_monitor.hpp>
+
+// STL
+#include <iosfwd>
+#include <string> // for std::string
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                log_entry_data                ************** //
+// ************************************************************************** //
+
+struct BOOST_TEST_DECL log_entry_data {
+    log_entry_data()
+    {
+        m_file_name.reserve( 200 );
+    }
+
+    std::string     m_file_name;
+    std::size_t     m_line_num;
+    log_level       m_level;
+
+    void clear()
+    {
+        m_file_name.erase();
+        m_line_num      = 0;
+        m_level     = log_nothing;
+    }
+};
+
+// ************************************************************************** //
+// **************                checkpoint_data               ************** //
+// ************************************************************************** //
+
+struct BOOST_TEST_DECL log_checkpoint_data
+{
+    const_string    m_file_name;
+    std::size_t     m_line_num;
+    std::string     m_message;
+
+    void clear()
+    {
+        m_file_name.clear();
+        m_line_num    = 0;
+        m_message = std::string();
+    }
+};
+
+// ************************************************************************** //
+// **************            unit_test_log_formatter           ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL unit_test_log_formatter {
+public:
+    enum log_entry_types { BOOST_UTL_ET_INFO, 
+                           BOOST_UTL_ET_MESSAGE,
+                           BOOST_UTL_ET_WARNING,
+                           BOOST_UTL_ET_ERROR,
+                           BOOST_UTL_ET_FATAL_ERROR };
+
+    // Destructor
+    virtual             ~unit_test_log_formatter() {}
+
+    // Formatter interface
+    virtual void        log_start( std::ostream&, counter_t test_cases_amount ) = 0;
+    virtual void        log_finish( std::ostream& ) = 0;
+    virtual void        log_build_info( std::ostream& ) = 0;
+
+    virtual void        test_unit_start( std::ostream&, test_unit const& tu ) = 0;
+    virtual void        test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed ) = 0;
+    virtual void        test_unit_skipped( std::ostream&, test_unit const& ) = 0;
+
+    virtual void        log_exception( std::ostream& os, log_checkpoint_data const& cd, execution_exception const& ex )
+    {
+        // for backward compatibility
+        log_exception( os, cd, ex.what() );
+    }
+    virtual void        log_exception( std::ostream&, log_checkpoint_data const&, const_string /* explanation */ ) {}
+
+    virtual void        log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let ) = 0;
+    virtual void        log_entry_value( std::ostream&, const_string value ) = 0;
+    virtual void        log_entry_value( std::ostream&, lazy_ostream const& value ); // there is a default impl
+    virtual void        log_entry_finish( std::ostream& ) = 0;
+};
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_LOG_FORMATTER_HPP_071894GER
+
diff --git a/ndnboost/test/unit_test_monitor.hpp b/ndnboost/test/unit_test_monitor.hpp
new file mode 100644
index 0000000..4777d17
--- /dev/null
+++ b/ndnboost/test/unit_test_monitor.hpp
@@ -0,0 +1,69 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : defines specific version of execution monitor used to managed 
+//  run unit of test cases. Translates execution exception into error level
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_MONITOR_HPP_020905GER
+#define BOOST_TEST_UNIT_TEST_MONITOR_HPP_020905GER
+
+// Boost.Test
+#include <ndnboost/test/execution_monitor.hpp>
+#include <ndnboost/test/detail/fwd_decl.hpp>
+#include <ndnboost/test/utils/trivial_singleton.hpp>
+#include <ndnboost/test/utils/callback.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************               unit_test_monitor              ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL unit_test_monitor_t : public singleton<unit_test_monitor_t>, public execution_monitor {
+public:
+    enum error_level { 
+        test_fail               =  1,
+        test_ok                 =  0,
+        constructor_error       = -1, 
+        unexpected_exception    = -2, 
+        os_exception            = -3, 
+        os_timeout              = -4, 
+        fatal_error             = -5,  // includes both system and user
+        destructor_error        = -6
+    };
+
+    static bool is_critical_error( error_level e ) { return e <= fatal_error; }
+
+    // monitor method
+    error_level execute_and_translate( test_case const& );
+
+private:
+    BOOST_TEST_SINGLETON_CONS( unit_test_monitor_t );
+};
+
+BOOST_TEST_SINGLETON_INST( unit_test_monitor )
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_MONITOR_HPP_020905GER
diff --git a/ndnboost/test/unit_test_suite.hpp b/ndnboost/test/unit_test_suite.hpp
new file mode 100644
index 0000000..5ef5f13
--- /dev/null
+++ b/ndnboost/test/unit_test_suite.hpp
@@ -0,0 +1,245 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : defines Unit Test Framework public API
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_SUITE_HPP_071894GER
+#define BOOST_TEST_UNIT_TEST_SUITE_HPP_071894GER
+
+// Boost.Test
+#include <ndnboost/test/unit_test_suite_impl.hpp>
+#include <ndnboost/test/framework.hpp>
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************    Non-auto (explicit) test case interface   ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_CASE( test_function ) \
+ndnboost::unit_test::make_test_case( ndnboost::unit_test::callback0<>(test_function), BOOST_TEST_STRINGIZE( test_function ) )
+#define BOOST_CLASS_TEST_CASE( test_function, tc_instance ) \
+ndnboost::unit_test::make_test_case((test_function), BOOST_TEST_STRINGIZE( test_function ), tc_instance )
+
+// ************************************************************************** //
+// **************               BOOST_TEST_SUITE               ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_SUITE( testsuite_name ) \
+( new ndnboost::unit_test::test_suite( testsuite_name ) )
+
+// ************************************************************************** //
+// **************             BOOST_AUTO_TEST_SUITE            ************** //
+// ************************************************************************** //
+
+#define BOOST_AUTO_TEST_SUITE( suite_name )                             \
+namespace suite_name {                                                  \
+BOOST_AUTO_TU_REGISTRAR( suite_name )( BOOST_STRINGIZE( suite_name ) ); \
+/**/
+
+// ************************************************************************** //
+// **************            BOOST_FIXTURE_TEST_SUITE          ************** //
+// ************************************************************************** //
+
+#define BOOST_FIXTURE_TEST_SUITE( suite_name, F )                       \
+BOOST_AUTO_TEST_SUITE( suite_name )                                     \
+typedef F BOOST_AUTO_TEST_CASE_FIXTURE;                                 \
+/**/
+
+// ************************************************************************** //
+// **************           BOOST_AUTO_TEST_SUITE_END          ************** //
+// ************************************************************************** //
+
+#define BOOST_AUTO_TEST_SUITE_END()                                     \
+BOOST_AUTO_TU_REGISTRAR( BOOST_JOIN( end_suite, __LINE__ ) )( 1 );      \
+}                                                                       \
+/**/
+
+// ************************************************************************** //
+// **************    BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES    ************** //
+// ************************************************************************** //
+
+#define BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES( test_name, n )          \
+struct BOOST_AUTO_TC_UNIQUE_ID( test_name );                            \
+                                                                        \
+static struct BOOST_JOIN( test_name, _exp_fail_num_spec )               \
+: ndnboost::unit_test::ut_detail::                                         \
+  auto_tc_exp_fail<BOOST_AUTO_TC_UNIQUE_ID( test_name ) >               \
+{                                                                       \
+    BOOST_JOIN( test_name, _exp_fail_num_spec )()                       \
+    : ndnboost::unit_test::ut_detail::                                     \
+      auto_tc_exp_fail<BOOST_AUTO_TC_UNIQUE_ID( test_name ) >( n )      \
+    {}                                                                  \
+} BOOST_JOIN( test_name, _exp_fail_num_spec_inst );                     \
+                                                                        \
+/**/
+
+// ************************************************************************** //
+// **************            BOOST_FIXTURE_TEST_CASE           ************** //
+// ************************************************************************** //
+
+#define BOOST_FIXTURE_TEST_CASE( test_name, F )                         \
+struct test_name : public F { void test_method(); };                    \
+                                                                        \
+static void BOOST_AUTO_TC_INVOKER( test_name )()                        \
+{                                                                       \
+    test_name t;                                                        \
+    t.test_method();                                                    \
+}                                                                       \
+                                                                        \
+struct BOOST_AUTO_TC_UNIQUE_ID( test_name ) {};                         \
+                                                                        \
+BOOST_AUTO_TU_REGISTRAR( test_name )(                                   \
+    ndnboost::unit_test::make_test_case(                                   \
+        &BOOST_AUTO_TC_INVOKER( test_name ), #test_name ),              \
+    ndnboost::unit_test::ut_detail::auto_tc_exp_fail<                      \
+        BOOST_AUTO_TC_UNIQUE_ID( test_name )>::instance()->value() );   \
+                                                                        \
+void test_name::test_method()                                           \
+/**/
+
+// ************************************************************************** //
+// **************             BOOST_AUTO_TEST_CASE             ************** //
+// ************************************************************************** //
+
+#define BOOST_AUTO_TEST_CASE( test_name )                               \
+BOOST_FIXTURE_TEST_CASE( test_name, BOOST_AUTO_TEST_CASE_FIXTURE )
+/**/
+
+// ************************************************************************** //
+// **************       BOOST_FIXTURE_TEST_CASE_TEMPLATE       ************** //
+// ************************************************************************** //
+
+#define BOOST_FIXTURE_TEST_CASE_TEMPLATE( test_name, type_name, TL, F ) \
+template<typename type_name>                                            \
+struct test_name : public F                                             \
+{ void test_method(); };                                                \
+                                                                        \
+struct BOOST_AUTO_TC_INVOKER( test_name ) {                             \
+    template<typename TestType>                                         \
+    static void run( ndnboost::type<TestType>* = 0 )                       \
+    {                                                                   \
+        test_name<TestType> t;                                          \
+        t.test_method();                                                \
+    }                                                                   \
+};                                                                      \
+                                                                        \
+BOOST_AUTO_TU_REGISTRAR( test_name )(                                   \
+    ndnboost::unit_test::ut_detail::template_test_case_gen<                \
+        BOOST_AUTO_TC_INVOKER( test_name ),TL >(                        \
+          BOOST_STRINGIZE( test_name ) ) );                             \
+                                                                        \
+template<typename type_name>                                            \
+void test_name<type_name>::test_method()                                \
+/**/
+
+// ************************************************************************** //
+// **************        BOOST_AUTO_TEST_CASE_TEMPLATE         ************** //
+// ************************************************************************** //
+
+#define BOOST_AUTO_TEST_CASE_TEMPLATE( test_name, type_name, TL )       \
+BOOST_FIXTURE_TEST_CASE_TEMPLATE( test_name, type_name, TL, BOOST_AUTO_TEST_CASE_FIXTURE )
+
+// ************************************************************************** //
+// **************           BOOST_TEST_CASE_TEMPLATE           ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_CASE_TEMPLATE( name, typelist )                          \
+    ndnboost::unit_test::ut_detail::template_test_case_gen<name,typelist >(    \
+        BOOST_TEST_STRINGIZE( name ) )                                      \
+/**/
+
+// ************************************************************************** //
+// **************      BOOST_TEST_CASE_TEMPLATE_FUNCTION       ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_CASE_TEMPLATE_FUNCTION( name, type_name )    \
+template<typename type_name>                                    \
+void BOOST_JOIN( name, _impl )( ndnboost::type<type_name>* );      \
+                                                                \
+struct name {                                                   \
+    template<typename TestType>                                 \
+    static void run( ndnboost::type<TestType>* frwrd = 0 )         \
+    {                                                           \
+       BOOST_JOIN( name, _impl )( frwrd );                      \
+    }                                                           \
+};                                                              \
+                                                                \
+template<typename type_name>                                    \
+void BOOST_JOIN( name, _impl )( ndnboost::type<type_name>* )       \
+/**/
+
+// ************************************************************************** //
+// **************              BOOST_GLOBAL_FIXURE             ************** //
+// ************************************************************************** //
+
+#define BOOST_GLOBAL_FIXTURE( F ) \
+static ndnboost::unit_test::ut_detail::global_fixture_impl<F> BOOST_JOIN( gf_, F ) ; \
+/**/
+
+// ************************************************************************** //
+// **************         BOOST_AUTO_TEST_CASE_FIXTURE         ************** //
+// ************************************************************************** //
+
+namespace ndnboost { namespace unit_test { namespace ut_detail {
+
+struct nil_t {};
+
+} // namespace ut_detail
+} // unit_test
+} // namespace ndnboost
+
+// Intentionally is in global namespace, so that FIXURE_TEST_SUITE can reset it in user code.
+typedef ::ndnboost::unit_test::ut_detail::nil_t BOOST_AUTO_TEST_CASE_FIXTURE;
+
+// ************************************************************************** //
+// **************   Auto registration facility helper macros   ************** //
+// ************************************************************************** //
+
+#define BOOST_AUTO_TU_REGISTRAR( test_name )    \
+static ndnboost::unit_test::ut_detail::auto_test_unit_registrar BOOST_JOIN( BOOST_JOIN( test_name, _registrar ), __LINE__ )
+#define BOOST_AUTO_TC_INVOKER( test_name )      BOOST_JOIN( test_name, _invoker )
+#define BOOST_AUTO_TC_UNIQUE_ID( test_name )    BOOST_JOIN( test_name, _id )
+
+// ************************************************************************** //
+// **************                BOOST_TEST_MAIN               ************** //
+// ************************************************************************** //
+
+#if defined(BOOST_TEST_MAIN)
+
+#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
+bool init_unit_test()                   {
+#else
+::ndnboost::unit_test::test_suite*
+init_unit_test_suite( int, char* [] )   {
+#endif
+
+#ifdef BOOST_TEST_MODULE
+    using namespace ::ndnboost::unit_test;
+    assign_op( framework::master_test_suite().p_name.value, BOOST_TEST_STRINGIZE( BOOST_TEST_MODULE ).trim( "\"" ), 0 );
+    
+#endif
+
+#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
+    return true;
+}
+#else
+    return 0;
+}
+#endif
+
+#endif
+
+//____________________________________________________________________________//
+
+#endif // BOOST_TEST_UNIT_TEST_SUITE_HPP_071894GER
+
diff --git a/ndnboost/test/unit_test_suite_impl.hpp b/ndnboost/test/unit_test_suite_impl.hpp
new file mode 100644
index 0000000..42933e4
--- /dev/null
+++ b/ndnboost/test/unit_test_suite_impl.hpp
@@ -0,0 +1,434 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : defines test_unit, test_case, test_case_results, test_suite and test_tree_visitor
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_SUITE_IMPL_HPP_071894GER
+#define BOOST_TEST_UNIT_TEST_SUITE_IMPL_HPP_071894GER
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+#include <ndnboost/test/detail/global_typedef.hpp>
+#include <ndnboost/test/utils/class_properties.hpp>
+#include <ndnboost/test/utils/callback.hpp>
+#include <ndnboost/test/detail/fwd_decl.hpp>
+#include <ndnboost/test/detail/workaround.hpp>
+#include <ndnboost/test/test_observer.hpp>
+
+// Boost
+#include <ndnboost/shared_ptr.hpp>
+#include <ndnboost/mpl/for_each.hpp>
+#include <ndnboost/mpl/identity.hpp>
+#include <ndnboost/type.hpp>
+#include <ndnboost/type_traits/is_const.hpp>
+
+// STL
+#include <typeinfo> // for typeid
+#include <string>   // for std::string
+#include <list>     // for std::list
+#include <vector>   // for std::vector
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                   test_unit                  ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_unit {
+public:
+    enum { type = tut_any };
+
+    // Constructor
+    test_unit( const_string tu_name, test_unit_type t );
+
+    // dependencies management
+    void    depends_on( test_unit* tu );
+    bool    check_dependencies() const;
+
+    // Public r/o properties
+    typedef BOOST_READONLY_PROPERTY(test_unit_id,(framework_impl))  id_t;
+    typedef BOOST_READONLY_PROPERTY(test_unit_id,(test_suite))      parent_id_t;
+    readonly_property<test_unit_type>   p_type;                 // type for this test unit
+    readonly_property<const_string>     p_type_name;            // "case"/"suite"
+    id_t                                p_id;                   // unique id for this test unit
+    parent_id_t                         p_parent_id;            // parent test suite id
+
+    // Public r/w properties
+    readwrite_property<std::string>     p_name;                 // name for this test unit
+    readwrite_property<unsigned>        p_timeout;              // timeout for the test unit execution 
+    readwrite_property<counter_t>       p_expected_failures;    // number of expected failures in this test unit
+    mutable readwrite_property<bool>    p_enabled;              // enabled status for this unit
+
+    void                                increase_exp_fail( unsigned num );
+
+protected:
+    ~test_unit();
+
+private:
+    // Data members
+    std::list<test_unit_id>             m_dependencies;
+};
+
+// ************************************************************************** //
+// **************              test_case_generator             ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_unit_generator {
+public:
+    virtual test_unit*  next() const = 0;
+
+protected:
+    BOOST_TEST_PROTECTED_VIRTUAL ~test_unit_generator() {}
+};
+
+// ************************************************************************** //
+// **************                   test_case                  ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_case : public test_unit {
+public:
+    enum { type = tut_case };
+
+    // Constructor
+    test_case( const_string tc_name, callback0<> const& test_func );
+
+    // Access methods
+    callback0<> const&  test_func() const { return m_test_func; }
+
+private:
+    friend class framework_impl;
+    ~test_case() {}
+
+    // BOOST_MSVC <= 1200 have problems with callback as property
+    // Data members
+    callback0<> m_test_func;
+};
+
+// ************************************************************************** //
+// **************                  test_suite                  ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_suite : public test_unit {
+public:
+    enum { type = tut_suite };
+
+    // Constructor
+    explicit        test_suite( const_string ts_name );
+
+    // test unit list management
+    void            add( test_unit* tu, counter_t expected_failures = 0, unsigned timeout = 0 );
+    void            add( test_unit_generator const& gen, unsigned timeout = 0 );
+    void            remove( test_unit_id id );
+
+    // access methods
+    test_unit_id    get( const_string tu_name ) const;
+    std::size_t     size() const { return m_members.size(); }
+
+protected:
+    friend BOOST_TEST_DECL 
+    void        traverse_test_tree( test_suite const&, test_tree_visitor& );
+    friend class framework_impl;
+    virtual     ~test_suite() {}
+
+    // Data members
+    std::vector<test_unit_id> m_members;
+};
+
+// ************************************************************************** //
+// **************               master_test_suite              ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL master_test_suite_t : public test_suite {
+public:
+    master_test_suite_t() : test_suite( "Master Test Suite" )
+    , argc( 0 )
+    , argv( 0 )
+    {}
+    
+    // Data members    
+    int      argc;
+    char**   argv;
+};
+
+
+// ************************************************************************** //
+// **************               test_tree_visitor              ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_tree_visitor {
+public:
+    // test tree visitor interface
+    virtual void    visit( test_case const& )               {}
+    virtual bool    test_suite_start( test_suite const& )   { return true; }
+    virtual void    test_suite_finish( test_suite const& )  {}
+
+protected:
+    BOOST_TEST_PROTECTED_VIRTUAL ~test_tree_visitor() {}
+};
+
+// ************************************************************************** //
+// **************               traverse_test_tree             ************** //
+// ************************************************************************** //
+
+BOOST_TEST_DECL void    traverse_test_tree( test_case const&, test_tree_visitor& );
+BOOST_TEST_DECL void    traverse_test_tree( test_suite const&, test_tree_visitor& );
+BOOST_TEST_DECL void    traverse_test_tree( test_unit_id     , test_tree_visitor& );
+
+//____________________________________________________________________________//
+
+inline void
+traverse_test_tree( test_unit const& tu, test_tree_visitor& V )
+{
+    if( tu.p_type == tut_case )
+        traverse_test_tree( static_cast<test_case const&>( tu ), V );
+    else
+        traverse_test_tree( static_cast<test_suite const&>( tu ), V );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                test_case_counter             ************** //
+// ************************************************************************** //
+
+class test_case_counter : public test_tree_visitor {
+public:
+    // Constructor
+    test_case_counter() : p_count( 0 ) {}
+
+    BOOST_READONLY_PROPERTY( counter_t, (test_case_counter)) p_count;
+private:
+    // test tree visitor interface
+    virtual void    visit( test_case const& );
+    virtual bool    test_suite_start( test_suite const& ts )    { return ts.p_enabled; }
+};
+
+// ************************************************************************** //
+// **************               test_being_aborted             ************** //
+// ************************************************************************** //
+
+struct BOOST_TEST_DECL test_being_aborted {};
+
+// ************************************************************************** //
+// **************               object generators              ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+BOOST_TEST_DECL std::string normalize_test_case_name( const_string tu_name );
+
+template<typename InstanceType,typename UserTestCase>
+struct user_tc_method_invoker {
+    typedef void (UserTestCase::*TestMethod )();
+
+    user_tc_method_invoker( shared_ptr<InstanceType> inst, TestMethod test_method )
+    : m_inst( inst ), m_test_method( test_method ) {}
+
+    void operator()() { ((*m_inst).*m_test_method)(); }
+
+    shared_ptr<InstanceType> m_inst;
+    TestMethod               m_test_method;
+};
+
+} // namespace ut_detail
+
+//____________________________________________________________________________//
+
+inline test_case*
+make_test_case( callback0<> const& test_func, const_string tc_name )
+{
+    return new test_case( ut_detail::normalize_test_case_name( tc_name ), test_func );
+}
+
+//____________________________________________________________________________//
+
+template<typename UserTestCase, typename InstanceType>
+inline test_case*
+make_test_case( void (UserTestCase::*           test_method )(),
+                const_string                    tc_name,
+                ndnboost::shared_ptr<InstanceType> user_test_case )
+{
+    return new test_case( ut_detail::normalize_test_case_name( tc_name ), 
+                          ut_detail::user_tc_method_invoker<InstanceType,UserTestCase>( user_test_case, test_method ) );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************           auto_test_unit_registrar           ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+struct BOOST_TEST_DECL auto_test_unit_registrar
+{
+    // Constructors
+                auto_test_unit_registrar( test_case* tc, counter_t exp_fail );
+    explicit    auto_test_unit_registrar( const_string ts_name );
+    explicit    auto_test_unit_registrar( test_unit_generator const& tc_gen );
+    explicit    auto_test_unit_registrar( int );
+
+private:
+    static std::list<test_suite*>& curr_ts_store();
+};
+
+//____________________________________________________________________________//
+
+template<typename T>
+struct auto_tc_exp_fail {
+    auto_tc_exp_fail() : m_value( 0 ) {}
+
+    explicit    auto_tc_exp_fail( unsigned v )
+    : m_value( v )
+    {
+        instance() = this;
+    }
+
+    static auto_tc_exp_fail*& instance() 
+    {
+        static auto_tc_exp_fail     inst; 
+        static auto_tc_exp_fail*    inst_ptr = &inst; 
+
+        return inst_ptr;
+    }
+
+    unsigned    value() const { return m_value; }
+
+private:
+    // Data members
+    unsigned    m_value;
+};
+
+//____________________________________________________________________________//
+
+} // namespace ut_detail
+
+// ************************************************************************** //
+// **************                global_fixture                ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL global_fixture : public test_observer { 
+public: 
+    // Constructor
+    global_fixture();
+}; 
+
+//____________________________________________________________________________//
+
+namespace ut_detail {
+
+template<typename F> 
+struct global_fixture_impl : public global_fixture {
+    // Constructor
+    global_fixture_impl(): m_fixure( 0 )    {}
+
+    // test observer interface
+    virtual void    test_start( counter_t ) { m_fixure = new F; }
+    virtual void    test_finish()           { delete m_fixure; m_fixure = 0; } 
+    virtual void    test_aborted()          { delete m_fixure; m_fixure = 0; } 
+
+private:
+    // Data members
+    F*  m_fixure;
+}; 
+
+// ************************************************************************** //
+// **************          test_case_template_invoker          ************** //
+// ************************************************************************** //
+
+template<typename TestCaseTemplate,typename TestType>
+class test_case_template_invoker {
+public:
+    void    operator()()    { TestCaseTemplate::run( (ndnboost::type<TestType>*)0 ); }
+};
+
+// ************************************************************************** //
+// **************           generate_test_case_4_type          ************** //
+// ************************************************************************** //
+
+template<typename Generator,typename TestCaseTemplate>
+struct generate_test_case_4_type {
+    explicit    generate_test_case_4_type( const_string tc_name, Generator& G )
+    : m_test_case_name( tc_name )
+    , m_holder( G )
+    {}
+
+    template<typename TestType>
+    void        operator()( mpl::identity<TestType> )
+    {
+        std::string full_name;
+        assign_op( full_name, m_test_case_name, 0 );
+        full_name += '<';
+        full_name += typeid(TestType).name();
+        if( ndnboost::is_const<TestType>::value )
+            full_name += " const";
+        full_name += '>';
+
+        m_holder.m_test_cases.push_back( 
+            new test_case( full_name, test_case_template_invoker<TestCaseTemplate,TestType>() ) );
+    }
+
+private:
+    // Data members
+    const_string    m_test_case_name;
+    Generator&      m_holder;
+};
+
+// ************************************************************************** //
+// **************              test_case_template              ************** //
+// ************************************************************************** //
+
+template<typename TestCaseTemplate,typename TestTypesList>
+class template_test_case_gen : public test_unit_generator {
+public:
+    // Constructor
+    template_test_case_gen( const_string tc_name )
+    {
+        typedef generate_test_case_4_type<template_test_case_gen<TestCaseTemplate,TestTypesList>,
+                                          TestCaseTemplate
+        > single_test_gen;
+        mpl::for_each<TestTypesList,mpl::make_identity<mpl::_> >( single_test_gen( tc_name, *this ) );
+    }
+
+    virtual test_unit* next() const
+    {
+        if( m_test_cases.empty() )
+            return 0;
+    
+        test_unit* res = m_test_cases.front();
+        m_test_cases.pop_front();
+
+        return res;
+    }
+
+    // Data members
+    mutable std::list<test_unit*> m_test_cases;
+};
+
+//____________________________________________________________________________//
+
+} // namespace ut_detail
+
+} // unit_test
+
+} // namespace ndnboost
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_SUITE_IMPL_HPP_071894GER
+
diff --git a/ndnboost/test/utils/algorithm.hpp b/ndnboost/test/utils/algorithm.hpp
new file mode 100644
index 0000000..8003dfe
--- /dev/null
+++ b/ndnboost/test/utils/algorithm.hpp
@@ -0,0 +1,228 @@
+//  (C) Copyright Gennadiy Rozental 2004-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : addition to STL algorithms
+// ***************************************************************************
+
+#ifndef BOOST_ALGORITHM_HPP_062304GER
+#define BOOST_ALGORITHM_HPP_062304GER
+
+#include <utility>
+#include <algorithm> // std::find
+#include <functional> // std::bind1st
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+/// @brief this algorithm search through two collections for first mismatch position that get returned as a pair
+/// of iterators, first pointing to the mismatch position in first collection, second iterator in second one
+
+/// @param first1 - first collection begin iterator
+/// @param last1 - first collection end iterator
+/// @param first2 - second collection begin iterator
+/// @param last2 - second collection end iterator
+template <class InputIter1, class InputIter2>
+inline std::pair<InputIter1, InputIter2>
+mismatch( InputIter1 first1, InputIter1 last1,
+          InputIter2 first2, InputIter2 last2 )
+{
+    while( first1 != last1 && first2 != last2 && *first1 == *first2 ) {
+        ++first1;
+        ++first2;
+    }
+
+    return std::pair<InputIter1, InputIter2>(first1, first2);
+}
+
+//____________________________________________________________________________//
+
+/// @brief this algorithm search through two collections for first mismatch position that get returned as a pair
+/// of iterators, first pointing to the mismatch position in first collection, second iterator in second one. This algorithms
+/// uses supplied predicate for collection elements comparison
+
+/// @param first1 - first collection begin iterator
+/// @param last1 - first collection end iterator
+/// @param first2 - second collection begin iterator
+/// @param last2 - second collection end iterator
+/// @param pred - predicate to be used for search
+template <class InputIter1, class InputIter2, class Predicate>
+inline std::pair<InputIter1, InputIter2>
+mismatch( InputIter1 first1, InputIter1 last1,
+          InputIter2 first2, InputIter2 last2,
+          Predicate pred )
+{
+    while( first1 != last1 && first2 != last2 && pred( *first1, *first2 ) ) {
+        ++first1;
+        ++first2;
+    }
+
+    return std::pair<InputIter1, InputIter2>(first1, first2);
+}
+
+//____________________________________________________________________________//
+
+/// @brief this algorithm search through first collection for first element that does not belong a second one
+
+/// @param first1 - first collection begin iterator
+/// @param last1 - first collection end iterator
+/// @param first2 - second collection begin iterator
+/// @param last2 - second collection end iterator
+template<class ForwardIterator1, class ForwardIterator2>
+inline ForwardIterator1
+find_first_not_of( ForwardIterator1 first1, ForwardIterator1 last1, 
+                   ForwardIterator2 first2, ForwardIterator2 last2 )
+{
+    while( first1 != last1 ) {
+        if( std::find( first2, last2, *first1 ) == last2 )
+            break;
+        ++first1;
+    }
+
+    return first1;
+}
+
+//____________________________________________________________________________//
+
+/// @brief this algorithm search through first collection for first element that does not satisfy binary 
+/// predicate in conjunction will any element in second collection
+
+/// @param first1 - first collection begin iterator
+/// @param last1 - first collection end iterator
+/// @param first2 - second collection begin iterator
+/// @param last2 - second collection end iterator
+/// @param pred - predicate to be used for search
+template<class ForwardIterator1, class ForwardIterator2, class Predicate>
+inline ForwardIterator1
+find_first_not_of( ForwardIterator1 first1, ForwardIterator1 last1, 
+                   ForwardIterator2 first2, ForwardIterator2 last2, 
+                   Predicate pred )
+{
+    while( first1 != last1 ) {
+        if( std::find_if( first2, last2, std::bind1st( pred, *first1 ) ) == last2 )
+            break;
+        ++first1;
+    }
+
+    return first1;
+}
+
+//____________________________________________________________________________//
+
+/// @brief this algorithm search through first collection for last element that belongs to a second one
+
+/// @param first1 - first collection begin iterator
+/// @param last1 - first collection end iterator
+/// @param first2 - second collection begin iterator
+/// @param last2 - second collection end iterator
+template<class BidirectionalIterator1, class ForwardIterator2>
+inline BidirectionalIterator1
+find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, 
+              ForwardIterator2 first2, ForwardIterator2 last2 )
+{
+    if( first1 == last1 || first2 == last2 )
+        return last1;
+
+    BidirectionalIterator1 it1 = last1;
+    while( --it1 != first1 && std::find( first2, last2, *it1 ) == last2 ) {}
+
+    return it1 == first1 && std::find( first2, last2, *it1 ) == last2 ? last1 : it1;
+}
+
+//____________________________________________________________________________//
+
+/// @brief this algorithm search through first collection for last element that satisfy binary 
+/// predicate in conjunction will at least one element in second collection
+
+/// @param first1 - first collection begin iterator
+/// @param last1 - first collection end iterator
+/// @param first2 - second collection begin iterator
+/// @param last2 - second collection end iterator
+/// @param pred - predicate to be used for search
+template<class BidirectionalIterator1, class ForwardIterator2, class Predicate>
+inline BidirectionalIterator1
+find_last_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, 
+              ForwardIterator2 first2, ForwardIterator2 last2, 
+              Predicate pred )
+{
+    if( first1 == last1 || first2 == last2 )
+        return last1;
+
+    BidirectionalIterator1 it1 = last1;
+    while( --it1 != first1 && std::find_if( first2, last2, std::bind1st( pred, *it1 ) ) == last2 ) {}
+
+    return it1 == first1 && std::find_if( first2, last2, std::bind1st( pred, *it1 ) ) == last2 ? last1 : it1;
+}
+
+//____________________________________________________________________________//
+
+/// @brief this algorithm search through first collection for last element that does not belong to a second one
+
+/// @param first1 - first collection begin iterator
+/// @param last1 - first collection end iterator
+/// @param first2 - second collection begin iterator
+/// @param last2 - second collection end iterator
+template<class BidirectionalIterator1, class ForwardIterator2>
+inline BidirectionalIterator1
+find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, 
+                  ForwardIterator2 first2, ForwardIterator2 last2 )
+{
+    if( first1 == last1 || first2 == last2 )
+        return last1;
+
+    BidirectionalIterator1 it1 = last1;
+    while( --it1 != first1 && std::find( first2, last2, *it1 ) != last2 ) {}
+
+    return it1 == first1 && std::find( first2, last2, *it1 ) != last2 ? last1 : it1;
+}
+
+//____________________________________________________________________________//
+
+/// @brief this algorithm search through first collection for last element that does not satisfy binary 
+/// predicate in conjunction will any element in second collection
+
+/// @param first1 - first collection begin iterator
+/// @param last1 - first collection end iterator
+/// @param first2 - second collection begin iterator
+/// @param last2 - second collection end iterator
+/// @param pred - predicate to be used for search
+template<class BidirectionalIterator1, class ForwardIterator2, class Predicate>
+inline BidirectionalIterator1
+find_last_not_of( BidirectionalIterator1 first1, BidirectionalIterator1 last1, 
+                  ForwardIterator2 first2, ForwardIterator2 last2, 
+                  Predicate pred )
+{
+    if( first1 == last1 || first2 == last2 )
+        return last1;
+
+    BidirectionalIterator1 it1 = last1;
+    while( --it1 != first1 && std::find_if( first2, last2, std::bind1st( pred, *it1 ) ) != last2 ) {}
+
+    return it1 == first1 && std::find_if( first2, last2, std::bind1st( pred, *it1 ) ) == last2 ? last1 : it1;
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_ALGORITHM_HPP_062304GER
+
+
diff --git a/ndnboost/test/utils/assign_op.hpp b/ndnboost/test/utils/assign_op.hpp
new file mode 100644
index 0000000..b3d7ca0
--- /dev/null
+++ b/ndnboost/test/utils/assign_op.hpp
@@ -0,0 +1,41 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : overloadable assignment
+// ***************************************************************************
+
+#ifndef BOOST_TEST_ASSIGN_OP_033005GER
+#define BOOST_TEST_ASSIGN_OP_033005GER
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************             generic assign operator          ************** //
+// ************************************************************************** //
+
+// generic
+template<typename T,typename S>
+inline void
+assign_op( T& t, S const& s, long )
+{
+    t = s;
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+#endif // BOOST_TEST_ASSIGN_OP_033005GER
+
diff --git a/ndnboost/test/utils/basic_cstring/basic_cstring.hpp b/ndnboost/test/utils/basic_cstring/basic_cstring.hpp
new file mode 100644
index 0000000..b3982df
--- /dev/null
+++ b/ndnboost/test/utils/basic_cstring/basic_cstring.hpp
@@ -0,0 +1,731 @@
+//  (C) Copyright Gennadiy Rozental 2004-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : class basic_cstring wraps C string and provide std_string like 
+//                interface
+// ***************************************************************************
+
+#ifndef BOOST_TEST_BASIC_CSTRING_HPP_071894GER
+#define BOOST_TEST_BASIC_CSTRING_HPP_071894GER
+
+// Boost.Test
+#include <ndnboost/test/utils/basic_cstring/basic_cstring_fwd.hpp>
+#include <ndnboost/test/utils/basic_cstring/bcs_char_traits.hpp>
+
+// STL
+#include <string>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                basic_cstring                 ************** //
+// ************************************************************************** //
+
+template<typename CharT>
+class basic_cstring {
+    typedef basic_cstring<CharT>                        self_type;
+public:
+    // Subtypes
+    typedef ut_detail::bcs_char_traits<CharT>           traits_type;
+    typedef typename ut_detail::bcs_char_traits<CharT>::std_string  std_string;
+
+    typedef CharT                                       value_type;
+    typedef value_type*                                 pointer;
+    typedef value_type const*                           const_pointer;
+    typedef value_type&                                 reference;
+    typedef const value_type&                           const_reference;
+    typedef std::size_t                                 size_type;
+    typedef std::ptrdiff_t                              difference_type;
+
+    typedef value_type const*                           const_iterator;
+    typedef value_type*                                 iterator;
+
+    // !! should also present reverse_iterator, const_reverse_iterator
+
+#if !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
+    enum npos_type { npos = static_cast<size_type>(-1) };
+#else
+    // IBM/VisualAge version 6 is not able to handle enums larger than 4 bytes.
+    // But size_type is 8 bytes in 64bit mode.
+    static const size_type npos = -1 ;
+#endif
+
+    static pointer  null_str();
+
+    // Constructors; default copy constructor is generated by compiler
+    basic_cstring();
+    basic_cstring( std_string const& s );
+    basic_cstring( pointer s );
+    basic_cstring( pointer s, size_type arg_size );
+    basic_cstring( pointer first, pointer last );
+
+    // data access methods
+    value_type      operator[]( size_type index ) const;
+    value_type      at( size_type index ) const;
+
+    // size operators
+    size_type       size() const;
+    bool            is_empty() const;
+    void            clear();
+    void            resize( size_type new_len );
+
+    // !! only for STL container conformance use is_empty instead
+    bool            empty() const; 
+
+    // Trimming
+    self_type&      trim_right( size_type trim_size );
+    self_type&      trim_left( size_type trim_size );
+    self_type&      trim_right( iterator it );
+    self_type&      trim_left( iterator it );
+#ifndef __IBMCPP__
+    self_type&      trim_left( self_type exclusions = self_type() ) ;
+    self_type&      trim_right( self_type exclusions = self_type() ) ;
+    self_type&      trim( self_type exclusions = self_type() ) ;
+#else
+    // VisualAge version 6 has in this case a problem with the default arguments.
+    self_type&      trim_left( self_type exclusions ) ;
+    self_type&      trim_right( self_type exclusions ) ;
+    self_type&      trim( self_type exclusions ) ;
+    self_type&      trim_left() { trim_left( self_type() ) ; }
+    self_type&      trim_right() { trim_right( self_type() ) ; }
+    self_type&      trim() { trim( self_type() ) ; }
+#endif
+
+    // Assignment operators
+    basic_cstring&  operator=( self_type const& s );
+    basic_cstring&  operator=( std_string const& s );
+    basic_cstring&  operator=( pointer s );
+
+    template<typename CharT2>
+    basic_cstring&  assign( basic_cstring<CharT2> const& s ) { *this = basic_cstring<CharT>( s.begin(), s.end() ); return *this; }
+    basic_cstring&  assign( self_type const& s, size_type pos, size_type len );
+    basic_cstring&  assign( std_string const& s );
+    basic_cstring&  assign( std_string const& s, size_type pos, size_type len );
+    basic_cstring&  assign( pointer s );
+    basic_cstring&  assign( pointer s, size_type len );
+    basic_cstring&  assign( pointer f, pointer l );
+
+    // swapping
+    void            swap( self_type& s );
+
+    // Iterators
+    iterator        begin();
+    const_iterator  begin() const;
+    iterator        end();
+    const_iterator  end() const;
+
+    // !! should have rbegin, rend
+
+    // substring search operation
+    size_type       find( basic_cstring ) const;
+    size_type       rfind( basic_cstring ) const;
+    self_type       substr( size_type beg_index, size_type end_index = npos ) const;
+
+private:
+    static self_type default_trim_ex();
+
+    // Data members
+    iterator        m_begin;
+    iterator        m_end;
+};
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::pointer
+basic_cstring<CharT>::null_str()
+{
+    static CharT null = 0;
+    return &null;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline
+basic_cstring<CharT>::basic_cstring()
+: m_begin( null_str() )
+, m_end( m_begin )
+{
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline
+basic_cstring<CharT>::basic_cstring( std_string const& s )
+: m_begin( s.c_str() )
+, m_end( m_begin + s.size() )
+{
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline
+basic_cstring<CharT>::basic_cstring( pointer s )
+: m_begin( s ? s : null_str() )
+, m_end  ( m_begin + (s ? traits_type::length( s ) : 0 ) )
+{
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline
+basic_cstring<CharT>::basic_cstring( pointer s, size_type arg_size )
+: m_begin( s ), m_end( m_begin + arg_size )
+{
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline
+basic_cstring<CharT>::basic_cstring( pointer first, pointer last )
+: m_begin( first )
+, m_end( last )
+{
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::value_type
+basic_cstring<CharT>::operator[]( size_type index ) const
+{
+    return m_begin[index];
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::value_type
+basic_cstring<CharT>::at( size_type index ) const
+{
+    if( m_begin + index >= m_end )
+        return static_cast<value_type>(0);
+
+    return m_begin[index];
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::size_type
+basic_cstring<CharT>::size() const
+{
+    return m_end - m_begin;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+basic_cstring<CharT>::is_empty() const
+{
+    return m_end == m_begin;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+basic_cstring<CharT>::empty() const
+{
+    return is_empty();
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline void
+basic_cstring<CharT>::clear()
+{
+    m_begin = m_end;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline void
+basic_cstring<CharT>::resize( size_type new_len )
+{
+    if( m_begin + new_len < m_end )
+        m_end = m_begin + new_len;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim_left( size_type trim_size )
+{
+    m_begin += trim_size;
+    if( m_end <= m_begin )
+        clear();
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim_left( iterator it )
+{
+    m_begin = it;
+    if( m_end <= m_begin )
+        clear();
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim_left( basic_cstring exclusions )
+{
+    if( exclusions.is_empty() )
+        exclusions = default_trim_ex();
+
+    iterator it;
+    for( it = begin(); it != end(); ++it ) {
+        if( traits_type::find( exclusions.begin(), exclusions.size(), *it ) == reinterpret_cast<pointer>(0) )
+            break;
+    }
+    
+    return trim_left( it );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim_right( size_type trim_size )
+{
+    m_end  -= trim_size;
+    if( m_end <= m_begin )
+        clear();
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim_right( iterator it )
+{
+    m_end = it;
+    if( m_end <= m_begin )
+        clear();
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim_right( basic_cstring exclusions )
+{
+    if( exclusions.is_empty() )
+        exclusions = default_trim_ex();
+
+    iterator it;
+
+    for( it = end()-1; it != begin()-1; --it ) {
+        if( self_type::traits_type::find( exclusions.begin(),  exclusions.size(), *it ) == reinterpret_cast<pointer>(0) )
+            break;
+    }
+    
+    return trim_right( it+1 );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::trim( basic_cstring exclusions )
+{
+    trim_left( exclusions );
+    trim_right( exclusions );
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::operator=( basic_cstring<CharT> const& s )
+{
+    m_begin = s.m_begin;
+    m_end   = s.m_end;
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::operator=( std_string const& s )
+{
+    return *this = self_type( s );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::operator=( pointer s )
+{
+    return *this = self_type( s );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::assign( basic_cstring<CharT> const& s, size_type pos, size_type len )
+{
+    return *this = self_type( s.m_begin + pos, len );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::assign( std_string const& s )
+{
+    return *this = self_type( s );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::assign( std_string const& s, size_type pos, size_type len )
+{
+    return *this = self_type( s.c_str() + pos, len );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::assign( pointer s )
+{
+    return *this = self_type( s );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::assign( pointer s, size_type len )
+{
+    return *this = self_type( s, len );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>&
+basic_cstring<CharT>::assign( pointer f, pointer l )
+{
+    return *this = self_type( f, l );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline void
+basic_cstring<CharT>::swap( basic_cstring<CharT>& s )
+{
+    // do not want to include alogrithm
+    pointer tmp1    = m_begin;
+    pointer tmp2    = m_end;
+
+    m_begin         = s.m_begin;
+    m_end           = s.m_end;
+
+    s.m_begin       = tmp1;
+    s.m_end         = tmp2;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::iterator
+basic_cstring<CharT>::begin()
+{
+    return m_begin;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::const_iterator
+basic_cstring<CharT>::begin() const
+{
+    return m_begin;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::iterator
+basic_cstring<CharT>::end()
+{
+    return m_end;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::const_iterator
+basic_cstring<CharT>::end() const
+{
+    return m_end;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::size_type
+basic_cstring<CharT>::find( basic_cstring<CharT> str ) const
+{
+    if( str.is_empty() || str.size() > size() )
+        return static_cast<size_type>(npos);
+
+    const_iterator it   = begin();
+    const_iterator last = end() - str.size() + 1;
+
+    while( it != last ) {
+        if( traits_type::compare( it, str.begin(), str.size() ) == 0 )
+            break;
+
+        ++it;
+    }
+
+    return it == last ? static_cast<size_type>(npos) : it - begin();
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::size_type
+basic_cstring<CharT>::rfind( basic_cstring<CharT> str ) const
+{
+    if( str.is_empty() || str.size() > size() )
+        return static_cast<size_type>(npos);
+
+    const_iterator it   = end() - str.size();
+    const_iterator last = begin()-1;
+
+    while( it != last ) {
+        if( traits_type::compare( it, str.begin(), str.size() ) == 0 )
+            break;
+
+        --it;
+    }
+
+    return it == last ? static_cast<size_type>(npos) : static_cast<size_type>(it - begin());
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>
+basic_cstring<CharT>::substr( size_type beg_index, size_type end_index ) const
+{
+    return beg_index > size()
+            ?       self_type()
+            : end_index > size()
+                ?   self_type( m_begin + beg_index, m_end )
+                :   self_type( m_begin + beg_index, m_begin + end_index );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline basic_cstring<CharT>
+basic_cstring<CharT>::default_trim_ex()
+{
+    static CharT ws[3] = { CharT(' '), CharT('\t'), CharT('\n') }; // !! wide case
+
+    return self_type( ws, 3 );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************             comparison operators             ************** //
+// ************************************************************************** //
+
+template<typename CharT1,typename CharT2>
+inline bool
+operator==( basic_cstring<CharT1> const& s1, basic_cstring<CharT2> const& s2 )
+{
+    typedef typename basic_cstring<CharT1>::traits_type traits_type;
+    return s1.size() == s2.size() && 
+               traits_type::compare( s1.begin(), s2.begin(), s1.size() ) == 0;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT1,typename CharT2>
+inline bool
+operator==( basic_cstring<CharT1> const& s1, CharT2* s2 )
+{
+#if !defined(__DMC__)
+    return s1 == basic_cstring<CharT2>( s2 );
+#else
+    return s1 == basic_cstring<CharT2 const>( s2 );
+#endif
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator==( basic_cstring<CharT> const& s1, typename basic_cstring<CharT>::std_string const& s2 )
+{
+    return s1 == basic_cstring<CharT>( s2 );
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT1,typename CharT2>
+inline bool
+operator==( CharT1* s2, basic_cstring<CharT2> const& s1 )
+{
+    return s1 == s2;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator==( typename basic_cstring<CharT>::std_string const& s2, basic_cstring<CharT> const& s1 )
+{
+    return s1 == s2;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator!=( basic_cstring<CharT> const& s1, CharT* s2 )
+{
+    return !(s1 == s2);
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator!=( CharT* s2, basic_cstring<CharT> const& s1 )
+{
+    return !(s1 == s2);
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator!=( basic_cstring<CharT> const& s1, basic_cstring<CharT> const& s2 )
+{
+    return !(s1 == s2);
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator!=( basic_cstring<CharT> const& s1, typename basic_cstring<CharT>::std_string const& s2 )
+{
+    return !(s1 == s2);
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT>
+inline bool
+operator!=( typename basic_cstring<CharT>::std_string const& s2, basic_cstring<CharT> const& s1 )
+{
+    return !(s1 == s2);
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                  first_char                  ************** //
+// ************************************************************************** //
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::value_type
+first_char( basic_cstring<CharT> source )
+{
+    typedef typename basic_cstring<CharT>::value_type string_value_type;
+
+    return source.is_empty() ? static_cast<string_value_type>(0) : *source.begin();
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                  last_char                   ************** //
+// ************************************************************************** //
+
+template<typename CharT>
+inline typename basic_cstring<CharT>::value_type
+last_char( basic_cstring<CharT> source )
+{
+    typedef typename basic_cstring<CharT>::value_type string_value_type;
+
+    return source.is_empty() ? static_cast<string_value_type>(0) : *(source.end()-1);
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                  assign_op                   ************** //
+// ************************************************************************** //
+
+template<typename CharT1, typename CharT2>
+inline void
+assign_op( std::basic_string<CharT1>& target, basic_cstring<CharT2> src, int )
+{
+    target.assign( src.begin(), src.size() );
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_BASIC_CSTRING_HPP_071894GER
diff --git a/ndnboost/test/utils/basic_cstring/basic_cstring_fwd.hpp b/ndnboost/test/utils/basic_cstring/basic_cstring_fwd.hpp
new file mode 100644
index 0000000..14cb33b
--- /dev/null
+++ b/ndnboost/test/utils/basic_cstring/basic_cstring_fwd.hpp
@@ -0,0 +1,40 @@
+//  (C) Copyright Gennadiy Rozental 2004-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : basic_cstring class wrap C string and provide std_string like 
+//                interface
+// ***************************************************************************
+
+#ifndef BOOST_TEST_BASIC_CSTRING_FWD_HPP_071894GER
+#define BOOST_TEST_BASIC_CSTRING_FWD_HPP_071894GER
+
+#include <ndnboost/detail/workaround.hpp>
+
+namespace ndnboost {
+
+namespace unit_test {
+
+template<typename CharT> class      basic_cstring;
+typedef basic_cstring<char const>   const_string;
+#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590041))
+typedef const_string                literal_string;
+#else
+typedef const_string const          literal_string;
+#endif
+
+typedef char const* const           c_literal_string;
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+#endif // BOOST_TEST_BASIC_CSTRING_FWD_HPP_071894GER
+
diff --git a/ndnboost/test/utils/basic_cstring/bcs_char_traits.hpp b/ndnboost/test/utils/basic_cstring/bcs_char_traits.hpp
new file mode 100644
index 0000000..d6571f7
--- /dev/null
+++ b/ndnboost/test/utils/basic_cstring/bcs_char_traits.hpp
@@ -0,0 +1,150 @@
+//  (C) Copyright Gennadiy Rozental 2004-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : generic char traits class; wraps std::char_traits
+// ***************************************************************************
+
+#ifndef BOOST_TEST_BCS_CHAR_TRAITS_HPP_071894GER
+#define BOOST_TEST_BCS_CHAR_TRAITS_HPP_071894GER
+
+// Boost
+#include <ndnboost/config.hpp>
+#include <ndnboost/detail/workaround.hpp>
+#include <ndnboost/test/detail/config.hpp>
+#include <ndnboost/type_traits/add_const.hpp>
+
+// STL
+#include <string>                       // std::char_traits
+#include <cstddef>                      // std::size_t
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace ut_detail {
+
+template<typename CharT> struct bcs_base_char           { typedef CharT type; };
+
+template<> struct bcs_base_char<char const>             { typedef char type; };
+template<> struct bcs_base_char<unsigned char>          { typedef char type; };
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+template<> struct bcs_base_char<unsigned char const>    { typedef char type; };
+#endif
+
+template<> struct bcs_base_char<wchar_t const>          { typedef wchar_t type; };
+
+// ************************************************************************** //
+// **************               bcs_char_traits                ************** //
+// ************************************************************************** //
+
+template<typename CharT>
+struct bcs_char_traits_impl
+{
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+    typedef CharT const const_char;
+#else
+    typedef typename ndnboost::add_const<CharT>::type const_char;
+#endif
+    static bool eq( CharT c1, CharT c2 )
+    {
+        return c1 == c2;
+    }
+    static bool lt( CharT c1, CharT c2 )
+    {
+        return c1 < c2;
+    }
+
+    static int compare( const_char* cstr1, const_char* cstr2, std::size_t n )
+    {
+        while( n > 0 ) {
+            if( !eq( *cstr1, *cstr2 ) )
+                return lt( *cstr1, *cstr2 ) ? -1 : 1;
+            ++cstr1;
+            ++cstr2;
+            --n;
+        }
+
+        return 0;
+    }
+
+    static std::size_t length( const_char* cstr )
+    {
+        const_char null_char = CharT();
+
+        const_char* ptr = cstr;
+        while( !eq( *ptr, null_char ) )
+            ++ptr;
+
+        return ptr - cstr;
+    }
+
+    static const_char* find( const_char* s, std::size_t n, CharT c )
+    {
+        while( n > 0 ) {
+            if( eq( *s, c ) )
+                return s;
+
+            ++s;
+            --n;
+        }
+        return 0;
+    }
+};
+
+#ifdef BOOST_CLASSIC_IOSTREAMS
+template<typename CharT>
+struct char_traits_with_find : std::string_char_traits<CharT> {
+    static CharT const* find( CharT const* s, std::size_t n, CharT c )
+    {
+        while( n > 0 ) {
+            if( eq( *s, c ) )
+                return s;
+
+            ++s;
+            --n;
+        }
+        return 0;
+    }
+};
+
+template<> struct bcs_char_traits_impl<char> : char_traits_with_find<char> {};
+template<> struct bcs_char_traits_impl<wchar_t> : char_traits_with_find<wchar_t> {};
+#else
+template<> struct bcs_char_traits_impl<char> : std::char_traits<char> {};
+template<> struct bcs_char_traits_impl<wchar_t> : std::char_traits<wchar_t> {};
+#endif
+
+template<typename CharT>
+class bcs_char_traits : public bcs_char_traits_impl<CharT> {
+    typedef typename ut_detail::bcs_base_char<CharT>::type                              the_base_char;
+public:
+#ifdef BOOST_CLASSIC_IOSTREAMS
+    typedef std::basic_string<the_base_char, std::string_char_traits<the_base_char> >   std_string;
+#else
+    typedef std::basic_string<the_base_char, std::char_traits<the_base_char> >          std_string;
+#endif
+};
+
+} // namespace ut_detail
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_BCS_CHAR_TRAITS_HPP_071894GER
diff --git a/ndnboost/test/utils/basic_cstring/compare.hpp b/ndnboost/test/utils/basic_cstring/compare.hpp
new file mode 100644
index 0000000..db9c854
--- /dev/null
+++ b/ndnboost/test/utils/basic_cstring/compare.hpp
@@ -0,0 +1,115 @@
+//  (C) Copyright Gennadiy Rozental 2004-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : class basic_cstring comparisons implementation
+// ***************************************************************************
+
+#ifndef  BOOST_TEST_BASIC_CSTRING_COMPARE_HPP_071894GER
+#define  BOOST_TEST_BASIC_CSTRING_COMPARE_HPP_071894GER
+
+// Boost.Test
+#include <ndnboost/test/utils/basic_cstring/basic_cstring.hpp>
+
+// STL
+#include <functional>
+#include <cctype>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+# if defined(BOOST_NO_STDC_NAMESPACE) && !BOOST_WORKAROUND(__BORLANDC__, <= 0x570)
+namespace std { using ::toupper; }
+# endif
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                case_ins_compare              ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+template<class CharT>
+struct case_ins
+{
+    static bool         eq( CharT c1, CharT c2 ) { return (std::toupper)( c1 ) == (std::toupper)( c2 ); }
+    static bool         lt( CharT c1, CharT c2 ) { return (std::toupper)( c1 ) <  (std::toupper)( c2 ); }
+
+    static int          compare( CharT const* s1, CharT const* s2, std::size_t n )
+    {
+        for( std::size_t i = 0; i < n; ++i ) {
+            if( !eq( s1[i], s2[i] ) )
+                return lt( s1[i], s2[i] ) ? -1 : 1;
+        }
+        return 0;
+    }
+};
+
+} // namespace ut_detail
+
+// ************************************************************************** //
+// **************                  case_ins_eq                 ************** //
+// ************************************************************************** //
+
+template<class CharT>
+inline bool
+case_ins_eq( basic_cstring<CharT> x, basic_cstring<CharT> y )
+{
+    return x.size() == y.size() && ut_detail::case_ins<CharT>::compare( x.begin(), y.begin(), x.size() ) == 0;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                 case_ins_less                ************** //
+// ************************************************************************** //
+
+template<class CharT>
+class case_ins_less : public std::binary_function<basic_cstring<CharT>,basic_cstring<CharT>,bool>
+{
+public:
+    bool operator()( basic_cstring<CharT> x, basic_cstring<CharT> y ) const
+    {
+        return x.size() != y.size() 
+                ? x.size() < y.size() 
+                : ut_detail::case_ins<CharT>::compare( x.begin(), y.begin(), x.size() ) < 0;
+    }
+};
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                  operator <                  ************** //
+// ************************************************************************** //
+
+template<class CharT>
+inline bool
+operator <( ndnboost::unit_test::basic_cstring<CharT> const& x,
+            ndnboost::unit_test::basic_cstring<CharT> const& y )
+{
+    typedef typename ndnboost::unit_test::basic_cstring<CharT>::traits_type traits_type;
+    return x.size() != y.size() 
+            ? x.size() < y.size() 
+            : traits_type::compare( x.begin(), y.begin(), x.size() ) < 0;
+}
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_BASIC_CSTRING_COMPARE_HPP_071894GER
diff --git a/ndnboost/test/utils/basic_cstring/io.hpp b/ndnboost/test/utils/basic_cstring/io.hpp
new file mode 100644
index 0000000..adb6d1e
--- /dev/null
+++ b/ndnboost/test/utils/basic_cstring/io.hpp
@@ -0,0 +1,73 @@
+//  (C) Copyright Gennadiy Rozental 2004-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : basic_cstring i/o implementation
+// ***************************************************************************
+
+#ifndef  BOOST_TEST_BASIC_CSTRING_IO_HPP_071894GER
+#define  BOOST_TEST_BASIC_CSTRING_IO_HPP_071894GER
+
+// Boost.Test
+#include <ndnboost/test/utils/basic_cstring/basic_cstring.hpp>
+
+// STL
+#include <iosfwd>
+#include <string>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+#ifdef BOOST_CLASSIC_IOSTREAMS
+
+template<typename CharT>
+inline std::ostream&
+operator<<( std::ostream& os, basic_cstring<CharT> const& str )
+{
+    typedef typename ut_detail::bcs_base_char<CharT>::type char_type;
+    char_type const* const beg = reinterpret_cast<char_type const* const>( str.begin() );
+    char_type const* const end = reinterpret_cast<char_type const* const>( str.end() );
+    os << std::basic_string<char_type>( beg, end - beg );
+
+    return os;
+}
+
+#else
+
+template<typename CharT1, typename Tr,typename CharT2>
+inline std::basic_ostream<CharT1,Tr>&
+operator<<( std::basic_ostream<CharT1,Tr>& os, basic_cstring<CharT2> const& str )
+{
+    CharT1 const* const beg = reinterpret_cast<CharT1 const*>( str.begin() ); // !!
+    CharT1 const* const end = reinterpret_cast<CharT1 const*>( str.end() );
+    os << std::basic_string<CharT1,Tr>( beg, end - beg );
+
+    return os;
+}
+
+#endif
+
+//____________________________________________________________________________//
+
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_BASIC_CSTRING_IO_HPP_071894GER
diff --git a/ndnboost/test/utils/callback.hpp b/ndnboost/test/utils/callback.hpp
new file mode 100644
index 0000000..91e23f3
--- /dev/null
+++ b/ndnboost/test/utils/callback.hpp
@@ -0,0 +1,310 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : 
+// ***************************************************************************
+
+#ifndef BOOST_TEST_CALLBACK_020505GER
+#define BOOST_TEST_CALLBACK_020505GER
+
+// Boost
+#include <ndnboost/config.hpp>
+#include <ndnboost/detail/workaround.hpp>
+#include <ndnboost/shared_ptr.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(BOOST_INTEL, <= 700)
+#  define BOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR
+#endif
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace ut_detail {
+
+struct unused {};
+
+template<typename R>
+struct invoker {
+    template<typename Functor>
+    R       invoke( Functor& f )                        { return f(); }
+    template<typename Functor, typename T1>
+    R       invoke( Functor& f, T1 t1 )                 { return f( t1 ); }
+    template<typename Functor, typename T1, typename T2>
+    R       invoke( Functor& f, T1 t1, T2 t2 )          { return f( t1, t2 ); }
+    template<typename Functor, typename T1, typename T2, typename T3>
+    R       invoke( Functor& f, T1 t1, T2 t2, T3 t3 )   { return f( t1, t2, t3 ); }
+};
+
+//____________________________________________________________________________//
+
+template<>
+struct invoker<unused> {
+    template<typename Functor>
+    unused  invoke( Functor& f )                        { f(); return unused(); }
+    template<typename Functor, typename T1>
+    unused  invoke( Functor& f, T1 t1 )                 { f( t1 ); return unused(); }
+    template<typename Functor, typename T1, typename T2>
+    unused  invoke( Functor& f, T1 t1, T2 t2 )          { f( t1, t2 ); return unused(); }
+    template<typename Functor, typename T1, typename T2, typename T3>
+    unused  invoke( Functor& f, T1 t1, T2 t2, T3 t3 )   { f( t1, t2, t3 ); return unused(); }
+};
+
+//____________________________________________________________________________//
+
+} // namespace ut_detail
+
+// ************************************************************************** //
+// **************             unit_test::callback0             ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+template<typename R>
+struct callback0_impl {
+    virtual ~callback0_impl() {}
+
+    virtual R invoke() = 0;
+};
+
+//____________________________________________________________________________//
+
+template<typename R, typename Functor>
+struct callback0_impl_t : callback0_impl<R> {
+    // Constructor
+    explicit callback0_impl_t( Functor f ) : m_f( f ) {}
+
+    virtual R invoke() { return invoker<R>().invoke( m_f ); }
+
+private:
+    // Data members
+    Functor m_f;
+};
+
+//____________________________________________________________________________//
+
+} // namespace ut_detail
+
+template<typename R = ut_detail::unused>
+class callback0 {
+public:
+    // Constructors
+    callback0() {}
+#ifdef BOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR
+    callback0( callback0 const& rhs ) : m_impl( rhs.m_impl ) {}
+#endif
+
+    template<typename Functor>
+    callback0( Functor f )
+    : m_impl( new ut_detail::callback0_impl_t<R,Functor>( f ) ) {}
+    
+    void        operator=( callback0 const& rhs ) { m_impl = rhs.m_impl; }
+
+    template<typename Functor>
+    void        operator=( Functor f ) { m_impl.reset( new ut_detail::callback0_impl_t<R,Functor>( f ) );  }
+
+    R           operator()() const { return m_impl->invoke(); }
+
+    bool        operator!() const { return !m_impl; }
+
+private:
+    // Data members
+    ndnboost::shared_ptr<ut_detail::callback0_impl<R> > m_impl;
+};
+
+// ************************************************************************** //
+// **************             unit_test::callback1             ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+template<typename R, typename T1>
+struct callback1_impl {
+    virtual ~callback1_impl() {}
+
+    virtual R invoke( T1 t1 ) = 0;
+};
+
+//____________________________________________________________________________//
+
+template<typename R, typename T1,typename Functor>
+struct callback1_impl_t : callback1_impl<R,T1> {
+    // Constructor
+    explicit callback1_impl_t( Functor f ) : m_f( f ) {}
+
+    virtual R invoke( T1 t1 ) { return invoker<R>().invoke( m_f, t1 ); }
+
+private:
+    // Data members
+    Functor m_f;
+};
+
+//____________________________________________________________________________//
+
+} // namespace ut_detail
+
+template<typename T1,typename R = ut_detail::unused>
+class callback1 {
+public:
+    // Constructors
+    callback1() {}
+#ifdef BOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR
+    callback1( callback1 const& rhs ) : m_impl( rhs.m_impl ) {}
+#endif
+
+    template<typename Functor>
+    callback1( Functor f )
+    : m_impl( new ut_detail::callback1_impl_t<R,T1,Functor>( f ) ) {}
+
+    void        operator=( callback1 const& rhs ) { m_impl = rhs.m_impl; }
+
+    template<typename Functor>
+    void        operator=( Functor f ) { m_impl.reset( new ut_detail::callback1_impl_t<R,T1,Functor>( f ) );  }
+
+    R           operator()( T1 t1 ) const { return m_impl->invoke( t1 ); }
+
+    bool        operator!() const { return !m_impl; }
+
+private:
+    // Data members
+    ndnboost::shared_ptr<ut_detail::callback1_impl<R,T1> > m_impl;
+};
+
+// ************************************************************************** //
+// **************             unit_test::callback2             ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+template<typename R, typename T1,typename T2>
+struct callback2_impl {
+    virtual ~callback2_impl() {}
+
+    virtual R invoke( T1 t1, T2 t2 ) = 0;
+};
+
+//____________________________________________________________________________//
+
+template<typename R, typename T1, typename T2, typename Functor>
+struct callback2_impl_t : callback2_impl<R,T1,T2> {
+    // Constructor
+    explicit callback2_impl_t( Functor f ) : m_f( f ) {}
+
+    virtual R invoke( T1 t1, T2 t2 ) { return invoker<R>().template invoke<Functor,T1,T2>( m_f, t1, t2 ); }
+
+private:
+    // Data members
+    Functor m_f;
+};
+
+//____________________________________________________________________________//
+
+} // namespace ut_detail
+
+template<typename T1,typename T2, typename R = ut_detail::unused>
+class callback2 {
+public:
+    // Constructors
+    callback2() {}
+#ifdef BOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR
+    callback2( callback2 const& rhs ) : m_impl( rhs.m_impl ) {}
+#endif
+
+    template<typename Functor>
+                callback2( Functor f ) : m_impl( new ut_detail::callback2_impl_t<R,T1,T2,Functor>( f ) ) {}
+
+    void        operator=( callback2 const& rhs ) { m_impl = rhs.m_impl; }
+
+    template<typename Functor>
+    void        operator=( Functor f ) { m_impl.reset( new ut_detail::callback2_impl_t<R,T1,T2,Functor>( f ) );  }
+
+    R           operator()( T1 t1, T2 t2 ) const { return m_impl->invoke( t1, t2 ); }
+
+    bool        operator!() const { return !m_impl; }
+
+private:
+    // Data members
+    ndnboost::shared_ptr<ut_detail::callback2_impl<R,T1,T2> > m_impl;
+};
+
+// ************************************************************************** //
+// **************             unit_test::callback3             ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+template<typename R, typename T1, typename T2, typename T3>
+struct callback3_impl {
+    virtual ~callback3_impl() {}
+
+    virtual R invoke( T1 t1, T2 t2, T3 t3 ) = 0;
+};
+
+//____________________________________________________________________________//
+
+template<typename R, typename T1, typename T2, typename T3, typename Functor>
+struct callback3_impl_t : callback3_impl<R,T1,T2,T3> {
+    // Constructor
+    explicit callback3_impl_t( Functor f ) : m_f( f ) {}
+
+    virtual R invoke( T1 t1, T2 t2, T3 t3 ) { return invoker<R>().invoke( m_f, t1, t2, t3 ); }
+
+private:
+    // Data members
+    Functor m_f;
+};
+
+//____________________________________________________________________________//
+
+} // namespace ut_detail
+
+template<typename T1,typename T2, typename T3, typename R = ut_detail::unused>
+class callback3 {
+public:
+    // Constructors
+    callback3() {}
+#ifdef BOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR
+    callback3( callback3 const& rhs ) : m_impl( rhs.m_impl ) {}
+#endif
+
+    template<typename Functor>
+    callback3( Functor f )
+    : m_impl( new ut_detail::callback3_impl_t<R,T1,T2,T3,Functor>( f ) ) {}
+
+    void        operator=( callback3 const& rhs ) { m_impl = rhs.m_impl; }
+
+    template<typename Functor>
+    void        operator=( Functor f ) { m_impl.reset( new ut_detail::callback3_impl_t<R,T1,T2,T3,Functor>( f ) );  }
+
+    R           operator()( T1 t1, T2 t2, T3 t3 ) const { return m_impl->invoke( t1, t2, t3 ); }
+
+    bool        operator!() const { return !m_impl; }
+
+private:
+    // Data members
+    ndnboost::shared_ptr<ut_detail::callback3_impl<R,T1,T2,T3> > m_impl;
+};
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+#undef BOOST_CALLBACK_EXPLICIT_COPY_CONSTRUCTOR
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_CALLBACK_020505GER
diff --git a/ndnboost/test/utils/class_properties.hpp b/ndnboost/test/utils/class_properties.hpp
new file mode 100644
index 0000000..8da1f45
--- /dev/null
+++ b/ndnboost/test/utils/class_properties.hpp
@@ -0,0 +1,221 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : simple facility that mimmic notion of read-only read-write 
+//  properties in C++ classes. Original idea by Henrik Ravn.
+// ***************************************************************************
+
+#ifndef BOOST_TEST_CLASS_PROPERTIES_HPP_071894GER
+#define BOOST_TEST_CLASS_PROPERTIES_HPP_071894GER
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+
+// Boost
+#if !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
+#include <ndnboost/preprocessor/seq/for_each.hpp>
+#endif
+#include <ndnboost/call_traits.hpp>
+#include <ndnboost/type_traits/add_pointer.hpp>
+#include <ndnboost/type_traits/add_const.hpp>
+#include <ndnboost/utility/addressof.hpp>
+
+// STL
+#include <iosfwd>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                 class_property               ************** //
+// ************************************************************************** //
+
+template<class PropertyType>
+class class_property {
+protected:
+    typedef typename call_traits<PropertyType>::const_reference     read_access_t;
+    typedef typename call_traits<PropertyType>::param_type          write_param_t;
+    typedef typename add_pointer<typename add_const<PropertyType>::type>::type address_res_t;
+public:
+    // Constructor
+                    class_property() : value( PropertyType() ) {}
+    explicit        class_property( write_param_t init_value )
+    : value( init_value ) {}
+
+    // Access methods
+    operator        read_access_t() const   { return value; }
+    read_access_t   get() const             { return value; }
+    bool            operator!() const       { return !value; }
+    address_res_t   operator&() const       { return &value; }
+
+    // Data members
+#ifndef BOOST_TEST_NO_PROTECTED_USING
+protected:
+#endif
+    PropertyType        value;
+};
+
+//____________________________________________________________________________//
+
+#ifdef BOOST_CLASSIC_IOSTREAMS
+
+template<class PropertyType>
+inline std::ostream&
+operator<<( std::ostream& os, class_property<PropertyType> const& p )
+
+#else
+
+template<typename CharT1, typename Tr,class PropertyType>
+inline std::basic_ostream<CharT1,Tr>&
+operator<<( std::basic_ostream<CharT1,Tr>& os, class_property<PropertyType> const& p )
+
+#endif
+{
+    return os << p.get();
+}
+
+//____________________________________________________________________________//
+
+#define DEFINE_PROPERTY_FREE_BINARY_OPERATOR( op )                              \
+template<class PropertyType>                                                    \
+inline bool                                                                     \
+operator op( PropertyType const& lhs, class_property<PropertyType> const& rhs ) \
+{                                                                               \
+    return lhs op rhs.get();                                                    \
+}                                                                               \
+template<class PropertyType>                                                    \
+inline bool                                                                     \
+operator op( class_property<PropertyType> const& lhs, PropertyType const& rhs ) \
+{                                                                               \
+    return lhs.get() op rhs;                                                    \
+}                                                                               \
+template<class PropertyType>                                                    \
+inline bool                                                                     \
+operator op( class_property<PropertyType> const& lhs,                           \
+             class_property<PropertyType> const& rhs )                          \
+{                                                                               \
+    return lhs.get() op rhs.get();                                              \
+}                                                                               \
+/**/
+
+DEFINE_PROPERTY_FREE_BINARY_OPERATOR( == )
+DEFINE_PROPERTY_FREE_BINARY_OPERATOR( != )
+
+#undef DEFINE_PROPERTY_FREE_BINARY_OPERATOR
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+
+#define DEFINE_PROPERTY_LOGICAL_OPERATOR( op )                                  \
+template<class PropertyType>                                                    \
+inline bool                                                                     \
+operator op( bool b, class_property<PropertyType> const& p )                    \
+{                                                                               \
+    return b op p.get();                                                        \
+}                                                                               \
+template<class PropertyType>                                                    \
+inline bool                                                                     \
+operator op( class_property<PropertyType> const& p, bool b )                    \
+{                                                                               \
+    return b op p.get();                                                        \
+}                                                                               \
+/**/
+
+DEFINE_PROPERTY_LOGICAL_OPERATOR( && )
+DEFINE_PROPERTY_LOGICAL_OPERATOR( || )
+
+#endif
+
+// ************************************************************************** //
+// **************               readonly_property              ************** //
+// ************************************************************************** //
+
+template<class PropertyType>
+class readonly_property : public class_property<PropertyType> {
+    typedef class_property<PropertyType>         base_prop;
+    typedef typename base_prop::address_res_t    arrow_res_t;
+protected:
+    typedef typename base_prop::write_param_t    write_param_t;
+public:
+    // Constructor
+                    readonly_property() {}
+    explicit        readonly_property( write_param_t init_value ) : base_prop( init_value ) {}
+
+    // access methods
+    arrow_res_t     operator->() const      { return ndnboost::addressof( base_prop::value ); }
+};
+
+//____________________________________________________________________________//
+
+#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
+
+#define BOOST_READONLY_PROPERTY( property_type, friends ) ndnboost::unit_test::readwrite_property<property_type >
+
+#else
+
+#define BOOST_READONLY_PROPERTY_DECLARE_FRIEND(r, data, elem) friend class elem;
+
+#define BOOST_READONLY_PROPERTY( property_type, friends )                           \
+class BOOST_JOIN( readonly_property, __LINE__ )                                     \
+: public ndnboost::unit_test::readonly_property<property_type > {                      \
+    typedef ndnboost::unit_test::readonly_property<property_type > base_prop;          \
+    BOOST_PP_SEQ_FOR_EACH( BOOST_READONLY_PROPERTY_DECLARE_FRIEND, ' ', friends )   \
+    typedef base_prop::write_param_t  write_param_t;                                \
+public:                                                                             \
+                BOOST_JOIN( readonly_property, __LINE__ )() {}                      \
+    explicit    BOOST_JOIN( readonly_property, __LINE__ )( write_param_t init_v  )  \
+    : base_prop( init_v ) {}                                                        \
+}                                                                                   \
+/**/
+
+#endif
+
+// ************************************************************************** //
+// **************              readwrite_property              ************** //
+// ************************************************************************** //
+
+template<class PropertyType>
+class readwrite_property : public class_property<PropertyType> {
+    typedef class_property<PropertyType>                base_prop;
+    typedef typename add_pointer<PropertyType>::type    arrow_res_t;
+    typedef typename base_prop::address_res_t           const_arrow_res_t;
+    typedef typename base_prop::write_param_t           write_param_t;
+public:
+                    readwrite_property() : base_prop() {}
+    explicit        readwrite_property( write_param_t init_value ) : base_prop( init_value ) {}
+
+    // access methods
+    void            set( write_param_t v )  { base_prop::value = v; }
+    arrow_res_t     operator->()            { return ndnboost::addressof( base_prop::value ); }
+    const_arrow_res_t operator->() const    { return ndnboost::addressof( base_prop::value ); }
+
+#ifndef BOOST_TEST_NO_PROTECTED_USING
+    using           base_prop::value;
+#endif
+};
+
+//____________________________________________________________________________//
+
+} // unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#undef BOOST_TEST_NO_PROTECTED_USING
+
+#endif // BOOST_TEST_CLASS_PROPERTIES_HPP_071894GER
diff --git a/ndnboost/test/utils/custom_manip.hpp b/ndnboost/test/utils/custom_manip.hpp
new file mode 100644
index 0000000..cf5d76d
--- /dev/null
+++ b/ndnboost/test/utils/custom_manip.hpp
@@ -0,0 +1,63 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : simple helpers for creating cusom output manipulators
+// ***************************************************************************
+
+#ifndef BOOST_TEST_CUSTOM_MANIP_HPP_071894GER
+#define BOOST_TEST_CUSTOM_MANIP_HPP_071894GER
+
+// STL
+#include <iosfwd>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************          custom manipulators helpers         ************** //
+// ************************************************************************** //
+
+template<typename Manip>
+struct custom_printer {
+    explicit custom_printer( std::ostream& ostr ) : m_ostr( &ostr ) {}
+
+    std::ostream& operator*() const { return *m_ostr; }
+
+private:
+    std::ostream* const m_ostr;
+};
+
+//____________________________________________________________________________//
+
+template<typename Uniq> struct custom_manip {};
+
+//____________________________________________________________________________//
+
+template<typename Uniq>
+inline custom_printer<custom_manip<Uniq> >
+operator<<( std::ostream& ostr, custom_manip<Uniq> const& ) { return custom_printer<custom_manip<Uniq> >( ostr ); }
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_CUSTOM_MANIP_HPP_071894GER
diff --git a/ndnboost/test/utils/fixed_mapping.hpp b/ndnboost/test/utils/fixed_mapping.hpp
new file mode 100644
index 0000000..dc08593
--- /dev/null
+++ b/ndnboost/test/utils/fixed_mapping.hpp
@@ -0,0 +1,124 @@
+//  (C) Copyright Gennadiy Rozental 2001-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : fixed sized mapping with specified invalid value
+// ***************************************************************************
+
+#ifndef BOOST_TEST_FIXED_MAPPING_HPP_071894GER
+#define BOOST_TEST_FIXED_MAPPING_HPP_071894GER
+
+// Boost
+#include <ndnboost/preprocessor/repetition/repeat.hpp>
+#include <ndnboost/preprocessor/arithmetic/add.hpp>
+#include <ndnboost/call_traits.hpp>
+#include <ndnboost/detail/binary_search.hpp>
+
+// STL
+#include <vector>
+#include <functional>
+#include <algorithm>
+#include <utility>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// configurable maximum fixed sized mapping size supported by this header.
+// You can redefine it before inclusion of this file.
+#ifndef MAX_MAP_SIZE
+#define MAX_MAP_SIZE 20
+#endif
+
+#define CONSTR_DECL_MID( z, i, dummy1 ) key_param_type key##i, value_param_type v##i,
+#define CONSTR_BODY_MID( z, i, dummy1 ) add_pair( key##i, v##i );
+
+#define CONSTR_DECL( z, n, dummy1 )                                 \
+    fixed_mapping( BOOST_PP_REPEAT_ ## z( n, CONSTR_DECL_MID, "" )  \
+                         value_param_type invalid_value )           \
+    : m_invalid_value( invalid_value )                              \
+    {                                                               \
+        BOOST_PP_REPEAT_ ## z( n, CONSTR_BODY_MID, "" )             \
+        init();                                                     \
+    }                                                               \
+/**/
+
+#define CONTRUCTORS( n ) BOOST_PP_REPEAT( n, CONSTR_DECL, "" )
+
+template<typename Key, typename Value, typename Compare = std::less<Key> >
+class fixed_mapping
+{
+    typedef std::pair<Key,Value>                            elem_type;
+    typedef std::vector<elem_type>                          map_type;
+    typedef typename std::vector<elem_type>::const_iterator iterator;
+
+    typedef typename call_traits<Key>::param_type           key_param_type;
+    typedef typename call_traits<Value>::param_type         value_param_type;
+    typedef typename call_traits<Value>::const_reference    value_ref_type;
+
+#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
+    struct p1; friend struct p1;
+    struct p2; friend struct p2;
+#endif
+
+    // bind( Compare(), bind(select1st<elem_type>(), _1),  bind(identity<Key>(), _2) )
+    struct p1 : public std::binary_function<elem_type,Key,bool>
+    {
+        bool operator()( elem_type const& x, Key const& y ) const { return Compare()( x.first, y ); }
+    };
+
+    // bind( Compare(), bind(select1st<elem_type>(), _1), bind(select1st<elem_type>(), _2) )
+    struct p2 : public std::binary_function<elem_type,elem_type,bool>
+    {
+        bool operator()( elem_type const& x, elem_type const& y ) const { return Compare()( x.first, y.first ); }
+    };
+
+public:
+    // Constructors
+    CONTRUCTORS( BOOST_PP_ADD( MAX_MAP_SIZE, 1 ) )
+
+    // key -> value access
+    value_ref_type  operator[]( key_param_type key ) const
+    {
+        iterator it = ndnboost::detail::lower_bound( m_map.begin(), m_map.end(), key, p1() );
+
+        return (it == m_map.end() || Compare()( key, it->first ) ) ? m_invalid_value : it->second;
+    }
+
+private:
+    // Implementation
+    void            init()                                                  { std::sort( m_map.begin(), m_map.end(), p2() ); }
+    void            add_pair( key_param_type key, value_param_type value )  { m_map.push_back( elem_type( key, value ) ); }
+
+    // Data members
+    Value           m_invalid_value;
+    map_type        m_map;
+};
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#undef MAX_MAP_SIZE
+#undef CONSTR_DECL_MID
+#undef CONSTR_BODY_MID
+#undef CONSTR_DECL
+#undef CONTRUCTORS
+
+#endif // BOOST_TEST_FIXED_MAPPING_HPP_071894GER
+
diff --git a/ndnboost/test/utils/foreach.hpp b/ndnboost/test/utils/foreach.hpp
new file mode 100644
index 0000000..8404e72
--- /dev/null
+++ b/ndnboost/test/utils/foreach.hpp
@@ -0,0 +1,281 @@
+//  (C) Copyright Eric Niebler 2004-2005
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : this is an abridged version of an excelent BOOST_FOREACH facility
+//  presented by Eric Niebler. I am so fond of it so I can't wait till it 
+//  going to be accepted into Boost. Also I need version with less number of dependencies 
+//  and more portable. This version doesn't support rvalues and will reeveluate it's 
+//  parameters, but should be good enough for my purposes.
+// ***************************************************************************
+
+#ifndef BOOST_TEST_FOREACH_HPP_021005GER
+#define BOOST_TEST_FOREACH_HPP_021005GER
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+
+// Boost
+#include <ndnboost/type.hpp>
+#include <ndnboost/mpl/bool.hpp>
+#include <ndnboost/test/detail/workaround.hpp>
+
+#include <ndnboost/type_traits/is_const.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+namespace for_each {
+
+// ************************************************************************** //
+// **************                  static_any                  ************** //
+// ************************************************************************** //
+
+struct static_any_base
+{
+    operator bool() const { return false; }
+};
+
+//____________________________________________________________________________//
+
+template<typename Iter>
+struct static_any : static_any_base
+{
+    static_any( Iter const& t ) : m_it( t ) {}
+
+    mutable Iter m_it;
+};
+
+//____________________________________________________________________________//
+
+typedef static_any_base const& static_any_t;
+
+//____________________________________________________________________________//
+
+template<typename Iter>
+inline Iter&
+static_any_cast( static_any_t a, Iter* = 0 )
+{
+    return static_cast<Iter&>( static_cast<static_any<Iter> const&>( a ).m_it );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                   is_const                   ************** //
+// ************************************************************************** //
+
+template<typename C>
+inline is_const<C>
+is_const_coll( C& )
+{
+    return is_const<C>();
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                     begin                    ************** //
+// ************************************************************************** //
+
+template<typename C>
+inline static_any<BOOST_DEDUCED_TYPENAME C::iterator>
+begin( C& t, mpl::false_ )
+{
+    return static_any<BOOST_DEDUCED_TYPENAME C::iterator>( t.begin() );
+}
+
+//____________________________________________________________________________//
+
+template<typename C>
+inline static_any<BOOST_DEDUCED_TYPENAME C::const_iterator>
+begin( C const& t, mpl::true_ )
+{
+    return static_any<BOOST_DEDUCED_TYPENAME C::const_iterator>( t.begin() );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                      end                     ************** //
+// ************************************************************************** //
+
+template<typename C>
+inline static_any<BOOST_DEDUCED_TYPENAME C::iterator>
+end( C& t, mpl::false_ )
+{
+    return static_any<BOOST_DEDUCED_TYPENAME C::iterator>( t.end() );
+}
+
+//____________________________________________________________________________//
+
+template<typename C>
+inline static_any<BOOST_DEDUCED_TYPENAME C::const_iterator>
+end( C const& t, mpl::true_ )
+{
+    return static_any<BOOST_DEDUCED_TYPENAME C::const_iterator>( t.end() );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                      done                    ************** //
+// ************************************************************************** //
+
+template<typename C>
+inline bool
+done( static_any_t cur, static_any_t end, C&, mpl::false_ )
+{
+    return  static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( cur ) ==
+            static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( end );
+}
+
+//____________________________________________________________________________//
+
+template<typename C>
+inline bool
+done( static_any_t cur, static_any_t end, C const&, mpl::true_ )
+{
+    return  static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( cur ) ==
+            static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( end );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                      next                    ************** //
+// ************************************************************************** //
+
+template<typename C>
+inline void
+next( static_any_t cur, C&, mpl::false_ )
+{
+    ++static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( cur );
+}
+
+//____________________________________________________________________________//
+
+template<typename C>
+inline void
+next( static_any_t cur, C const&, mpl::true_ )
+{
+    ++static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( cur );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                      deref                   ************** //
+// ************************************************************************** //
+
+template<class RefType,typename C>
+inline RefType
+deref( static_any_t cur, C&, ::ndnboost::type<RefType>, mpl::false_ )
+{
+    return *static_any_cast<BOOST_DEDUCED_TYPENAME C::iterator>( cur );
+}
+
+//____________________________________________________________________________//
+
+template<class RefType,typename C>
+inline RefType
+deref( static_any_t cur, C const&, ::ndnboost::type<RefType>, mpl::true_ )
+{
+    return *static_any_cast<BOOST_DEDUCED_TYPENAME C::const_iterator>( cur );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************              BOOST_TEST_FOREACH              ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_FE_ANY                   ::ndnboost::unit_test::for_each::static_any_t
+#define BOOST_TEST_FE_IS_CONST( COL )       ::ndnboost::unit_test::for_each::is_const_coll( COL )
+
+#define BOOST_TEST_FE_BEG( COL )            \
+    ::ndnboost::unit_test::for_each::begin(    \
+        COL,                                \
+        BOOST_TEST_FE_IS_CONST( COL ) )     \
+/**/
+
+#define BOOST_TEST_FE_END( COL )            \
+    ::ndnboost::unit_test::for_each::end(      \
+        COL,                                \
+        BOOST_TEST_FE_IS_CONST( COL ) )     \
+/**/
+
+#define BOOST_TEST_FE_DONE( COL )           \
+    ::ndnboost::unit_test::for_each::done(     \
+        BOOST_TEST_FE_CUR_VAR,              \
+        BOOST_TEST_FE_END_VAR,              \
+        COL,                                \
+        BOOST_TEST_FE_IS_CONST( COL ) )     \
+/**/
+
+#define BOOST_TEST_FE_NEXT( COL )           \
+    ::ndnboost::unit_test::for_each::next(     \
+        BOOST_TEST_FE_CUR_VAR,              \
+        COL,                                \
+        BOOST_TEST_FE_IS_CONST( COL ) )     \
+/**/
+
+#define BOOST_FOREACH_NOOP(COL)             \
+    ((void)&(COL))
+
+#define BOOST_TEST_FE_DEREF( COL, RefType ) \
+    ::ndnboost::unit_test::for_each::deref(    \
+        BOOST_TEST_FE_CUR_VAR,              \
+        COL,                                \
+        ::ndnboost::type<RefType >(),          \
+        BOOST_TEST_FE_IS_CONST( COL ) )     \
+/**/
+
+#if BOOST_WORKAROUND( BOOST_MSVC, == 1310 )
+#define BOOST_TEST_LINE_NUM
+#else
+#define BOOST_TEST_LINE_NUM     __LINE__
+#endif
+
+#define BOOST_TEST_FE_CUR_VAR   BOOST_JOIN( _fe_cur_, BOOST_TEST_LINE_NUM )
+#define BOOST_TEST_FE_END_VAR   BOOST_JOIN( _fe_end_, BOOST_TEST_LINE_NUM )
+#define BOOST_TEST_FE_CON_VAR   BOOST_JOIN( _fe_con_, BOOST_TEST_LINE_NUM )
+
+#define BOOST_TEST_FOREACH( RefType, var, COL )                                             \
+if( BOOST_TEST_FE_ANY BOOST_TEST_FE_CUR_VAR = BOOST_TEST_FE_BEG( COL ) ) {} else            \
+if( BOOST_TEST_FE_ANY BOOST_TEST_FE_END_VAR = BOOST_TEST_FE_END( COL ) ) {} else            \
+for( bool BOOST_TEST_FE_CON_VAR = true;                                                     \
+          BOOST_TEST_FE_CON_VAR && !BOOST_TEST_FE_DONE( COL );                              \
+          BOOST_TEST_FE_CON_VAR ? BOOST_TEST_FE_NEXT( COL ) : BOOST_FOREACH_NOOP( COL ))    \
+                                                                                            \
+    if( (BOOST_TEST_FE_CON_VAR = false, false) ) {} else                                    \
+    for( RefType var = BOOST_TEST_FE_DEREF( COL, RefType );                                 \
+         !BOOST_TEST_FE_CON_VAR; BOOST_TEST_FE_CON_VAR = true )                             \
+/**/
+
+//____________________________________________________________________________//
+
+} // namespace for_each
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_FOREACH_HPP_021005GER
diff --git a/ndnboost/test/utils/iterator/input_iterator_facade.hpp b/ndnboost/test/utils/iterator/input_iterator_facade.hpp
new file mode 100644
index 0000000..92968ac
--- /dev/null
+++ b/ndnboost/test/utils/iterator/input_iterator_facade.hpp
@@ -0,0 +1,109 @@
+//  (C) Copyright Gennadiy Rozental 2004-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : Input iterator facade 
+// ***************************************************************************
+
+#ifndef BOOST_INPUT_ITERATOR_FACADE_HPP_071894GER
+#define BOOST_INPUT_ITERATOR_FACADE_HPP_071894GER
+
+// Boost
+#include <ndnboost/iterator/iterator_facade.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************          input_iterator_core_access          ************** //
+// ************************************************************************** //
+
+class input_iterator_core_access
+{
+#if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+public:
+#else
+    template <class I, class V, class R, class TC> friend class input_iterator_facade;
+#endif
+
+    template <class Facade>
+    static bool get( Facade& f )
+    {
+        return f.get();
+    }
+
+private:
+    // objects of this class are useless
+    input_iterator_core_access(); //undefined
+};
+
+// ************************************************************************** //
+// **************            input_iterator_facade             ************** //
+// ************************************************************************** //
+
+template<typename Derived,
+         typename ValueType,
+         typename Reference = ValueType const&,
+         typename Traversal = single_pass_traversal_tag>
+class input_iterator_facade : public iterator_facade<Derived,ValueType,Traversal,Reference>
+{
+public:
+    // Constructor
+    input_iterator_facade() : m_valid( false ), m_value() {}
+
+protected: // provide access to the Derived
+    void                init()
+    {
+        m_valid = true;
+        increment();
+    }
+
+    // Data members
+    mutable bool        m_valid;
+    ValueType           m_value;
+
+private:
+    friend class ndnboost::iterator_core_access;
+
+    // iterator facade interface implementation
+    void                increment()
+    {
+        // we make post-end incrementation indefinetly safe 
+        if( m_valid )
+            m_valid = input_iterator_core_access::get( *static_cast<Derived*>(this) );
+    }
+    Reference           dereference() const
+    {
+        return m_value;
+    }
+
+    // iterator facade interface implementation
+    bool                equal( input_iterator_facade const& rhs ) const
+    {
+        // two invalid iterator equals, inequal otherwise
+        return !m_valid && !rhs.m_valid;
+    }
+};
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_INPUT_ITERATOR_FACADE_HPP_071894GER
+
diff --git a/ndnboost/test/utils/iterator/token_iterator.hpp b/ndnboost/test/utils/iterator/token_iterator.hpp
new file mode 100644
index 0000000..c1b2dbc
--- /dev/null
+++ b/ndnboost/test/utils/iterator/token_iterator.hpp
@@ -0,0 +1,418 @@
+//  (C) Copyright Gennadiy Rozental 2004-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : token iterator for string and range tokenization
+// ***************************************************************************
+
+#ifndef BOOST_TOKEN_ITERATOR_HPP_071894GER
+#define BOOST_TOKEN_ITERATOR_HPP_071894GER
+
+// Boost
+#include <ndnboost/config.hpp>
+#include <ndnboost/detail/workaround.hpp>
+
+#include <ndnboost/iterator/iterator_categories.hpp>
+#include <ndnboost/iterator/iterator_traits.hpp>
+
+#include <ndnboost/test/utils/iterator/input_iterator_facade.hpp>
+#include <ndnboost/test/utils/basic_cstring/basic_cstring.hpp>
+#include <ndnboost/test/utils/named_params.hpp>
+#include <ndnboost/test/utils/foreach.hpp>
+
+// STL
+#include <iosfwd>
+#include <cctype>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std{ using ::ispunct; using ::isspace; }
+#endif
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************               ti_delimeter_type              ************** //
+// ************************************************************************** //
+
+enum ti_delimeter_type { 
+    dt_char,        // character is delimeter if it among explicit list of some characters
+    dt_ispunct,     // character is delimeter if it satisfies ispunct functor
+    dt_isspace,     // character is delimeter if it satisfies isspace functor
+    dt_none         // no character is delimeter
+};
+
+namespace ut_detail {
+
+// ************************************************************************** //
+// **************             default_char_compare             ************** //
+// ************************************************************************** //
+
+template<typename CharT>
+class default_char_compare {
+public:
+    bool operator()( CharT c1, CharT c2 )
+    {
+#ifdef BOOST_CLASSIC_IOSTREAMS
+        return std::string_char_traits<CharT>::eq( c1, c2 );
+#else
+        return std::char_traits<CharT>::eq( c1, c2 );
+#endif
+    }
+};
+
+// ************************************************************************** //
+// **************                 delim_policy                 ************** //
+// ************************************************************************** //
+
+template<typename CharT,typename CharCompare>
+class delim_policy {
+    typedef basic_cstring<CharT const> cstring;
+public:
+    // Constructor
+    explicit    delim_policy( ti_delimeter_type t = dt_char, cstring d = cstring() )
+    : m_type( t )
+    {
+        set_delimeters( d );
+    }
+
+    void        set_delimeters( ti_delimeter_type t ) { m_type = t; }
+    template<typename Src>
+    void        set_delimeters( Src d )
+    {
+        nfp::optionally_assign( m_delimeters, d );
+        
+        if( !m_delimeters.is_empty() )
+            m_type = dt_char;
+    }
+
+    bool        operator()( CharT c )
+    {
+        switch( m_type ) {
+        case dt_char: {
+            BOOST_TEST_FOREACH( CharT, delim, m_delimeters )
+                if( CharCompare()( delim, c ) )
+                    return true;
+
+            return false;
+        }
+        case dt_ispunct:
+            return (std::ispunct)( c ) != 0;
+        case dt_isspace:
+            return (std::isspace)( c ) != 0;
+        case dt_none:
+            return false;
+        }
+
+        return false;
+    }
+
+private:
+    // Data members
+    cstring             m_delimeters;
+    ti_delimeter_type   m_type;
+};
+
+// ************************************************************************** //
+// **************                 token_assigner               ************** //
+// ************************************************************************** //
+
+template<typename TraversalTag>
+struct token_assigner {
+#if BOOST_WORKAROUND( BOOST_DINKUMWARE_STDLIB, < 306 )
+    template<typename Iterator, typename C, typename T>
+    static void assign( Iterator b, Iterator e, std::basic_string<C,T>& t )
+    { for( ; b != e; ++b ) t += *b; }
+    
+    template<typename Iterator, typename C>
+    static void assign( Iterator b, Iterator e, basic_cstring<C>& t )  { t.assign( b, e ); }
+#else
+    template<typename Iterator, typename Token>
+    static void assign( Iterator b, Iterator e, Token& t )  { t.assign( b, e ); }
+#endif
+    template<typename Iterator, typename Token>
+    static void append_move( Iterator& b, Token& )          { ++b; }
+};
+
+//____________________________________________________________________________//
+
+template<>
+struct token_assigner<single_pass_traversal_tag> {
+    template<typename Iterator, typename Token>
+    static void assign( Iterator b, Iterator e, Token& t )  {}
+
+    template<typename Iterator, typename Token>
+    static void append_move( Iterator& b, Token& t )        { t += *b; ++b; }
+};
+
+} // namespace ut_detail
+
+// ************************************************************************** //
+// **************                  modifiers                   ************** //
+// ************************************************************************** //
+
+namespace {
+nfp::keyword<struct dropped_delimeters_t >           dropped_delimeters;
+nfp::keyword<struct kept_delimeters_t >              kept_delimeters;
+nfp::typed_keyword<bool,struct keep_empty_tokens_t > keep_empty_tokens;
+nfp::typed_keyword<std::size_t,struct max_tokens_t > max_tokens;
+}
+
+// ************************************************************************** //
+// **************             token_iterator_base              ************** //
+// ************************************************************************** //
+
+template<typename Derived,
+         typename CharT,
+         typename CharCompare   = ut_detail::default_char_compare<CharT>,
+         typename ValueType     = basic_cstring<CharT const>,
+         typename Reference     = basic_cstring<CharT const>,
+         typename Traversal     = forward_traversal_tag>
+class token_iterator_base
+: public input_iterator_facade<Derived,ValueType,Reference,Traversal> {
+    typedef basic_cstring<CharT const>                                      cstring;
+    typedef ut_detail::delim_policy<CharT,CharCompare>                      delim_policy;
+    typedef input_iterator_facade<Derived,ValueType,Reference,Traversal>    base;
+
+protected:
+    // Constructor
+    explicit    token_iterator_base()
+    : m_is_dropped( dt_isspace )
+    , m_is_kept( dt_ispunct )
+    , m_keep_empty_tokens( false )
+    , m_tokens_left( static_cast<std::size_t>(-1) )
+    , m_token_produced( false )
+    {
+    }
+
+    template<typename Modifier>
+    void
+    apply_modifier( Modifier const& m )
+    {
+        if( m.has( dropped_delimeters ) )
+            m_is_dropped.set_delimeters( m[dropped_delimeters] );
+
+        if( m.has( kept_delimeters ) )
+            m_is_kept.set_delimeters( m[kept_delimeters] );
+
+        if( m.has( keep_empty_tokens ) )
+            m_keep_empty_tokens = true;
+
+        nfp::optionally_assign( m_tokens_left, m, max_tokens );
+    }
+
+    template<typename Iter> 
+    bool                    get( Iter& begin, Iter end )
+    {
+        typedef ut_detail::token_assigner<BOOST_DEDUCED_TYPENAME iterator_traversal<Iter>::type> Assigner;
+        Iter check_point;
+
+        this->m_value.clear();
+
+        if( !m_keep_empty_tokens ) {
+            while( begin != end && m_is_dropped( *begin ) )
+                ++begin;
+
+            if( begin == end )
+                return false;
+
+            check_point = begin;
+
+            if( m_tokens_left == 1 )
+                while( begin != end )
+                    Assigner::append_move( begin, this->m_value );
+            else if( m_is_kept( *begin ) )
+                Assigner::append_move( begin, this->m_value );
+            else
+                while( begin != end && !m_is_dropped( *begin ) && !m_is_kept( *begin ) )
+                    Assigner::append_move( begin, this->m_value );
+
+            --m_tokens_left;
+        } 
+        else { // m_keep_empty_tokens is true
+            check_point = begin;
+
+            if( begin == end ) {
+                if( m_token_produced ) 
+                    return false;
+
+                m_token_produced = true;
+            }
+            if( m_is_kept( *begin ) ) {
+                if( m_token_produced ) 
+                    Assigner::append_move( begin, this->m_value );
+
+                m_token_produced = !m_token_produced;
+            } 
+            else if( !m_token_produced && m_is_dropped( *begin ) )
+                m_token_produced = true;
+            else {
+                if( m_is_dropped( *begin ) )
+                    check_point = ++begin;
+
+                while( begin != end && !m_is_dropped( *begin ) && !m_is_kept( *begin ) )
+                    Assigner::append_move( begin, this->m_value );
+
+                m_token_produced = true;
+            }
+        }
+
+        Assigner::assign( check_point, begin, this->m_value );
+
+        return true;
+    }
+
+private:
+    // Data members
+    delim_policy            m_is_dropped;
+    delim_policy            m_is_kept;
+    bool                    m_keep_empty_tokens;
+    std::size_t             m_tokens_left;
+    bool                    m_token_produced;
+};
+
+// ************************************************************************** //
+// **************          basic_string_token_iterator         ************** //
+// ************************************************************************** //
+
+template<typename CharT,
+         typename CharCompare = ut_detail::default_char_compare<CharT> >
+class basic_string_token_iterator
+: public token_iterator_base<basic_string_token_iterator<CharT,CharCompare>,CharT,CharCompare> {
+    typedef basic_cstring<CharT const> cstring;
+    typedef token_iterator_base<basic_string_token_iterator<CharT,CharCompare>,CharT,CharCompare> base;
+public:
+    explicit    basic_string_token_iterator() {}
+    explicit    basic_string_token_iterator( cstring src )
+    : m_src( src )
+    {
+        this->init();
+    }
+
+    template<typename Src, typename Modifier>
+    basic_string_token_iterator( Src src, Modifier const& m )
+    : m_src( src )
+    {
+        this->apply_modifier( m );
+
+        this->init();
+    }
+
+private:
+    friend class input_iterator_core_access;
+
+    // input iterator implementation
+    bool        get()
+    {
+        typename cstring::iterator begin = m_src.begin();
+        bool res = base::get( begin, m_src.end() );
+
+        m_src.assign( begin, m_src.end() );
+
+        return res;
+    }
+
+    // Data members
+    cstring     m_src;
+};
+
+typedef basic_string_token_iterator<char>       string_token_iterator;
+typedef basic_string_token_iterator<wchar_t>    wstring_token_iterator;
+
+// ************************************************************************** //
+// **************              range_token_iterator            ************** //
+// ************************************************************************** //
+
+template<typename Iter,
+         typename CharCompare = ut_detail::default_char_compare<BOOST_DEDUCED_TYPENAME iterator_value<Iter>::type>,
+         typename ValueType   = std::basic_string<BOOST_DEDUCED_TYPENAME iterator_value<Iter>::type>,
+         typename Reference   = ValueType const&>
+class range_token_iterator
+: public token_iterator_base<range_token_iterator<Iter,CharCompare,ValueType,Reference>,
+                             typename iterator_value<Iter>::type,CharCompare,ValueType,Reference> {
+    typedef basic_cstring<typename ValueType::value_type> cstring;
+    typedef token_iterator_base<range_token_iterator<Iter,CharCompare,ValueType,Reference>,
+                                typename iterator_value<Iter>::type,CharCompare,ValueType,Reference> base;
+public:
+    explicit    range_token_iterator() {}
+    explicit    range_token_iterator( Iter begin, Iter end = Iter() )
+    : m_begin( begin ), m_end( end )
+    {
+        this->init();
+    }
+    range_token_iterator( range_token_iterator const& rhs )
+    : base( rhs )
+    {
+        if( this->m_valid ) {
+            m_begin = rhs.m_begin;
+            m_end   = rhs.m_end;
+        }
+    }
+
+    template<typename Modifier>
+    range_token_iterator( Iter begin, Iter end, Modifier const& m )
+    : m_begin( begin ), m_end( end )
+    {
+        this->apply_modifier( m );
+
+        this->init();
+    }
+
+private:
+    friend class input_iterator_core_access;
+
+    // input iterator implementation
+    bool        get()
+    {
+        return base::get( m_begin, m_end );
+    }
+
+    // Data members
+    Iter m_begin;
+    Iter m_end;
+};
+
+// ************************************************************************** //
+// **************            make_range_token_iterator         ************** //
+// ************************************************************************** //
+
+template<typename Iter>
+inline range_token_iterator<Iter>
+make_range_token_iterator( Iter begin, Iter end = Iter() )
+{
+    return range_token_iterator<Iter>( begin, end );
+}
+
+//____________________________________________________________________________//
+
+template<typename Iter,typename Modifier>
+inline range_token_iterator<Iter>
+make_range_token_iterator( Iter begin, Iter end, Modifier const& m )
+{
+    return range_token_iterator<Iter>( begin, end, m );
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TOKEN_ITERATOR_HPP_071894GER
+
diff --git a/ndnboost/test/utils/lazy_ostream.hpp b/ndnboost/test/utils/lazy_ostream.hpp
new file mode 100644
index 0000000..4b9a0a3
--- /dev/null
+++ b/ndnboost/test/utils/lazy_ostream.hpp
@@ -0,0 +1,114 @@
+//  (C) Copyright Gennadiy Rozental 2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : contains definition for all test tools in test toolbox
+// ***************************************************************************
+
+#ifndef BOOST_TEST_LAZY_OSTREAM_HPP_070708GER
+#define BOOST_TEST_LAZY_OSTREAM_HPP_070708GER
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+
+// STL
+#include <iosfwd>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                  lazy_ostream                ************** //
+// ************************************************************************** //
+
+namespace ndnboost {
+
+namespace unit_test {
+
+class lazy_ostream {
+public:
+    static lazy_ostream&    instance()                                              { static lazy_ostream inst; return inst; }
+
+    friend std::ostream&    operator<<( std::ostream& ostr, lazy_ostream const& o ) { return o( ostr ); }
+
+    // access method
+    bool                    empty() const                                           { return m_empty; }
+
+    // actual printing interface; to be accessed only by this class and children
+    virtual std::ostream&   operator()( std::ostream& ostr ) const                  { return ostr; }
+protected:
+    explicit                lazy_ostream( bool empty = true ) : m_empty( empty )    {}
+
+    // protected destructor to make sure right one is called
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+public:
+#endif
+    BOOST_TEST_PROTECTED_VIRTUAL ~lazy_ostream()                                    {}
+
+private:
+    // Data members
+    bool                    m_empty;
+};
+
+//____________________________________________________________________________//
+
+template<typename T>
+class lazy_ostream_impl : public lazy_ostream {
+public:
+    lazy_ostream_impl( lazy_ostream const& prev, T value )
+    : lazy_ostream( false )
+    , m_prev( prev )
+    , m_value( value )
+    {}
+private:
+    virtual std::ostream&   operator()( std::ostream& ostr ) const
+    {
+        return m_prev(ostr) << m_value;
+    }
+
+    // Data members
+    lazy_ostream const&     m_prev;
+    T                       m_value;
+};
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline lazy_ostream_impl<T const&>
+operator<<( lazy_ostream const& prev, T const& v )
+{
+    return lazy_ostream_impl<T const&>( prev, v );
+}
+
+//____________________________________________________________________________//
+
+#if BOOST_TEST_USE_STD_LOCALE
+
+template<typename R,typename S>
+inline lazy_ostream_impl<R& (BOOST_TEST_CALL_DECL *)(S&)>
+operator<<( lazy_ostream const& prev, R& (BOOST_TEST_CALL_DECL *man)(S&) )
+{
+    return lazy_ostream_impl<R& (BOOST_TEST_CALL_DECL *)(S&)>( prev, man );
+}
+
+//____________________________________________________________________________//
+
+#endif
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_LAZY_OSTREAM_HPP_070708GER
diff --git a/ndnboost/test/utils/named_params.hpp b/ndnboost/test/utils/named_params.hpp
new file mode 100644
index 0000000..371d594
--- /dev/null
+++ b/ndnboost/test/utils/named_params.hpp
@@ -0,0 +1,329 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : facilities for named function parameters support
+// ***************************************************************************
+
+#ifndef BOOST_TEST_NAMED_PARAM_022505GER
+#define BOOST_TEST_NAMED_PARAM_022505GER
+
+// Boost
+#include <ndnboost/config.hpp>
+#include <ndnboost/detail/workaround.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/rtti.hpp>
+#include <ndnboost/test/utils/assign_op.hpp>
+
+#include <ndnboost/type_traits/remove_reference.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace nfp { // named function parameters
+
+// ************************************************************************** //
+// **************              forward declarations            ************** //
+// ************************************************************************** //
+
+template<typename T, typename unique_id,typename RefType>   struct named_parameter;
+template<typename unique_id,bool required>                  struct keyword;
+
+namespace nfp_detail {
+
+template<typename NP1,typename NP2>        struct named_parameter_combine;
+
+// ************************************************************************** //
+// **************          access_to_invalid_parameter         ************** //
+// ************************************************************************** //
+
+struct access_to_invalid_parameter {};
+
+//____________________________________________________________________________//
+
+inline void 
+report_access_to_invalid_parameter()
+{
+    throw access_to_invalid_parameter();
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                       nil                    ************** //
+// ************************************************************************** //
+
+struct nil {
+    template<typename T>
+#if defined(__GNUC__) || defined(__HP_aCC) || defined(__EDG__) || defined(__SUNPRO_CC)
+    operator T() const
+#else
+    operator T const&() const
+#endif
+    { report_access_to_invalid_parameter(); static T* v = 0; return *v; }
+
+    template<typename T>
+    T any_cast() const
+    { report_access_to_invalid_parameter(); static typename remove_reference<T>::type* v = 0; return *v; }
+
+    template<typename Arg1>
+    nil operator()( Arg1 const& )
+    { report_access_to_invalid_parameter(); return nil(); }
+
+    template<typename Arg1,typename Arg2>
+    nil operator()( Arg1 const&, Arg2 const& )
+    { report_access_to_invalid_parameter(); return nil(); }
+
+    template<typename Arg1,typename Arg2,typename Arg3>
+    nil operator()( Arg1 const&, Arg2 const&, Arg3 const& )
+    { report_access_to_invalid_parameter(); return nil(); }
+
+    // Visitation support
+    template<typename Visitor>
+    void            apply_to( Visitor& V ) const {}
+
+    static nil&     inst() { static nil s_inst; return s_inst; }
+private:
+    nil() {}
+};
+    
+// ************************************************************************** //
+// **************              named_parameter_base            ************** //
+// ************************************************************************** //
+
+template<typename Derived>
+struct named_parameter_base {
+    template<typename NP>
+    named_parameter_combine<NP,Derived>
+    operator,( NP const& np ) const { return named_parameter_combine<NP,Derived>( np, *static_cast<Derived const*>(this) ); }
+};
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************             named_parameter_combine          ************** //
+// ************************************************************************** //
+
+template<typename NP, typename Rest = nil>
+struct named_parameter_combine 
+: Rest
+, named_parameter_base<named_parameter_combine<NP,Rest> > {
+    typedef typename NP::ref_type  res_type;
+    typedef named_parameter_combine<NP,Rest> self_type;
+
+    // Constructor
+    named_parameter_combine( NP const& np, Rest const& r )
+    : Rest( r )
+    , m_param( np )
+    {}
+
+    // Access methods
+    res_type    operator[]( keyword<typename NP::id,true> kw ) const    { return m_param[kw]; }
+    res_type    operator[]( keyword<typename NP::id,false> kw ) const   { return m_param[kw]; }
+    using       Rest::operator[];
+
+    bool        has( keyword<typename NP::id,false> kw ) const          { return m_param.has( kw ); }
+    using       Rest::has;
+
+    void        erase( keyword<typename NP::id,false> kw ) const        { m_param.erase( kw ); }
+    using       Rest::erase;
+
+#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) || \
+    BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0610))
+    template<typename NP>
+    named_parameter_combine<NP,self_type> operator,( NP const& np ) const
+    { return named_parameter_combine<NP,self_type>( np, *this ); }
+#else
+    using       named_parameter_base<named_parameter_combine<NP,Rest> >::operator,;
+#endif
+
+    // Visitation support
+    template<typename Visitor>
+    void            apply_to( Visitor& V ) const
+    {
+        m_param.apply_to( V );
+
+        Rest::apply_to( V );
+    }
+private:
+    // Data members
+    NP          m_param;
+};
+
+} // namespace nfp_detail
+
+// ************************************************************************** //
+// **************                 named_parameter              ************** //
+// ************************************************************************** //
+
+template<typename T, typename unique_id,typename ReferenceType=T&>
+struct named_parameter
+: nfp_detail::named_parameter_base<named_parameter<T, unique_id,ReferenceType> >
+{
+    typedef nfp_detail::nil nil_t;
+    typedef T               data_type;
+    typedef ReferenceType   ref_type;
+    typedef unique_id       id;
+
+    // Constructor
+    explicit        named_parameter( ref_type v ) 
+    : m_value( v )
+    , m_erased( false )
+    {}
+    named_parameter( named_parameter const& np )
+    : m_value( np.m_value )
+    , m_erased( np.m_erased )
+    {}
+
+    // Access methods
+    ref_type        operator[]( keyword<unique_id,true> ) const     { return m_erased ? nil_t::inst().template any_cast<ref_type>() :  m_value; }
+    ref_type        operator[]( keyword<unique_id,false> ) const    { return m_erased ? nil_t::inst().template any_cast<ref_type>() :  m_value; }
+    template<typename UnknownId>
+    nil_t           operator[]( keyword<UnknownId,false> ) const    { return nil_t::inst(); }
+
+    bool            has( keyword<unique_id,false> ) const           { return !m_erased; }
+    template<typename UnknownId>
+    bool            has( keyword<UnknownId,false> ) const           { return false; }
+
+    void            erase( keyword<unique_id,false> ) const         { m_erased = true; }
+    template<typename UnknownId>
+    void            erase( keyword<UnknownId,false> ) const         {}
+
+    // Visitation support
+    template<typename Visitor>
+    void            apply_to( Visitor& V ) const
+    {
+        V.set_parameter( rtti::type_id<unique_id>(), m_value );
+    }
+
+private:
+    // Data members
+    ref_type        m_value;
+    mutable bool    m_erased;
+};
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                    no_params                 ************** //
+// ************************************************************************** //
+
+namespace nfp_detail {
+typedef named_parameter<char, struct no_params_type_t,char> no_params_type;
+} // namespace nfp_detail
+
+namespace {
+nfp_detail::no_params_type no_params( '\0' );
+} // local namespace
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                     keyword                  ************** //
+// ************************************************************************** //
+
+template<typename unique_id, bool required = false>
+struct keyword {
+    typedef unique_id id;
+
+    template<typename T>
+    named_parameter<T const,unique_id>
+    operator=( T const& t ) const       { return named_parameter<T const,unique_id>( t ); }
+
+    template<typename T>
+    named_parameter<T,unique_id>
+    operator=( T& t ) const   { return named_parameter<T,unique_id>( t ); }
+
+    named_parameter<char const*,unique_id,char const*>
+    operator=( char const* t ) const   { return named_parameter<char const*,unique_id,char const*>( t ); }
+};
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                  typed_keyword               ************** //
+// ************************************************************************** //
+
+template<typename T, typename unique_id, bool required = false>
+struct typed_keyword : keyword<unique_id,required> {
+    named_parameter<T const,unique_id>
+    operator=( T const& t ) const       { return named_parameter<T const,unique_id>( t ); }
+
+    named_parameter<T,unique_id>
+    operator=( T& t ) const             { return named_parameter<T,unique_id>( t ); }
+};
+
+//____________________________________________________________________________//
+
+template<typename unique_id>
+struct typed_keyword<bool,unique_id,false>
+: keyword<unique_id,false>
+, named_parameter<bool,unique_id,bool> {
+    typedef unique_id id;
+
+    typed_keyword() : named_parameter<bool,unique_id,bool>( true ) {}
+
+    named_parameter<bool,unique_id,bool>
+    operator!() const           { return named_parameter<bool,unique_id,bool>( false ); }
+};
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************                optionally_assign             ************** //
+// ************************************************************************** //
+
+template<typename T>
+inline void
+optionally_assign( T&, nfp_detail::nil )
+{
+    nfp_detail::report_access_to_invalid_parameter();
+}
+
+//____________________________________________________________________________//
+
+template<typename T, typename Source>
+inline void
+#if BOOST_WORKAROUND( __MWERKS__, BOOST_TESTED_AT( 0x3003 ) ) \
+    || BOOST_WORKAROUND( __DECCXX_VER, BOOST_TESTED_AT(60590042) )
+optionally_assign( T& target, Source src )
+#else
+optionally_assign( T& target, Source const& src )
+#endif
+{
+    using namespace unit_test;
+
+    assign_op( target, src, static_cast<int>(0) );
+}
+
+//____________________________________________________________________________//
+
+template<typename T, typename Params, typename Keyword>
+inline void
+optionally_assign( T& target, Params const& p, Keyword k )
+{
+    if( p.has(k) )
+        optionally_assign( target, p[k] );
+}
+
+//____________________________________________________________________________//
+
+} // namespace nfp
+
+} // namespace ndnboost
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_NAMED_PARAM_022505GER
+
diff --git a/ndnboost/test/utils/rtti.hpp b/ndnboost/test/utils/rtti.hpp
new file mode 100644
index 0000000..2413106
--- /dev/null
+++ b/ndnboost/test/utils/rtti.hpp
@@ -0,0 +1,64 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : simple facilities for accessing type information at runtime
+// ***************************************************************************
+
+#ifndef BOOST_TEST_RTTI_HPP_062604GER
+#define BOOST_TEST_RTTI_HPP_062604GER
+
+#include <cstddef>
+
+namespace ndnboost {
+
+namespace rtti {
+
+// ************************************************************************** //
+// **************                   rtti::type_id              ************** //
+// ************************************************************************** //
+
+typedef std::ptrdiff_t id_t;
+
+namespace rtti_detail {
+
+template<typename T>
+struct rttid_holder {
+    static id_t id() { return reinterpret_cast<id_t>( &inst() ); }
+
+private:
+    struct rttid {};
+
+    static rttid const& inst() { static rttid s_inst;  return s_inst; }
+};
+
+} // namespace rtti_detail
+
+//____________________________________________________________________________//
+
+template<typename T>   
+inline id_t
+type_id()
+{
+    return rtti_detail::rttid_holder<T>::id();
+}
+
+//____________________________________________________________________________//
+
+#define BOOST_RTTI_SWITCH( type_id_ ) if( ::ndnboost::rtti::id_t switch_by_id = type_id_ )
+#define BOOST_RTTI_CASE( type )       if( switch_by_id == ::ndnboost::rtti::type_id<type>() )
+
+//____________________________________________________________________________//
+
+} // namespace rtti
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_RTTI_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/argument.hpp b/ndnboost/test/utils/runtime/argument.hpp
new file mode 100644
index 0000000..c14956c
--- /dev/null
+++ b/ndnboost/test/utils/runtime/argument.hpp
@@ -0,0 +1,112 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : model of actual argument (both typed and abstract interface)
+// ***************************************************************************
+
+#ifndef BOOST_RT_ARGUMENT_HPP_062604GER
+#define BOOST_RT_ARGUMENT_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/class_properties.hpp>
+#include <ndnboost/test/utils/rtti.hpp>
+
+// STL
+#include <cassert>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+// ************************************************************************** //
+// **************              runtime::argument               ************** //
+// ************************************************************************** //
+
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable:4244)
+#endif
+
+class argument {
+public:
+    // Constructor
+    argument( parameter const& p, rtti::id_t value_type )
+    : p_formal_parameter( p )
+    , p_value_type( value_type )
+    {}
+
+    // Destructor
+    virtual     ~argument()  {}
+
+    // Public properties
+    unit_test::readonly_property<parameter const&> p_formal_parameter;
+    unit_test::readonly_property<rtti::id_t>       p_value_type;
+};
+
+// ************************************************************************** //
+// **************             runtime::typed_argument          ************** //
+// ************************************************************************** //
+
+template<typename T>
+class typed_argument : public argument {
+public:
+    // Constructor
+    explicit typed_argument( parameter const& p )
+    : argument( p, rtti::type_id<T>() )
+    {}
+    typed_argument( parameter const& p, T const& t )
+    : argument( p, rtti::type_id<T>() )
+    , p_value( t )
+    {}
+
+    unit_test::readwrite_property<T>    p_value;
+};
+
+// ************************************************************************** //
+// **************               runtime::arg_value             ************** //
+// ************************************************************************** //
+
+template<typename T>
+inline T const&
+arg_value( argument const& arg_ )
+{
+    assert( arg_.p_value_type == rtti::type_id<T>() ); // detect logic error
+
+    return static_cast<typed_argument<T> const&>( arg_ ).p_value.value;
+}
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline T&
+arg_value( argument& arg_ )
+{
+    assert( arg_.p_value_type == rtti::type_id<T>() ); // detect logic error
+
+    return static_cast<typed_argument<T>&>( arg_ ).p_value.value;
+}
+
+#ifdef BOOST_MSVC
+#  pragma warning(pop)
+#endif
+
+//____________________________________________________________________________//
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_ARGUMENT_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/argument_factory.hpp b/ndnboost/test/utils/runtime/cla/argument_factory.hpp
new file mode 100644
index 0000000..4f6709b
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/argument_factory.hpp
@@ -0,0 +1,218 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : generic typed_argument_factory implementation
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_ARGUMENT_FACTORY_HPP_062604GER
+#define BOOST_RT_CLA_ARGUMENT_FACTORY_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+#include <ndnboost/test/utils/runtime/argument.hpp>
+#include <ndnboost/test/utils/runtime/trace.hpp>
+#include <ndnboost/test/utils/runtime/interpret_argument_value.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+#include <ndnboost/test/utils/runtime/cla/value_generator.hpp>
+#include <ndnboost/test/utils/runtime/cla/value_handler.hpp>
+#include <ndnboost/test/utils/runtime/cla/validation.hpp>
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+#include <ndnboost/test/utils/runtime/cla/detail/argument_value_usage.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/iface/argument_factory.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/callback.hpp>
+
+// Boost
+#include <ndnboost/optional.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************           default_value_interpreter          ************** //
+// ************************************************************************** //
+
+namespace rt_cla_detail {
+
+struct default_value_interpreter {
+    template<typename T>
+    void operator()( argv_traverser& tr, ndnboost::optional<T>& value )
+    {
+        if( interpret_argument_value( tr.token(), value, 0 ) )
+            tr.next_token();
+    }
+};
+
+} // namespace rt_cla_detail
+
+// ************************************************************************** //
+// **************             typed_argument_factory           ************** //
+// ************************************************************************** //
+
+template<typename T>
+struct typed_argument_factory : public argument_factory {
+    // Constructor
+    typed_argument_factory()
+    : m_value_interpreter( rt_cla_detail::default_value_interpreter() )
+    {}
+    BOOST_RT_PARAM_UNNEEDED_VIRTUAL ~typed_argument_factory() {}
+
+    // properties modification
+    template<typename Modifier>
+    void                accept_modifier( Modifier const& m )
+    {
+        optionally_assign( m_value_handler, m, handler );
+        optionally_assign( m_value_interpreter, m, interpreter );
+
+        if( m.has( default_value ) ) {
+            BOOST_RT_PARAM_VALIDATE_LOGIC( !m_value_generator, 
+                BOOST_RT_PARAM_LITERAL( "multiple value generators for parameter" ) );
+
+            T const& dv_ref = m[default_value];
+            m_value_generator = rt_cla_detail::const_generator<T>( dv_ref );
+        }
+
+        if( m.has( default_refer_to ) ) {
+            BOOST_RT_PARAM_VALIDATE_LOGIC( !m_value_generator, 
+                BOOST_RT_PARAM_LITERAL( "multiple value generators for parameter" ) );
+
+            cstring ref_id = m[default_refer_to];
+            m_value_generator = rt_cla_detail::ref_generator<T>( ref_id );
+        }
+
+        if( m.has( assign_to ) ) {
+            BOOST_RT_PARAM_VALIDATE_LOGIC( !m_value_handler, 
+                BOOST_RT_PARAM_LITERAL( "multiple value handlers for parameter" ) );
+
+            m_value_handler = rt_cla_detail::assigner<T>( m[assign_to] );
+        }
+    }
+
+    // Argument factory implementation
+    virtual argument_ptr produce_using( parameter& p, argv_traverser& tr );
+    virtual argument_ptr produce_using( parameter& p, parser const& );
+    virtual void         argument_usage_info( format_stream& fs );
+
+// !! private?
+    // Data members
+    unit_test::callback2<parameter const&,T&>                   m_value_handler;
+    unit_test::callback2<parser const&,ndnboost::optional<T>&>     m_value_generator;
+    unit_test::callback2<argv_traverser&,ndnboost::optional<T>&>   m_value_interpreter;
+};
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline argument_ptr
+typed_argument_factory<T>::produce_using( parameter& p, argv_traverser& tr )
+{
+    ndnboost::optional<T> value;
+
+    try {
+        m_value_interpreter( tr, value );
+    }
+    catch( ... ) { // !! should we do that?
+        BOOST_RT_PARAM_TRACE( "Fail to parse argument value" );
+
+        if( !p.p_optional_value )
+            throw;
+    }
+
+    argument_ptr actual_arg = p.actual_argument();
+
+    BOOST_RT_CLA_VALIDATE_INPUT( !!value || p.p_optional_value, tr, 
+        BOOST_RT_PARAM_LITERAL( "Argument value missing for parameter " ) << p.id_2_report() );
+
+    BOOST_RT_CLA_VALIDATE_INPUT( !actual_arg || p.p_multiplicable, tr, 
+        BOOST_RT_PARAM_LITERAL( "Unexpected repetition of the parameter " ) << p.id_2_report() );
+
+    if( !!value && !!m_value_handler )
+        m_value_handler( p, *value );
+
+    if( !p.p_multiplicable )
+        actual_arg.reset( p.p_optional_value && (rtti::type_id<T>() != rtti::type_id<bool>())
+            ? static_cast<argument*>(new typed_argument<ndnboost::optional<T> >( p, value ))
+            : static_cast<argument*>(new typed_argument<T>( p, *value )) );
+    else {
+        typedef std::list<ndnboost::optional<T> > optional_list;
+
+        if( !actual_arg )
+            actual_arg.reset( p.p_optional_value 
+                ? static_cast<argument*>(new typed_argument<optional_list>( p ))
+                : static_cast<argument*>(new typed_argument<std::list<T> >( p )) );
+
+        if( p.p_optional_value ) {
+            optional_list& values = arg_value<optional_list>( *actual_arg );
+
+            values.push_back( value );
+        }
+        else {
+            std::list<T>& values = arg_value<std::list<T> >( *actual_arg );
+            
+            values.push_back( *value );
+        }
+    }
+
+    return actual_arg;
+}
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline argument_ptr 
+typed_argument_factory<T>::produce_using( parameter& p, parser const& pa )
+{
+    argument_ptr actual_arg;
+
+    if( !m_value_generator )
+        return actual_arg;
+
+    ndnboost::optional<T> value;
+    m_value_generator( pa, value );
+
+    if( !value )
+        return actual_arg;
+
+    if( !!m_value_handler )
+        m_value_handler( p, *value );
+
+    actual_arg.reset( new typed_argument<T>( p, *value ) );
+
+    return actual_arg;
+}
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline void
+typed_argument_factory<T>::argument_usage_info( format_stream& fs )
+{
+    rt_cla_detail::argument_value_usage( fs, 0, reinterpret_cast<T*>(0) );
+}
+
+//____________________________________________________________________________//
+
+} // namespace ndnboost
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace cla
+
+#endif // BOOST_RT_CLA_ARGUMENT_FACTORY_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/argv_traverser.hpp b/ndnboost/test/utils/runtime/cla/argv_traverser.hpp
new file mode 100644
index 0000000..8674bd2
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/argv_traverser.hpp
@@ -0,0 +1,98 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : defines facility to hide input traversing details
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_ARGV_TRAVERSER_HPP_062604GER
+#define BOOST_RT_CLA_ARGV_TRAVERSER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/class_properties.hpp>
+
+// Boost
+#include <ndnboost/noncopyable.hpp>
+#include <ndnboost/shared_array.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************          runtime::cla::argv_traverser        ************** //
+// ************************************************************************** //
+
+class argv_traverser : noncopyable {
+    class parser;
+public:
+    // Constructor
+    argv_traverser();
+
+    // public_properties
+    unit_test::readwrite_property<bool>         p_ignore_mismatch;
+    unit_test::readwrite_property<char_type>    p_separator;
+
+    // argc+argv <-> internal buffer exchange
+    void            init( int argc, char_type** argv );
+    void            remainder( int& argc, char_type** argv );
+
+    // token based parsing
+    cstring         token() const;
+    void            next_token();
+
+    // whole input parsing
+    cstring         input() const;
+    void            trim( std::size_t size );
+    bool            match_front( cstring );
+    bool            match_front( char_type c );
+    bool            eoi() const;
+
+    // transaction logic support
+    void            commit();
+    void            rollback();
+
+    // current position access; used to save some reference points in input
+    std::size_t     input_pos() const;
+
+    // returns true if mismatch detected during input parsing handled successfully
+    bool            handle_mismatch();
+
+private:
+    // Data members
+    dstring                 m_buffer;
+    cstring                 m_work_buffer;
+
+    cstring                 m_token;
+    cstring::iterator       m_commited_end;
+
+    shared_array<char_type> m_remainder;
+    std::size_t             m_remainder_size;
+};
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/argv_traverser.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_ARGV_TRAVERSER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/argv_traverser.ipp b/ndnboost/test/utils/runtime/cla/argv_traverser.ipp
new file mode 100644
index 0000000..da03cd9
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/argv_traverser.ipp
@@ -0,0 +1,209 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : implements facility to hide input traversing details
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_ARGV_TRAVERSER_IPP_070604GER
+#define BOOST_RT_CLA_ARGV_TRAVERSER_IPP_070604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/trace.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+
+// STL
+#include <memory>
+#include <cstring>
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::memcpy; }
+#endif
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************          runtime::cla::argv_traverser        ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE
+argv_traverser::argv_traverser()
+: p_ignore_mismatch( false ), p_separator( BOOST_RT_PARAM_LITERAL( ' ' ) )
+{
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+argv_traverser::init( int argc, char_type** argv )
+{
+    for( int index = 1; index < argc; ++index ) {
+        m_buffer += argv[index];
+        if( index != argc-1 )
+            m_buffer += BOOST_RT_PARAM_LITERAL( ' ' );
+    }
+
+    m_remainder.reset( new char_type[m_buffer.size()+1] );
+    m_remainder_size    = 0;
+    m_work_buffer       = m_buffer;
+    m_commited_end      = m_work_buffer.begin();
+
+    BOOST_RT_PARAM_TRACE( "Input buffer: " << m_buffer );
+
+    next_token();
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+argv_traverser::remainder( int& argc, char_type** argv )
+{
+    argc = 1;
+    std::size_t pos = 0;
+    while(pos < m_remainder_size ) {
+        argv[argc++] = m_remainder.get() + pos;
+
+        pos = std::find( m_remainder.get() + pos, m_remainder.get() + m_remainder_size, 
+                         BOOST_RT_PARAM_LITERAL( ' ' ) ) - m_remainder.get();
+        m_remainder[pos++] = BOOST_RT_PARAM_LITERAL( '\0' );
+    }
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE cstring
+argv_traverser::token() const
+{
+    return m_token;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+argv_traverser::next_token()
+{
+    if( m_work_buffer.is_empty() )
+        return;
+
+    m_work_buffer.trim_left( m_token.size() ); // skip remainder of current token
+
+    if( m_work_buffer.size() != m_buffer.size() ) // !! is there a better way to identify first token
+        m_work_buffer.trim_left( 1 ); // skip separator if not first token;
+
+    m_token.assign( m_work_buffer.begin(),
+                    std::find( m_work_buffer.begin(), m_work_buffer.end(), p_separator ) );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE cstring
+argv_traverser::input() const
+{
+    return m_work_buffer;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+argv_traverser::trim( std::size_t size )
+{
+    m_work_buffer.trim_left( size );
+
+    if( size <= m_token.size() )
+        m_token.trim_left( size );
+    else {
+        m_token.assign( m_work_buffer.begin(),
+                        std::find( m_work_buffer.begin(), m_work_buffer.end(), p_separator ) );
+    }
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+argv_traverser::match_front( cstring str )
+{
+    return m_work_buffer.size() < str.size() ? false : m_work_buffer.substr( 0, str.size() ) == str;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+argv_traverser::match_front( char_type c )
+{
+    return first_char( m_work_buffer ) == c;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+argv_traverser::eoi() const
+{
+    return m_work_buffer.is_empty();
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+argv_traverser::commit()
+{
+    m_commited_end = m_work_buffer.begin();
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+argv_traverser::rollback()
+{
+    m_work_buffer.assign( m_commited_end, m_work_buffer.end() );
+    m_token.assign( m_work_buffer.begin(),
+                    std::find( m_work_buffer.begin(), m_work_buffer.end(), p_separator ) );
+
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE std::size_t
+argv_traverser::input_pos() const
+{
+    return m_work_buffer.begin() - m_commited_end;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+argv_traverser::handle_mismatch()
+{
+    if( !p_ignore_mismatch )
+        return false;
+
+    std::memcpy( m_remainder.get() + m_remainder_size, token().begin(), token().size() );
+    m_remainder_size += token().size();
+    m_remainder[m_remainder_size++] = p_separator;
+
+    next_token();
+    commit();
+
+    return true;
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_ARGV_TRAVERSER_IPP_070604GER
diff --git a/ndnboost/test/utils/runtime/cla/basic_parameter.hpp b/ndnboost/test/utils/runtime/cla/basic_parameter.hpp
new file mode 100644
index 0000000..39ebb72
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/basic_parameter.hpp
@@ -0,0 +1,85 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : generic custom parameter generator
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_BASIC_PARAMETER_HPP_062604GER
+#define BOOST_RT_CLA_BASIC_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/typed_parameter.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/rtti.hpp>
+
+// Boost
+#include <ndnboost/utility/base_from_member.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************         runtime::cla::basic_parameter        ************** //
+// ************************************************************************** //
+
+template<typename T, typename IdPolicy>
+class basic_parameter : private base_from_member<IdPolicy>, public typed_parameter<T> {
+public:
+    // Constructors
+    explicit    basic_parameter( cstring n ) 
+    : base_from_member<IdPolicy>()
+    , typed_parameter<T>( base_from_member<IdPolicy>::member )
+    {
+        this->accept_modifier( name = n );
+    }
+
+    // parameter properties modification
+    template<typename Modifier>
+    void        accept_modifier( Modifier const& m )
+    {
+        typed_parameter<T>::accept_modifier( m );
+
+        base_from_member<IdPolicy>::member.accept_modifier( m );
+    }
+};
+
+//____________________________________________________________________________//
+
+#define BOOST_RT_CLA_NAMED_PARAM_GENERATORS( param_type )                                       \
+template<typename T>                                                                            \
+inline shared_ptr<param_type ## _t<T> >                                                         \
+param_type( cstring name = cstring() )                                                          \
+{                                                                                               \
+    return shared_ptr<param_type ## _t<T> >( new param_type ## _t<T>( name ) );                 \
+}                                                                                               \
+                                                                                                \
+inline shared_ptr<param_type ## _t<cstring> >                                                   \
+param_type( cstring name = cstring() )                                                          \
+{                                                                                               \
+    return shared_ptr<param_type ## _t<cstring> >( new param_type ## _t<cstring>( name ) );     \
+}                                                                                               \
+/**/
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_BASIC_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/char_parameter.hpp b/ndnboost/test/utils/runtime/cla/char_parameter.hpp
new file mode 100644
index 0000000..d95b95b
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/char_parameter.hpp
@@ -0,0 +1,98 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : defines model of parameter with single char name
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_CHAR_PARAMETER_HPP_062604GER
+#define BOOST_RT_CLA_CHAR_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/basic_parameter.hpp>
+#include <ndnboost/test/utils/runtime/cla/id_policy.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************               char_name_policy               ************** //
+// ************************************************************************** //
+
+class char_name_policy : public basic_naming_policy {
+public:
+    // Constructor
+    char_name_policy();
+    BOOST_RT_PARAM_UNNEEDED_VIRTUAL ~char_name_policy() {}
+
+    // policy interface
+    virtual bool    conflict_with( identification_policy const& ) const;
+
+    // Accept modifier
+    template<typename Modifier>
+    void            accept_modifier( Modifier const& m )
+    {
+        basic_naming_policy::accept_modifier( m );
+
+        BOOST_RT_PARAM_VALIDATE_LOGIC( p_name->size() <= 1, "Invalid parameter name "  << p_name );
+    }
+};
+
+// ************************************************************************** //
+// **************          runtime::cla::char_parameter        ************** //
+// ************************************************************************** //
+
+template<typename T>
+class char_parameter_t : public basic_parameter<T,char_name_policy> {
+    typedef basic_parameter<T,char_name_policy> base;
+public:
+    // Constructors
+    explicit    char_parameter_t( char_type name ) : base( cstring( &name, 1 ) ) {}
+};
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline shared_ptr<char_parameter_t<T> >
+char_parameter( char_type name )
+{
+    return shared_ptr<char_parameter_t<T> >( new char_parameter_t<T>( name ) );
+}
+
+//____________________________________________________________________________//
+
+inline shared_ptr<char_parameter_t<cstring> >
+char_parameter( char_type name )
+{
+    return shared_ptr<char_parameter_t<cstring> >( new char_parameter_t<cstring>( name ) );
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/char_parameter.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_CHAR_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/char_parameter.ipp b/ndnboost/test/utils/runtime/cla/char_parameter.ipp
new file mode 100644
index 0000000..5922902
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/char_parameter.ipp
@@ -0,0 +1,57 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : implements model of parameter with single char name
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_CHAR_PARAMETER_IPP_062904GER
+#define BOOST_RT_CLA_CHAR_PARAMETER_IPP_062904GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/char_parameter.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************               char_name_policy               ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE 
+char_name_policy::char_name_policy()
+: basic_naming_policy( rtti::type_id<char_name_policy>() )
+{
+    assign_op( p_prefix.value, BOOST_RT_PARAM_CSTRING_LITERAL( "-" ), 0 );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+char_name_policy::conflict_with( identification_policy const& id ) const
+{
+    return id.p_type_id == p_type_id && 
+           p_name == static_cast<char_name_policy const&>( id ).p_name;
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_CHAR_PARAMETER_IPP_062904GER
diff --git a/ndnboost/test/utils/runtime/cla/detail/argument_value_usage.hpp b/ndnboost/test/utils/runtime/cla/detail/argument_value_usage.hpp
new file mode 100644
index 0000000..b78097b
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/detail/argument_value_usage.hpp
@@ -0,0 +1,82 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Permission to copy, use, modify, sell and distribute this software
+//  is granted provided this copyright notice appears in all copies.
+//  This software is provided "as is" without express or implied warranty,
+//  and with no claim as to its suitability for any purpose.
+  
+//  See http://www.boost.org for updates, documentation, and revision history.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : argument usage printing helpers
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_ARGUMENT_VALUE_USAGE_HPP_062604GER
+#define BOOST_RT_CLA_ARGUMENT_VALUE_USAGE_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+#include <ndnboost/test/utils/basic_cstring/compare.hpp>
+
+#include <ndnboost/lexical_cast.hpp>
+
+// STL
+// !! can we eliminate these includes?
+#include <list>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+namespace rt_cla_detail {
+
+// ************************************************************************** //
+// **************             argument_value_usage             ************** //
+// ************************************************************************** //
+
+// generic case
+template<typename T>
+inline void
+argument_value_usage( format_stream& fs, long, T* = 0 )
+{
+    fs << BOOST_RT_PARAM_CSTRING_LITERAL( "<value>" );
+}
+
+//____________________________________________________________________________//
+
+// specialization for list of values
+template<typename T>
+inline void
+argument_value_usage( format_stream& fs, int, std::list<T>* = 0 )
+{
+    fs << BOOST_RT_PARAM_CSTRING_LITERAL( "(<value1>, ..., <valueN>)" );
+}
+
+//____________________________________________________________________________//
+
+// specialization for type bool
+inline void
+argument_value_usage( format_stream& fs,  int, bool* = 0 )
+{
+    fs << BOOST_RT_PARAM_CSTRING_LITERAL( "yes|y|no|n" );
+}
+
+//____________________________________________________________________________//
+
+} // namespace rt_cla_detail
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_ARGUMENT_VALUE_USAGE_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/dual_name_parameter.hpp b/ndnboost/test/utils/runtime/cla/dual_name_parameter.hpp
new file mode 100644
index 0000000..3adbb85
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/dual_name_parameter.hpp
@@ -0,0 +1,96 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : defines model of generic parameter with dual naming
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_DUAL_NAME_PARAMETER_HPP_062604GER
+#define BOOST_RT_CLA_DUAL_NAME_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/named_parameter.hpp>
+#include <ndnboost/test/utils/runtime/cla/char_parameter.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************               dual_name_policy               ************** //
+// ************************************************************************** //
+
+class dual_name_policy : public dual_id_policy<dual_name_policy,string_name_policy,char_name_policy> {
+public:
+    dual_name_policy();
+
+    // Accept modifier
+    template<typename Modifier>
+    void    accept_modifier( Modifier const& m )
+    {
+        if( m.has( prefix ) ) {
+            set_prefix( m[prefix] );
+            m.erase( prefix );
+        }
+
+        if( m.has( name ) ) {
+            set_name( m[name] );
+            m.erase( name );
+        }
+
+        if( m.has( separator ) ) {
+            set_separator( m[separator] );
+            m.erase( separator );
+        }
+
+        dual_id_policy<dual_name_policy,string_name_policy,char_name_policy>::accept_modifier( m );
+    }
+private:
+    void    set_prefix( cstring );
+    void    set_name( cstring );
+    void    set_separator( cstring );
+};
+
+// ************************************************************************** //
+// **************       runtime::cla::dual_name_parameter      ************** //
+// ************************************************************************** //
+
+template<typename T>
+class dual_name_parameter_t : public basic_parameter<T,dual_name_policy> {
+    typedef basic_parameter<T,dual_name_policy> base;
+public:
+    // Constructors
+    explicit    dual_name_parameter_t( cstring name ) : base( name ) {}
+};
+
+//____________________________________________________________________________//
+
+BOOST_RT_CLA_NAMED_PARAM_GENERATORS( dual_name_parameter )
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/dual_name_parameter.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_DUAL_NAME_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/dual_name_parameter.ipp b/ndnboost/test/utils/runtime/cla/dual_name_parameter.ipp
new file mode 100644
index 0000000..8fcb04f
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/dual_name_parameter.ipp
@@ -0,0 +1,90 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : implements model of generic parameter with dual naming
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_DUAL_NAME_PARAMETER_IPP_062904GER
+#define BOOST_RT_CLA_DUAL_NAME_PARAMETER_IPP_062904GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/dual_name_parameter.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************               dual_name_policy               ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE 
+dual_name_policy::dual_name_policy()
+{
+    m_primary.accept_modifier( prefix = BOOST_RT_PARAM_CSTRING_LITERAL( "--" ) );
+    m_secondary.accept_modifier( prefix = BOOST_RT_PARAM_CSTRING_LITERAL( "-" ) );
+}
+
+//____________________________________________________________________________//
+
+namespace {
+
+template<typename K>
+inline void
+split( string_name_policy& snp, char_name_policy& cnp, cstring src, K const& k )
+{
+    cstring::iterator sep = std::find( src.begin(), src.end(), BOOST_RT_PARAM_LITERAL( '|' ) );
+    
+    if( sep != src.begin() )
+        snp.accept_modifier( k = cstring( src.begin(), sep ) );
+
+    if( sep != src.end() )
+        cnp.accept_modifier( k = cstring( sep+1, src.end() ) );
+}
+
+} // local namespace
+
+BOOST_RT_PARAM_INLINE void
+dual_name_policy::set_prefix( cstring src )
+{
+    split( m_primary, m_secondary, src, prefix );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+dual_name_policy::set_name( cstring src )
+{
+    split( m_primary, m_secondary, src, name );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+dual_name_policy::set_separator( cstring src )
+{
+    split( m_primary, m_secondary, src, separator );
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_DUAL_NAME_PARAMETER_IPP_062904GER
diff --git a/ndnboost/test/utils/runtime/cla/fwd.hpp b/ndnboost/test/utils/runtime/cla/fwd.hpp
new file mode 100644
index 0000000..4065e9b
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/fwd.hpp
@@ -0,0 +1,55 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : cla subsystem forward declarations
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_FWD_HPP_062604GER
+#define BOOST_RT_CLA_FWD_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+// Boost
+#include <ndnboost/shared_ptr.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+class parser;
+class parameter;
+typedef shared_ptr<parameter> parameter_ptr;
+class naming_policy;
+typedef shared_ptr<naming_policy> naming_policy_ptr;
+class argv_traverser;
+
+namespace rt_cla_detail {
+
+template<typename T> class const_generator;
+template<typename T> class ref_generator;
+
+template<typename T> class assigner;
+
+class named_parameter_base;
+class positional_parameter_base;
+
+} // namespace rt_cla_detail
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_FWD_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/id_policy.hpp b/ndnboost/test/utils/runtime/cla/id_policy.hpp
new file mode 100644
index 0000000..fb29cb7
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/id_policy.hpp
@@ -0,0 +1,145 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : some generic identification policies definition
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_ID_POLICY_HPP_062604GER
+#define BOOST_RT_CLA_ID_POLICY_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+#include <ndnboost/test/utils/runtime/cla/modifier.hpp>
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/iface/id_policy.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/class_properties.hpp>
+#include <ndnboost/test/utils/rtti.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************               naming_policy_base             ************** //
+// ************************************************************************** //
+// model: <prefix> <name> <separtor>
+
+class basic_naming_policy : public identification_policy {
+public:
+    // Public properties
+    unit_test::readwrite_property<dstring>    p_prefix;
+    unit_test::readwrite_property<dstring>    p_name;
+    unit_test::readwrite_property<dstring>    p_separator;
+
+    // Policy interface
+    virtual bool    responds_to( cstring name ) const       { return p_name == name; }
+    virtual cstring id_2_report() const                     { return p_name.get(); }
+    virtual void    usage_info( format_stream& fs ) const;
+    virtual bool    matching( parameter const& p, argv_traverser& tr, bool primary ) const;
+
+    // Accept modifier
+    template<typename Modifier>
+    void            accept_modifier( Modifier const& m )
+    {
+        nfp::optionally_assign( p_prefix.value,    m, prefix );
+        nfp::optionally_assign( p_name.value,      m, name );
+        nfp::optionally_assign( p_separator.value, m, separator );
+    }
+
+protected:
+    explicit basic_naming_policy( rtti::id_t dyn_type )
+    : identification_policy( dyn_type )
+    {}
+    BOOST_RT_PARAM_UNNEEDED_VIRTUAL ~basic_naming_policy() {}
+
+    // Naming policy interface
+    virtual bool    match_prefix( argv_traverser& tr ) const;
+    virtual bool    match_name( argv_traverser& tr ) const;
+    virtual bool    match_separator( argv_traverser& tr, bool optional_value ) const;
+};
+
+// ************************************************************************** //
+// **************                 dual_id_policy               ************** //
+// ************************************************************************** //
+
+template<typename MostDerived,typename PrimaryId,typename SecondId>
+class dual_id_policy : public identification_policy {
+public:
+    // Constructor
+    dual_id_policy()
+    : identification_policy( rtti::type_id<MostDerived>() )
+    , m_primary()
+    , m_secondary()
+    {}
+
+    // Policy interface
+    virtual bool    responds_to( cstring name ) const
+    {
+        return m_primary.responds_to( name ) || m_secondary.responds_to( name );
+    }
+    virtual bool    conflict_with( identification_policy const& id_p ) const
+    {
+        return id_p.conflict_with( m_primary ) || id_p.conflict_with( m_secondary );
+    }
+    virtual cstring id_2_report() const
+    {
+        return m_primary.id_2_report();
+    }
+    virtual void    usage_info( format_stream& fs ) const
+    {
+        fs << BOOST_RT_PARAM_LITERAL( '{' );
+        m_primary.usage_info( fs );
+        fs << BOOST_RT_PARAM_LITERAL( '|' );
+        m_secondary.usage_info( fs );
+        fs << BOOST_RT_PARAM_LITERAL( '}' );
+    }
+    virtual bool    matching( parameter const& p, argv_traverser& tr, bool primary ) const
+    {
+        return m_primary.matching( p, tr, primary ) || m_secondary.matching( p, tr, primary );
+    }
+
+    // Accept modifier
+    template<typename Modifier>
+    void    accept_modifier( Modifier const& m )
+    {
+        m_primary.accept_modifier( m );
+        m_secondary.accept_modifier( m );
+    }
+
+protected:
+    BOOST_RT_PARAM_UNNEEDED_VIRTUAL ~dual_id_policy() {}
+
+    // Data members
+    PrimaryId       m_primary;
+    SecondId        m_secondary;
+};
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/id_policy.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_ID_POLICY_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/id_policy.ipp b/ndnboost/test/utils/runtime/cla/id_policy.ipp
new file mode 100644
index 0000000..6d2c2f4
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/id_policy.ipp
@@ -0,0 +1,118 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : some generic identification policies implementation
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_ID_POLICY_IPP_062904GER
+#define BOOST_RT_CLA_ID_POLICY_IPP_062904GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/id_policy.hpp>
+#include <ndnboost/test/utils/runtime/cla/parameter.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************              basic_naming_policy             ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE void
+basic_naming_policy::usage_info( format_stream& fs ) const
+{
+    fs << p_prefix << p_name << p_separator;
+
+    if( p_separator->empty() )
+        fs << BOOST_RT_PARAM_LITERAL( ' ' );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+basic_naming_policy::match_prefix( argv_traverser& tr ) const
+{
+    if( !tr.match_front( p_prefix.get() ) )
+        return false;
+
+    tr.trim( p_prefix->size() );
+    return true;
+}
+
+//____________________________________________________________________________//
+    
+BOOST_RT_PARAM_INLINE bool
+basic_naming_policy::match_name( argv_traverser& tr ) const
+{
+    if( !tr.match_front( p_name.get() ) )
+        return false;
+
+    tr.trim( p_name->size() );
+    return true;
+}
+
+//____________________________________________________________________________//
+    
+BOOST_RT_PARAM_INLINE bool
+basic_naming_policy::match_separator( argv_traverser& tr, bool optional_value ) const
+{
+    if( p_separator->empty() ) {
+        if( !tr.token().is_empty() )
+            return false;
+
+        tr.trim( 1 );
+    }
+    else {
+        if( !tr.match_front( p_separator.get() ) ) {
+            // if parameter has optional value separator is optional as well
+            if( optional_value && ( tr.eoi() || tr.match_front( ' ' ) ) ) {
+                return true;
+            }
+            return false;
+        }
+
+        tr.trim( p_separator->size() );
+    }
+
+    return true;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+basic_naming_policy::matching( parameter const& p, argv_traverser& tr, bool ) const
+{
+    if( !match_prefix( tr ) )
+        return false;
+        
+    if( !match_name( tr ) )
+        return false;
+
+    if( !match_separator( tr, p.p_optional_value ) )
+        return false;
+
+    return true;
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_ID_POLICY_IPP_062904GER
diff --git a/ndnboost/test/utils/runtime/cla/iface/argument_factory.hpp b/ndnboost/test/utils/runtime/cla/iface/argument_factory.hpp
new file mode 100644
index 0000000..84c1e40
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/iface/argument_factory.hpp
@@ -0,0 +1,51 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : defines interface for argument_factory
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_IFACE_ARGUMENT_FACTORY_HPP_062604GER
+#define BOOST_RT_CLA_IFACE_ARGUMENT_FACTORY_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************                argument_factory              ************** //
+// ************************************************************************** //
+// another name can be argument production policy
+
+class argument_factory {
+public:
+    // Argument factory interface
+    virtual argument_ptr produce_using( parameter& p, argv_traverser& tr ) = 0;  /// produce argument based on input
+    virtual argument_ptr produce_using( parameter& p, parser const& )      = 0;  /// produce argument based on internal generator and/or values of other parameters
+    virtual void         argument_usage_info( format_stream& fs )          = 0;  /// argument value format information
+protected:
+    BOOST_TEST_PROTECTED_VIRTUAL ~argument_factory() {}
+};
+
+} // namespace ndnboost
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace cla
+
+#endif // BOOST_RT_CLA_IFACE_ARGUMENT_FACTORY_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/iface/id_policy.hpp b/ndnboost/test/utils/runtime/cla/iface/id_policy.hpp
new file mode 100644
index 0000000..338f8d5
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/iface/id_policy.hpp
@@ -0,0 +1,73 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : defines interface for identification_policy
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_IFACE_ID_POLICY_HPP_062604GER
+#define BOOST_RT_CLA_IFACE_ID_POLICY_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/class_properties.hpp>
+#include <ndnboost/test/utils/rtti.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************             identification_policy            ************** //
+// ************************************************************************** //
+
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable:4244)
+#endif
+
+class identification_policy {
+public:
+    // Public properties
+    unit_test::readwrite_property<rtti::id_t>    p_type_id;
+
+    // Policy interface
+    virtual bool    responds_to( cstring name ) const = 0;
+    virtual cstring id_2_report() const = 0;
+    virtual void    usage_info( format_stream& fs ) const = 0;
+    virtual bool    matching( parameter const& p, argv_traverser& tr, bool primary ) const = 0;
+
+    virtual bool    conflict_with( identification_policy const& ) const = 0;
+
+protected:
+    // Constructor
+    explicit        identification_policy( rtti::id_t dyn_type )
+    : p_type_id( dyn_type )
+    {}
+    BOOST_TEST_PROTECTED_VIRTUAL ~identification_policy() {}
+};
+
+#ifdef BOOST_MSVC
+#  pragma warning(pop)
+#endif
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_IFACE_ID_POLICY_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/modifier.hpp b/ndnboost/test/utils/runtime/cla/modifier.hpp
new file mode 100644
index 0000000..32719ab
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/modifier.hpp
@@ -0,0 +1,69 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : parameter modifiers
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_MODIFIER_HPP_062604GER
+#define BOOST_RT_CLA_MODIFIER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/named_params.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************         environment variable modifiers       ************** //
+// ************************************************************************** //
+
+namespace {
+
+nfp::typed_keyword<bool,struct optional_t>              optional_m;
+nfp::named_parameter<bool,optional_t,bool>              optional( true );
+nfp::typed_keyword<bool,struct required_t>              required_m;
+nfp::named_parameter<bool,required_t,bool>              required( true );
+nfp::typed_keyword<bool,struct multiplicable_t>         multiplicable_m;
+nfp::named_parameter<bool,multiplicable_t,bool>         multiplicable( true );
+nfp::typed_keyword<bool,struct guess_name_t>            guess_name_m;
+nfp::named_parameter<bool,guess_name_t,bool>            guess_name( true );
+nfp::typed_keyword<bool,struct ignore_mismatch_t>       ignore_mismatch_m;
+nfp::named_parameter<bool,ignore_mismatch_t,bool>       ignore_mismatch( true );
+nfp::typed_keyword<bool,struct optional_value_t>        optional_value_m;
+nfp::named_parameter<bool,optional_value_t,bool>        optional_value( true );
+
+nfp::typed_keyword<char_type,struct input_separator_t>  input_separator;
+nfp::typed_keyword<cstring,struct prefix_t>             prefix;
+nfp::typed_keyword<cstring,struct name_t>               name;
+nfp::typed_keyword<cstring,struct separator_t>          separator;
+nfp::typed_keyword<cstring,struct description_t>        description;
+nfp::typed_keyword<cstring,struct refer_to_t>           default_refer_to;
+
+nfp::keyword<struct default_value_t>                    default_value;
+nfp::keyword<struct handler_t>                          handler;
+nfp::keyword<struct interpreter_t>                      interpreter;
+nfp::keyword<struct assign_to_t>                        assign_to;
+
+} // local namespace
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_MODIFIER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/named_parameter.hpp b/ndnboost/test/utils/runtime/cla/named_parameter.hpp
new file mode 100644
index 0000000..28f03b4
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/named_parameter.hpp
@@ -0,0 +1,93 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : defines model of named parameter
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_NAMED_PARAMETER_HPP_062604GER
+#define BOOST_RT_CLA_NAMED_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/basic_parameter.hpp>
+#include <ndnboost/test/utils/runtime/cla/id_policy.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************              string_name_policy              ************** //
+// ************************************************************************** //
+
+class string_name_policy : public basic_naming_policy {
+public:
+    // Constructor
+    string_name_policy();
+    BOOST_RT_PARAM_UNNEEDED_VIRTUAL ~string_name_policy() {}
+
+    // policy interface
+    virtual bool    responds_to( cstring name ) const;
+    virtual bool    conflict_with( identification_policy const& ) const;
+
+    // Accept modifier
+    template<typename Modifier>
+    void            accept_modifier( Modifier const& m )
+    {
+        basic_naming_policy::accept_modifier( m );
+
+        if( m.has( guess_name_m ) )
+            m_guess_name = true;
+    }
+
+private:
+    // Naming policy interface
+    virtual bool    match_name( argv_traverser& tr ) const;
+
+    // Data members
+    bool            m_guess_name;
+};
+
+// ************************************************************************** //
+// **************         runtime::cla::named_parameter        ************** //
+// ************************************************************************** //
+
+template<typename T>
+class named_parameter_t : public basic_parameter<T,string_name_policy> {
+    typedef basic_parameter<T,string_name_policy> base;
+public:
+    // Constructors
+    explicit    named_parameter_t( cstring name ) : base( name ) {}
+};
+
+//____________________________________________________________________________//
+
+BOOST_RT_CLA_NAMED_PARAM_GENERATORS( named_parameter )
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/named_parameter.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_NAMED_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/named_parameter.ipp b/ndnboost/test/utils/runtime/cla/named_parameter.ipp
new file mode 100644
index 0000000..1d77018
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/named_parameter.ipp
@@ -0,0 +1,129 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : implements model of named parameter
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_NAMED_PARAMETER_IPP_062904GER
+#define BOOST_RT_CLA_NAMED_PARAMETER_IPP_062904GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/named_parameter.hpp>
+#include <ndnboost/test/utils/runtime/cla/char_parameter.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/algorithm.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************              string_name_policy              ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE 
+string_name_policy::string_name_policy()
+: basic_naming_policy( rtti::type_id<string_name_policy>() )
+, m_guess_name( false )
+{
+    assign_op( p_prefix.value, BOOST_RT_PARAM_CSTRING_LITERAL( "-" ), 0 );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+string_name_policy::responds_to( cstring name ) const
+{
+    std::pair<cstring::iterator,dstring::const_iterator> mm_pos;
+
+    mm_pos = unit_test::mismatch( name.begin(), name.end(), p_name->begin(), p_name->end() );
+
+    return mm_pos.first == name.end() && (m_guess_name || (mm_pos.second == p_name->end()) );
+}
+
+//____________________________________________________________________________//
+
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable:4244)
+#endif
+
+BOOST_RT_PARAM_INLINE bool
+string_name_policy::conflict_with( identification_policy const& id ) const
+{
+    if( id.p_type_id == p_type_id ) {
+        string_name_policy const& snp = static_cast<string_name_policy const&>( id );
+
+        if( p_name->empty() || snp.p_name->empty() )
+            return false;
+
+        if( p_prefix != snp.p_prefix )
+            return false;
+
+        std::pair<dstring::const_iterator,dstring::const_iterator> mm_pos =
+            unit_test::mismatch( p_name->begin(), p_name->end(), snp.p_name->begin(), snp.p_name->end() );
+
+        return mm_pos.first != p_name->begin()                              &&  // there is common substring
+                ((m_guess_name    && (mm_pos.second == snp.p_name->end()) ) ||  // that match other guy and I am guessing
+                (snp.m_guess_name && (mm_pos.first  == p_name->end()) ));       // or me and the other guy is
+    }
+    
+    if( id.p_type_id == rtti::type_id<char_name_policy>() ) {
+        char_name_policy const& cnp = static_cast<char_name_policy const&>( id );
+
+        return m_guess_name                 && 
+               (p_prefix == cnp.p_prefix)   && 
+               unit_test::first_char( cstring( p_name ) ) == unit_test::first_char( cstring( cnp.p_name ) );
+    }
+    
+    return false;    
+}
+
+#ifdef BOOST_MSVC
+#  pragma warning(pop)
+#endif
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+string_name_policy::match_name( argv_traverser& tr ) const
+{
+    if( !m_guess_name )
+        return basic_naming_policy::match_name( tr );
+
+    cstring in = tr.input();
+
+    std::pair<cstring::iterator,dstring::const_iterator> mm_pos;
+    
+    mm_pos = unit_test::mismatch( in.begin(), in.end(), p_name->begin(), p_name->end() );
+
+    if( mm_pos.first == in.begin() )
+        return false;
+
+    tr.trim( mm_pos.first - in.begin() );
+
+    return true;
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_NAMED_PARAMETER_IPP_062904GER
diff --git a/ndnboost/test/utils/runtime/cla/parameter.hpp b/ndnboost/test/utils/runtime/cla/parameter.hpp
new file mode 100644
index 0000000..36edbb6
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/parameter.hpp
@@ -0,0 +1,150 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 81913 $
+//
+//  Description : defines model of formal parameter
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_PARAMETER_HPP_062604GER
+#define BOOST_RT_CLA_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/parameter.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+#include <ndnboost/test/utils/runtime/cla/modifier.hpp>
+#include <ndnboost/test/utils/runtime/cla/iface/argument_factory.hpp>
+#include <ndnboost/test/utils/runtime/cla/iface/id_policy.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/rtti.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************            runtime::cla::parameter           ************** //
+// ************************************************************************** //
+
+class parameter : public BOOST_RT_PARAM_NAMESPACE::parameter {
+public:
+    parameter( identification_policy& ID, argument_factory& F, bool optional_value = false )
+    : p_optional( false )
+    , p_multiplicable( false )
+    , p_optional_value( optional_value )
+    , m_id_policy( ID )
+    , m_arg_factory( F )
+    {}
+
+    // Destructor
+    virtual         ~parameter()                                {}
+
+    unit_test::readwrite_property<bool>      p_optional;
+    unit_test::readwrite_property<bool>      p_multiplicable;
+    unit_test::readwrite_property<bool>      p_optional_value;
+    unit_test::readwrite_property<dstring>   p_description;
+
+    // parameter properties modification
+    template<typename Modifier>
+    void            accept_modifier( Modifier const& m )
+    {
+        if( m.has( optional_m ) )
+            p_optional.value = true;
+
+        if( m.has( required_m ) )
+            p_optional.value = false;
+
+        if( m.has( multiplicable_m ) )
+            p_multiplicable.value = true;
+
+        if( m.has( optional_value_m ) )
+            p_optional_value.value = true;
+
+        nfp::optionally_assign( p_description.value, m, description );
+    }
+
+    // access methods
+    bool            has_argument() const                        { return m_actual_argument!=0; }
+    argument const& actual_argument() const                     { return *m_actual_argument; }
+    argument_ptr    actual_argument()                           { return m_actual_argument; }
+
+
+    // identification interface
+    bool            responds_to( cstring name ) const           { return m_id_policy.responds_to( name ); }
+    bool            conflict_with( parameter const& p ) const
+    {
+        return (id_2_report() == p.id_2_report() && !id_2_report().is_empty())  ||
+               m_id_policy.conflict_with( p.m_id_policy )                       || 
+               ((m_id_policy.p_type_id != p.m_id_policy.p_type_id) && p.m_id_policy.conflict_with( m_id_policy ));
+    }
+    cstring         id_2_report() const                         { return m_id_policy.id_2_report(); }
+    void            usage_info( format_stream& fs ) const
+    { 
+        m_id_policy.usage_info( fs );
+        if( p_optional_value )
+            fs << BOOST_RT_PARAM_LITERAL( '[' );
+
+        m_arg_factory.argument_usage_info( fs );
+
+        if( p_optional_value )
+            fs << BOOST_RT_PARAM_LITERAL( ']' );
+    }
+
+    // argument match/produce based on input
+    bool            matching( argv_traverser& tr, bool primary ) const
+    {
+        return m_id_policy.matching( *this, tr, primary );
+    }
+
+    // argument production based on different source
+    void            produce_argument( argv_traverser& tr )
+    {
+        m_id_policy.matching( *this, tr, true ); // !! can we save this position somehow
+        m_actual_argument = m_arg_factory.produce_using( *this, tr );
+    }
+    void            produce_argument( parser const& p )
+    {
+        m_actual_argument = m_arg_factory.produce_using( *this, p );
+    }
+
+private:
+    //Data members
+    identification_policy&  m_id_policy;
+    argument_factory&       m_arg_factory;
+    argument_ptr            m_actual_argument;
+};
+
+//____________________________________________________________________________//
+
+template<typename Parameter,typename Modifier>
+inline shared_ptr<Parameter>
+operator-( shared_ptr<Parameter> p, Modifier const& m )
+{
+    p->accept_modifier( m );
+
+    return p;
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/parser.hpp b/ndnboost/test/utils/runtime/cla/parser.hpp
new file mode 100644
index 0000000..d98625c
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/parser.hpp
@@ -0,0 +1,153 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : defines parser - public interface for CLA parsing and accessing
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_PARSER_HPP_062604GER
+#define BOOST_RT_CLA_PARSER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/argument.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+#include <ndnboost/test/utils/runtime/cla/modifier.hpp>
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+
+// Boost
+#include <ndnboost/optional.hpp>
+
+// STL
+#include <list>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************             runtime::cla::parser             ************** //
+// ************************************************************************** //
+
+namespace cla_detail {
+
+template<typename Modifier>
+class global_mod_parser {
+public:
+    global_mod_parser( parser& p, Modifier const& m )
+    : m_parser( p )
+    , m_modifiers( m )
+    {}
+
+    template<typename Param>
+    global_mod_parser const&
+    operator<<( shared_ptr<Param> param ) const
+    {
+        param->accept_modifier( m_modifiers );
+
+        m_parser << param;
+
+        return *this;
+    }
+
+private:
+    // Data members;
+    parser&             m_parser;
+    Modifier const&     m_modifiers;
+};
+
+}
+
+// ************************************************************************** //
+// **************             runtime::cla::parser             ************** //
+// ************************************************************************** //
+
+class parser {
+public:
+    typedef std::list<parameter_ptr>::const_iterator param_iterator;
+
+    // Constructor
+    explicit            parser( cstring program_name = cstring() );
+
+    // parameter list construction interface
+    parser&             operator<<( parameter_ptr param );
+
+    // parser and global parameters modifiers
+    template<typename Modifier>
+    cla_detail::global_mod_parser<Modifier>
+    operator-( Modifier const& m )
+    {
+        nfp::optionally_assign( m_traverser.p_separator.value, m, input_separator );
+        nfp::optionally_assign( m_traverser.p_ignore_mismatch.value, m, ignore_mismatch_m );
+
+        return cla_detail::global_mod_parser<Modifier>( *this, m );
+    }
+
+    // input processing method
+    void                parse( int& argc, char_type** argv );
+
+    // parameters access
+    param_iterator      first_param() const;
+    param_iterator      last_param() const;
+
+    // arguments access
+    const_argument_ptr  operator[]( cstring string_id ) const;
+    cstring             get( cstring string_id ) const;    
+
+    template<typename T>
+    T const&            get( cstring string_id ) const
+    {
+        return arg_value<T>( valid_argument( string_id ) );
+    }
+
+    template<typename T>
+    void                get( cstring string_id, ndnboost::optional<T>& res ) const
+    {
+        const_argument_ptr actual_arg = (*this)[string_id];
+
+        if( actual_arg )
+            res = arg_value<T>( *actual_arg );
+        else
+            res.reset();
+    }
+
+    // help/usage
+    void                usage( out_stream& ostr );
+    void                help(  out_stream& ostr );
+
+private:
+    argument const&     valid_argument( cstring string_id ) const;
+
+    // Data members
+    argv_traverser              m_traverser;
+    std::list<parameter_ptr>    m_parameters;
+    dstring                     m_program_name;
+};
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/parser.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_PARSER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/parser.ipp b/ndnboost/test/utils/runtime/cla/parser.ipp
new file mode 100644
index 0000000..5be8503
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/parser.ipp
@@ -0,0 +1,258 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : implements parser - public interface for CLA parsing and accessing
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_PARSER_IPP_062904GER
+#define BOOST_RT_CLA_PARSER_IPP_062904GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/trace.hpp>
+#include <ndnboost/test/utils/runtime/argument.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+#include <ndnboost/test/utils/runtime/cla/parameter.hpp>
+#include <ndnboost/test/utils/runtime/cla/modifier.hpp>
+#include <ndnboost/test/utils/runtime/cla/validation.hpp>
+#include <ndnboost/test/utils/runtime/cla/parser.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+#include <ndnboost/test/utils/foreach.hpp>
+
+// Boost
+#include <ndnboost/lexical_cast.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************             runtime::cla::parser             ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE
+parser::parser( cstring program_name )
+{
+    assign_op( m_program_name, program_name, 0 );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE parser::param_iterator
+parser::first_param() const
+{
+    return m_parameters.begin();
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE parser::param_iterator
+parser::last_param() const
+{
+    return m_parameters.end();
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE argument const&
+parser::valid_argument( cstring string_id ) const
+{
+    const_argument_ptr arg = (*this)[string_id];
+
+    BOOST_RT_PARAM_VALIDATE_LOGIC( !!arg, "Actual argument for parameter " << string_id << " is not present" );
+
+    return *arg;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE parser&
+parser::operator<<( parameter_ptr new_param )
+{
+    BOOST_TEST_FOREACH( parameter_ptr, old_param, m_parameters ) {
+        BOOST_RT_PARAM_VALIDATE_LOGIC( !old_param->conflict_with( *new_param ),
+            BOOST_RT_PARAM_LITERAL( "Definition of parameter " )                << new_param->id_2_report() << 
+            BOOST_RT_PARAM_LITERAL( " conflicts with defintion of parameter " ) << old_param->id_2_report() );
+    }
+
+    m_parameters.push_back( new_param );
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+parser::parse( int& argc, char_type** argv )
+{
+    if( m_program_name.empty() ) {
+        m_program_name.assign( argv[0] );
+        dstring::size_type pos = m_program_name.find_last_of( BOOST_RT_PARAM_LITERAL( "/\\" ) );
+
+        if( pos != static_cast<dstring::size_type>(cstring::npos) )
+            m_program_name.erase( 0, pos+1 );
+    }
+
+    m_traverser.init( argc, argv );
+
+    try {
+        while( !m_traverser.eoi() ) {
+            parameter_ptr found_param;
+
+            BOOST_RT_PARAM_TRACE( "Total " << m_parameters.size() << " parameters registered" );
+
+            BOOST_TEST_FOREACH( parameter_ptr const&, curr_param, m_parameters ) {
+                BOOST_RT_PARAM_TRACE( "Try parameter " << curr_param->id_2_report() );
+
+                if( curr_param->matching( m_traverser, !found_param ) ) {
+                    BOOST_RT_PARAM_TRACE( "Match found" );
+                    BOOST_RT_CLA_VALIDATE_INPUT( !found_param, (m_traverser.rollback(),m_traverser), "Ambiguous input" );
+
+                    found_param = curr_param;
+                }
+
+                m_traverser.rollback();
+            }
+
+            if( !found_param ) {
+                BOOST_RT_PARAM_TRACE( "No match found" );
+                BOOST_RT_CLA_VALIDATE_INPUT( m_traverser.handle_mismatch(), m_traverser,
+                                             BOOST_RT_PARAM_LITERAL( "Unexpected input" ) );
+
+                continue;
+            }
+
+            BOOST_RT_PARAM_TRACE( "Parse argument value" );
+            found_param->produce_argument( m_traverser );
+
+            m_traverser.commit();
+        }
+
+        BOOST_TEST_FOREACH( parameter_ptr const&, curr_param, m_parameters ) {
+            if( !curr_param->p_optional && !curr_param->actual_argument() ) {
+                curr_param->produce_argument( *this );
+
+                BOOST_RT_PARAM_VALIDATE_LOGIC( curr_param->actual_argument(),
+                    BOOST_RT_PARAM_LITERAL( "Required argument for parameter " ) << curr_param->id_2_report()
+                        << BOOST_RT_PARAM_LITERAL( " is missing" ) );
+            }
+        }
+    }
+    catch( bad_lexical_cast const& ) {
+        BOOST_RT_PARAM_REPORT_LOGIC_ERROR( 
+            BOOST_RT_PARAM_LITERAL( "String to value convertion error during input parsing" ) );
+    }
+
+    m_traverser.remainder( argc, argv );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE const_argument_ptr
+parser::operator[]( cstring string_id ) const
+{
+    parameter_ptr found_param;
+
+    BOOST_TEST_FOREACH( parameter_ptr const&, curr_param, m_parameters ) {
+        if( curr_param->responds_to( string_id ) ) {
+            BOOST_RT_PARAM_VALIDATE_LOGIC( !found_param,
+                                           BOOST_RT_PARAM_LITERAL( "Ambiguous parameter string id: " ) << string_id );
+
+            found_param = curr_param;
+        }
+    }
+
+    return found_param ? found_param->actual_argument() : argument_ptr();
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE cstring
+parser::get( cstring string_id ) const
+{
+    return get<cstring>( string_id );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+parser::usage( out_stream& ostr )
+{
+    if( m_program_name.empty() )
+        assign_op( m_program_name, BOOST_RT_PARAM_CSTRING_LITERAL( "<program>" ), 0 );
+
+    format_stream fs;
+
+    fs << m_program_name;
+
+    BOOST_TEST_FOREACH( parameter_ptr const&, curr_param, m_parameters ) {
+        fs << BOOST_RT_PARAM_LITERAL( ' ' );
+
+        if( curr_param->p_optional )
+            fs << BOOST_RT_PARAM_LITERAL( '[' );
+
+        curr_param->usage_info( fs );
+
+        if( curr_param->p_optional )
+            fs << BOOST_RT_PARAM_LITERAL( ']' );
+
+        if( curr_param->p_multiplicable ) {
+            fs << BOOST_RT_PARAM_CSTRING_LITERAL( " ... " );
+            
+            if( curr_param->p_optional )
+                fs << BOOST_RT_PARAM_LITERAL( '[' );
+
+            curr_param->usage_info( fs );
+
+            if( curr_param->p_optional )
+                fs << BOOST_RT_PARAM_LITERAL( ']' );
+        }
+    }
+
+    ostr << BOOST_RT_PARAM_CSTRING_LITERAL( "Usage:\n" ) << fs.str() << std::endl;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+parser::help( out_stream& ostr )
+{
+    usage( ostr );
+
+    bool need_where = true;
+
+    BOOST_TEST_FOREACH( parameter_ptr const&, curr_param, m_parameters ) {
+        if( curr_param->p_description->empty() )
+            continue;
+
+        if( need_where ) {
+            ostr << BOOST_RT_PARAM_CSTRING_LITERAL( "where:\n" );
+            need_where = false;
+        }
+
+        ostr << curr_param->id_2_report() << BOOST_RT_PARAM_CSTRING_LITERAL( " - " ) << curr_param->p_description << std::endl;
+    }
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_PARSER_IPP_062904GER
diff --git a/ndnboost/test/utils/runtime/cla/typed_parameter.hpp b/ndnboost/test/utils/runtime/cla/typed_parameter.hpp
new file mode 100644
index 0000000..b8ad9e4
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/typed_parameter.hpp
@@ -0,0 +1,70 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : generic typed parameter model
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_TYPED_PARAMETER_HPP_062604GER
+#define BOOST_RT_CLA_TYPED_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/parameter.hpp>
+#include <ndnboost/test/utils/runtime/cla/argument_factory.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/rtti.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************         runtime::cla::typed_parameter        ************** //
+// ************************************************************************** //
+
+template<typename T>
+class typed_parameter : public cla::parameter {
+public:
+    explicit typed_parameter( identification_policy& ID ) 
+    : cla::parameter( ID, m_arg_factory, rtti::type_id<T>() == rtti::type_id<bool>() ) 
+    {}
+
+    // parameter properties modification
+    template<typename Modifier>
+    void    accept_modifier( Modifier const& m )
+    {
+        cla::parameter::accept_modifier( m );
+
+        m_arg_factory.accept_modifier( m );
+
+        BOOST_RT_PARAM_VALIDATE_LOGIC( !p_optional || !m_arg_factory.m_value_generator,
+            BOOST_RT_PARAM_LITERAL( "can't define a value generator for optional parameter " ) << id_2_report() );
+    }
+
+private:
+    // Data members
+    typed_argument_factory<T>   m_arg_factory;
+};
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_TYPED_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/validation.hpp b/ndnboost/test/utils/runtime/cla/validation.hpp
new file mode 100644
index 0000000..18c9b77
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/validation.hpp
@@ -0,0 +1,55 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : input validation helpers definition
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_VALIDATION_HPP_062604GER
+#define BOOST_RT_CLA_VALIDATION_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************       runtime::cla::report_input_error       ************** //
+// ************************************************************************** //
+
+void report_input_error( argv_traverser const& tr, format_stream& msg );
+
+//____________________________________________________________________________//
+
+#define BOOST_RT_CLA_VALIDATE_INPUT( b, tr, msg ) \
+    if( b ) ; else ::ndnboost::BOOST_RT_PARAM_NAMESPACE::cla::report_input_error( tr, format_stream().ref() << msg )
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/validation.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_VALIDATION_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/validation.ipp b/ndnboost/test/utils/runtime/cla/validation.ipp
new file mode 100644
index 0000000..5d295d7
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/validation.ipp
@@ -0,0 +1,65 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : input validation helpers implementation
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_VALIDATION_IPP_070604GER
+#define BOOST_RT_CLA_VALIDATION_IPP_070604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+#include <ndnboost/test/utils/runtime/cla/validation.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp> // BOOST_RT_PARAM_NAMESPACE::logic_error
+
+// Boost
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+
+// STL
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************           runtime::cla::validation           ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE void
+report_input_error( argv_traverser const& tr, format_stream& msg )
+{
+    if( tr.eoi() )
+        msg << BOOST_RT_PARAM_LITERAL( " at the end of input" );
+    else {
+        msg << BOOST_RT_PARAM_LITERAL( " in the following position: " );
+
+        if( tr.input().size() > 5 )
+            msg << tr.input().substr( 0, 5 ) << BOOST_RT_PARAM_LITERAL( "..." );
+        else
+            msg << tr.input();
+    }
+
+    throw BOOST_RT_PARAM_NAMESPACE::logic_error( msg.str() );
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_VALIDATION_IPP_070604GER
diff --git a/ndnboost/test/utils/runtime/cla/value_generator.hpp b/ndnboost/test/utils/runtime/cla/value_generator.hpp
new file mode 100644
index 0000000..d402977
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/value_generator.hpp
@@ -0,0 +1,81 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : specific value generators
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_VALUE_GENERATOR_HPP_062604GER
+#define BOOST_RT_CLA_VALUE_GENERATOR_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+#include <ndnboost/test/utils/runtime/cla/parser.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+namespace rt_cla_detail {
+
+// ************************************************************************** //
+// **************        runtime::cla::const_generator         ************** //
+// ************************************************************************** //
+
+template<typename T>
+class const_generator {
+public:
+    // Constructor
+    explicit    const_generator( T const& t ) : m_const_value( t ) {}
+
+    // generator interface
+    void        operator()( parser const&, ndnboost::optional<T>& t ) const   { t = m_const_value; }
+
+private:
+    // Data members
+    T           m_const_value;
+};
+
+// ************************************************************************** //
+// **************         runtime::cla::ref_generator          ************** //
+// ************************************************************************** //
+
+template<typename T>
+class ref_generator {
+public:
+    // Constructor
+    explicit    ref_generator( cstring ref_id ) : m_ref_id( ref_id ) {}
+
+    // generator interface
+    void        operator()( parser const& p, ndnboost::optional<T>& t ) const
+    {
+        p.get( m_ref_id, t );
+    }
+
+private:
+    // Data members
+    cstring     m_ref_id;
+};
+
+//____________________________________________________________________________//
+
+} // namespace rt_cla_detail
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_VALUE_GENERATOR_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/value_handler.hpp b/ndnboost/test/utils/runtime/cla/value_handler.hpp
new file mode 100644
index 0000000..1d792ba
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/value_handler.hpp
@@ -0,0 +1,57 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the 
+//  Boost Software License, Version 1.0. (See accompanying file 
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : specific value handlers
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_VALUE_HANDLER_HPP_062604GER
+#define BOOST_RT_CLA_VALUE_HANDLER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+namespace rt_cla_detail {
+
+// ************************************************************************** //
+// **************            runtime::cla::assigner            ************** //
+// ************************************************************************** //
+
+template<typename T>
+class assigner {
+public:
+    // Constructor
+    explicit    assigner( T& loc ) : m_target( loc )    {}
+
+    // value handler implementation
+    void        operator()( parameter const&, T& t )  { m_target = t; }
+
+private:
+    // Data members
+    T&          m_target;
+};
+
+} // namespace rt_cla_detail
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_VALUE_HANDLER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/config.hpp b/ndnboost/test/utils/runtime/config.hpp
new file mode 100644
index 0000000..8067a96
--- /dev/null
+++ b/ndnboost/test/utils/runtime/config.hpp
@@ -0,0 +1,156 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : Runtime.Param library configuration
+// ***************************************************************************
+
+#ifndef BOOST_RT_CONFIG_HPP_062604GER
+#define BOOST_RT_CONFIG_HPP_062604GER
+
+// Boost
+#include <ndnboost/config.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(disable: 4511) // copy constructor could not be generated
+# pragma warning(disable: 4512) // assignment operator could not be generated
+# pragma warning(disable: 4181) // qualifier applied to reference type; ignored
+# pragma warning(disable: 4675) // resolved overload was found by argument-dependent lookup
+#endif
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+#include <ndnboost/test/utils/basic_cstring/basic_cstring.hpp>
+#include <ndnboost/test/utils/wrap_stringstream.hpp>
+#include <ndnboost/test/utils/basic_cstring/io.hpp> // operator<<(ndnboost::runtime::cstring)
+
+// STL
+#include <string>
+#include <cstdlib>
+
+//____________________________________________________________________________//
+
+#ifndef BOOST_RT_PARAM_CUSTOM_STRING
+#  ifndef BOOST_RT_PARAM_WIDE_STRING
+#    define BOOST_RT_PARAM_NAMESPACE                            runtime
+#  else
+#    define BOOST_RT_PARAM_NAMESPACE                            wide_runtime
+#  endif
+#endif
+
+#ifdef __SUNPRO_CC
+extern int putenv(char*);
+#endif
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+#ifndef BOOST_RT_PARAM_CUSTOM_STRING
+#  ifndef BOOST_RT_PARAM_WIDE_STRING
+
+typedef char                                                    char_type;
+typedef std::string                                             dstring;
+typedef unit_test::const_string                                 cstring;
+typedef unit_test::literal_string                               literal_cstring;
+typedef wrap_stringstream                                       format_stream;
+
+#ifdef BOOST_CLASSIC_IOSTREAMS
+typedef std::ostream                                            out_stream;
+#else
+typedef std::basic_ostream<char_type>                           out_stream;
+#endif
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4996) // putenv
+#endif
+
+#ifndef UNDER_CE
+#if defined(__COMO__) && 0
+inline void
+putenv_impl( cstring name, cstring value )
+{
+    using namespace std;
+    // !! this may actually fail. What should we do?
+    setenv( name.begin(), value.begin(), 1 );
+}
+#else
+inline void
+putenv_impl( cstring name, cstring value )
+{
+    format_stream fs;
+
+    fs << name << '=' << value;
+
+    // !! this may actually fail. What should we do?
+    // const_cast is used to satisfy putenv interface
+    using namespace std;
+    putenv( const_cast<char*>( fs.str().c_str() ) );
+}
+#endif
+#endif
+
+#ifdef BOOST_MSVC 
+#pragma warning(pop) 
+#endif 
+
+#define BOOST_RT_PARAM_LITERAL( l ) l
+#define BOOST_RT_PARAM_CSTRING_LITERAL( l ) cstring( l, sizeof( l ) - 1 )
+#define BOOST_RT_PARAM_GETENV getenv
+#define BOOST_RT_PARAM_PUTENV ::ndnboost::BOOST_RT_PARAM_NAMESPACE::putenv_impl
+#define BOOST_RT_PARAM_EXCEPTION_INHERIT_STD
+
+//____________________________________________________________________________//
+
+#  else
+
+typedef wchar_t                                                 char_type;
+typedef std::basic_string<char_type>                            dstring;
+typedef unit_test::basic_cstring<wchar_t const>                 cstring;
+typedef const unit_test::basic_cstring<wchar_t const>           literal_cstring;
+typedef wrap_wstringstream                                      format_stream;
+typedef std::wostream                                           out_stream;
+
+#ifndef UNDER_CE
+inline void
+putenv_impl( cstring name, cstring value )
+{
+    format_stream fs;
+
+    fs << name << '=' << value;
+
+    // !! this may actually fail. What should we do?
+    // const_cast is used to satisfy putenv interface
+    using namespace std;
+    wputenv( const_cast<wchar_t*>( fs.str().c_str() ) );
+}
+#endif
+
+#define BOOST_RT_PARAM_LITERAL( l ) L ## l
+#define BOOST_RT_PARAM_CSTRING_LITERAL( l ) cstring( L ## l, sizeof( L ## l )/sizeof(wchar_t) - 1 )
+#define BOOST_RT_PARAM_GETENV wgetenv
+#define BOOST_RT_PARAM_PUTENV putenv_impl
+
+#  endif
+#endif
+
+#ifdef __GNUC__
+#define BOOST_RT_PARAM_UNNEEDED_VIRTUAL virtual
+#else
+#define BOOST_RT_PARAM_UNNEEDED_VIRTUAL
+#endif
+
+//____________________________________________________________________________//
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CONFIG_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/env/environment.hpp b/ndnboost/test/utils/runtime/env/environment.hpp
new file mode 100644
index 0000000..b45f10f
--- /dev/null
+++ b/ndnboost/test/utils/runtime/env/environment.hpp
@@ -0,0 +1,172 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : defines and implements inline model of program environment 
+// ***************************************************************************
+
+#ifndef BOOST_RT_ENV_ENVIRONMENT_HPP_062604GER
+#define BOOST_RT_ENV_ENVIRONMENT_HPP_062604GER
+
+#ifdef UNDER_CE
+#error Windows CE does not support environment variables.
+#endif
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/argument.hpp>
+#include <ndnboost/test/utils/runtime/interpret_argument_value.hpp>
+
+#include <ndnboost/test/utils/runtime/env/fwd.hpp>
+#include <ndnboost/test/utils/runtime/env/modifier.hpp>
+#include <ndnboost/test/utils/runtime/env/variable.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/callback.hpp>
+
+// Boost
+#include <ndnboost/optional.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+// ************************************************************************** //
+// **************      runtime::environment implementation     ************** //
+// ************************************************************************** //
+
+namespace environment {
+
+namespace rt_env_detail {
+
+template<typename T, typename Modifiers>
+variable_data&
+init_new_var( cstring var_name, Modifiers m = nfp::no_params )
+{
+    rt_env_detail::variable_data& new_vd = new_var_record( var_name );
+
+    cstring str_value = sys_read_var( new_vd.m_var_name );
+
+    if( !str_value.is_empty() ) {
+        try {
+            ndnboost::optional<T> value;
+
+            if( m.has( interpreter ) )
+                m[interpreter]( str_value, value );
+            else
+                interpret_argument_value( str_value, value, 0 );
+
+            if( !!value ) {
+                new_vd.m_value.reset( new typed_argument<T>( new_vd ) );
+
+                arg_value<T>( *new_vd.m_value ) = *value;
+            }
+        }
+        catch( ... ) { // !! could we do that
+            // !! should we report an error?
+        }
+    }
+
+    if( !new_vd.m_value && m.has( default_value ) ) {
+        new_vd.m_value.reset( new typed_argument<T>( new_vd ) );
+
+        nfp::optionally_assign( arg_value<T>( *new_vd.m_value ), m[default_value] );
+    }
+
+    nfp::optionally_assign( new_vd.m_global_id, m, global_id );
+
+    return new_vd;
+}
+
+//____________________________________________________________________________//
+
+} // namespace rt_env_detail
+
+} // namespace environment
+
+// ************************************************************************** //
+// **************             runtime::environment             ************** //
+// ************************************************************************** //
+
+namespace environment {
+
+    // variable access
+    variable_base
+    var( cstring var_name );
+
+    //________________________________________________________________________//
+
+    template<typename T>
+    inline variable<T>
+    var( cstring var_name )
+    {
+        rt_env_detail::variable_data* vd = rt_env_detail::find_var_record( var_name );
+
+        return environment::variable<T>( !vd ? rt_env_detail::init_new_var<T>( var_name, nfp::no_params ) : *vd );
+    }
+
+    //________________________________________________________________________//
+
+    template<typename T, typename Modifiers>
+    inline variable<T>
+    var( cstring var_name, Modifiers const& m )
+    {
+        rt_env_detail::variable_data* vd = rt_env_detail::find_var_record( var_name );
+
+        return environment::variable<T>( !vd ? rt_env_detail::init_new_var<T>( var_name, m ) : *vd );
+    }
+
+    //________________________________________________________________________//
+
+    // direct variable value access
+    inline cstring
+    get( cstring var_name )
+    {
+        return environment::var<cstring>( var_name ).value();
+    }
+
+    //________________________________________________________________________//
+
+    template<typename T>
+    inline T const&
+    get( cstring var_name )
+    {
+        return environment::var<T>( var_name ).value();
+    }
+
+    //________________________________________________________________________//
+
+    template<typename T>
+    inline void
+    get( cstring var_name, ndnboost::optional<T>& res )
+    {
+        variable<T> const& v = environment::var<T>( var_name );
+        v.value( res );
+    }
+
+    //________________________________________________________________________//
+
+} // namespace environment
+
+namespace env = environment;
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#define BOOST_RT_PARAM_INLINE inline
+#include <ndnboost/test/utils/runtime/env/environment.ipp>
+
+#endif
+
+#endif // BOOST_RT_ENV_ENVIRONMENT_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/env/environment.ipp b/ndnboost/test/utils/runtime/env/environment.ipp
new file mode 100644
index 0000000..f2929de
--- /dev/null
+++ b/ndnboost/test/utils/runtime/env/environment.ipp
@@ -0,0 +1,125 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : implements model of program environment 
+// ***************************************************************************
+
+#ifndef BOOST_RT_ENV_ENVIRONMENT_IPP_062904GER
+#define BOOST_RT_ENV_ENVIRONMENT_IPP_062904GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+
+#include <ndnboost/test/utils/runtime/env/variable.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/basic_cstring/compare.hpp>
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+
+// STL
+#include <map>
+#include <list>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace environment {
+
+// ************************************************************************** //
+// **************             runtime::environment             ************** //
+// ************************************************************************** //
+
+namespace rt_env_detail {
+
+typedef std::map<cstring,rt_env_detail::variable_data> registry;
+typedef std::list<dstring> keys;
+
+BOOST_RT_PARAM_INLINE registry& s_registry()    { static registry instance; return instance; }
+BOOST_RT_PARAM_INLINE keys&     s_keys()        { static keys instance; return instance; }
+
+BOOST_RT_PARAM_INLINE variable_data&
+new_var_record( cstring var_name )
+{
+    // save the name in list of keys
+    s_keys().push_back( dstring() );
+    dstring& key = s_keys().back();
+    assign_op( key, var_name, 0 );
+
+    // create and return new record
+    variable_data& new_var_data = s_registry()[key];
+    
+    new_var_data.m_var_name = key;
+    
+    return new_var_data;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE variable_data*
+find_var_record( cstring var_name )
+{
+    registry::iterator it = s_registry().find( var_name );
+
+    return it == s_registry().end() ? 0 : &(it->second);
+}
+
+//____________________________________________________________________________//
+
+#ifdef BOOST_MSVC 
+#pragma warning(push) 
+#pragma warning(disable:4996) // getenv
+#endif
+
+BOOST_RT_PARAM_INLINE cstring
+sys_read_var( cstring var_name )
+{
+    using namespace std;
+    return BOOST_RT_PARAM_GETENV( var_name.begin() );
+}
+
+#ifdef BOOST_MSVC 
+#pragma warning(pop) 
+#endif
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+sys_write_var( cstring var_name, format_stream& var_value )
+{
+    BOOST_RT_PARAM_PUTENV( var_name, cstring( var_value.str() ) );
+}
+
+//____________________________________________________________________________//
+
+} // namespace rt_env_detail
+
+BOOST_RT_PARAM_INLINE variable_base
+var( cstring var_name )
+{
+    rt_env_detail::variable_data* vd = rt_env_detail::find_var_record( var_name );
+
+    BOOST_RT_PARAM_VALIDATE_LOGIC( !!vd,
+                                   BOOST_RT_PARAM_LITERAL( "First access to the environment variable " ) 
+                                        << var_name << BOOST_RT_PARAM_LITERAL( " should be typed" ) );
+
+    return variable_base( *vd );
+}
+
+//____________________________________________________________________________//
+
+} // namespace environment
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_ENV_ENVIRONMENT_IPP_062904GER
diff --git a/ndnboost/test/utils/runtime/env/fwd.hpp b/ndnboost/test/utils/runtime/env/fwd.hpp
new file mode 100644
index 0000000..b869605
--- /dev/null
+++ b/ndnboost/test/utils/runtime/env/fwd.hpp
@@ -0,0 +1,54 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : environment subsystem forward declarations
+// ***************************************************************************
+
+#ifndef BOOST_RT_ENV_FWD_HPP_062604GER
+#define BOOST_RT_ENV_FWD_HPP_062604GER
+
+#ifdef UNDER_CE
+#error Windows CE does not support environment variables.
+#endif
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace environment {
+
+class variable_base;
+variable_base var( cstring var_name );
+
+namespace rt_env_detail {
+
+struct variable_data;
+
+variable_data&  new_var_record( cstring var_name );
+variable_data*  find_var_record( cstring var_name );
+
+cstring         sys_read_var( cstring var_name );
+void            sys_write_var( cstring var_name, format_stream& var_value );
+
+}
+
+template <typename T> class variable;
+
+} // namespace environment
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_ENV_FWD_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/env/modifier.hpp b/ndnboost/test/utils/runtime/env/modifier.hpp
new file mode 100644
index 0000000..a760368
--- /dev/null
+++ b/ndnboost/test/utils/runtime/env/modifier.hpp
@@ -0,0 +1,47 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to the
+//  Boost Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : defines variable modifiers
+// ***************************************************************************
+
+#ifndef BOOST_RT_ENV_MODIFIER_HPP_062604GER
+#define BOOST_RT_ENV_MODIFIER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/named_params.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace environment {
+
+// ************************************************************************** //
+// **************         environment variable modifiers       ************** //
+// ************************************************************************** //
+
+namespace {
+
+nfp::typed_keyword<cstring,struct global_id_t>   global_id;
+nfp::keyword<struct default_value_t>             default_value;
+nfp::keyword<struct interpreter_t>               interpreter;
+
+} // local namespace
+} // namespace environment
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_ENV_MODIFIER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/env/variable.hpp b/ndnboost/test/utils/runtime/env/variable.hpp
new file mode 100644
index 0000000..17a4f39
--- /dev/null
+++ b/ndnboost/test/utils/runtime/env/variable.hpp
@@ -0,0 +1,223 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 81913 $
+//
+//  Description : defines model of program environment variable
+// ***************************************************************************
+
+#ifndef BOOST_RT_ENV_VARIABLE_HPP_062604GER
+#define BOOST_RT_ENV_VARIABLE_HPP_062604GER
+
+#ifdef UNDER_CE
+#error Windows CE does not support environment variables.
+#endif
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/parameter.hpp>
+#include <ndnboost/test/utils/runtime/argument.hpp>
+
+#include <ndnboost/test/utils/runtime/env/fwd.hpp>
+
+// Boost
+#include <ndnboost/optional.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace environment {
+
+// ************************************************************************** //
+// **************      runtime::environment::variable_data     ************** //
+// ************************************************************************** //
+
+namespace rt_env_detail {
+
+struct variable_data : public runtime::parameter {
+    cstring         m_var_name;
+    dstring         m_global_id;
+    argument_ptr    m_value;
+};
+
+} // namespace rt_env_detail
+
+// ************************************************************************** //
+// **************     runtime::environment::variable_base      ************** //
+// ************************************************************************** //
+
+class variable_base {
+public:
+    explicit    variable_base( rt_env_detail::variable_data& data ) : m_data( &data ) {}
+
+    // arguments access
+    template<typename T>
+    T const&    value() const
+    {
+        return arg_value<T>( *m_data->m_value );
+    }
+
+    template<typename T>
+    void        value( ndnboost::optional<T>& res ) const
+    {
+        if( has_value() )
+            res = arg_value<T>( *m_data->m_value );
+        else
+            res.reset();
+    }
+
+    bool        has_value() const   { return m_data->m_value!=0; }
+    cstring     name() const        { return m_data->m_var_name; }
+
+protected:
+    // Data members
+    rt_env_detail::variable_data*  m_data;
+} ;
+
+// ************************************************************************** //
+// **************        runtime::environment::variable        ************** //
+// ************************************************************************** //
+
+template<typename T = cstring>
+class variable : public variable_base {
+public:
+    // Constructors
+    explicit    variable( cstring var_name );
+
+    template<typename Modifiers>
+    explicit    variable( cstring var_name, Modifiers const& m );
+
+    explicit    variable( rt_env_detail::variable_data& data ) 
+    : variable_base( data )                                 {}
+
+    // other variable assignment
+    void        operator=( variable const& v )              { m_data = v.m_data; }
+
+    // access methods
+    T const&    value() const                               { return variable_base::value<T>(); }
+
+#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) || \
+    BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0593))
+    template<typename T>
+    void        value( ndnboost::optional<T>& res ) const      { variable_base::value( res ); }
+#else
+    using       variable_base::value;
+#endif
+
+    // Value assignment
+    template<typename V>
+    void        operator=( V const& v )
+    {
+        if( !has_value() )
+            m_data->m_value.reset( new typed_argument<T>( *m_data ) );
+
+        arg_value<T>( *m_data->m_value ) = v;
+
+        rt_env_detail::sys_write_var( m_data->m_var_name, format_stream().ref() << value() );
+    }
+}; // class variable
+
+//____________________________________________________________________________//
+
+template<typename CharT, typename Tr,typename T>
+inline std::basic_ostream<CharT,Tr>&
+operator<<( std::basic_ostream<CharT,Tr>& os, variable<T> const& v )
+{
+    os << v.name() << '=';
+
+    if( v.has_value() )
+        os << v.value();
+
+    return os;
+}
+
+//____________________________________________________________________________//
+
+template<typename T, typename V>
+inline bool
+operator==( variable<T> ev, V const& v )
+{
+    return ev.has_value() && ev.value() == v;
+}
+
+//____________________________________________________________________________//
+
+template<typename T, typename V>
+inline bool
+operator==( V const& v, variable<T> ev )
+{
+    return ev.has_value() && ev.value() == v;
+}
+
+//____________________________________________________________________________//
+
+template<typename T, typename V>
+inline bool
+operator!=( variable<T> ev, V const& v )
+{
+    return !ev.has_value() || ev.value() != v;
+}
+
+//____________________________________________________________________________//
+
+template<typename T, typename V>
+inline bool
+operator!=( V const& v, variable<T> ev )
+{
+    return !ev.has_value() || ev.value() != v;
+}
+
+//____________________________________________________________________________//
+
+} // namespace environment
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+// ************************************************************************** //
+// ************************************************************************** //
+// Implementation
+
+#include <ndnboost/test/utils/runtime/env/environment.hpp>
+
+// ************************************************************************** //
+// **************        runtime::environment::variable        ************** //
+// ************************************************************************** //
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace environment {
+
+template<typename T>
+variable<T>::variable( cstring var_name )
+: variable_base( environment::var<T>( var_name ) )
+{}
+
+//____________________________________________________________________________//
+
+template<typename T>
+template<typename Modifiers>
+variable<T>::variable( cstring var_name, Modifiers const& m )
+: variable_base( environment::var<T>( var_name, m ) )
+{}
+
+//____________________________________________________________________________//
+
+} // namespace environment
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_ENV_VARIABLE_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/fwd.hpp b/ndnboost/test/utils/runtime/fwd.hpp
new file mode 100644
index 0000000..3714bfc
--- /dev/null
+++ b/ndnboost/test/utils/runtime/fwd.hpp
@@ -0,0 +1,41 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : global framework level forward declaration
+// ***************************************************************************
+
+#ifndef BOOST_RT_FWD_HPP_062604GER
+#define BOOST_RT_FWD_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+// Boost
+#include <ndnboost/shared_ptr.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+class parameter;
+
+class argument;
+typedef shared_ptr<argument> argument_ptr;
+typedef shared_ptr<argument const> const_argument_ptr;
+
+template<typename T> class value_interpreter;
+template<typename T> class typed_argument;
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_FWD_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/interpret_argument_value.hpp b/ndnboost/test/utils/runtime/interpret_argument_value.hpp
new file mode 100644
index 0000000..4f5a214
--- /dev/null
+++ b/ndnboost/test/utils/runtime/interpret_argument_value.hpp
@@ -0,0 +1,163 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : default algorithms for string to specific type convertions
+// ***************************************************************************
+
+#ifndef BOOST_RT_INTERPRET_ARGUMENT_VALUE_HPP_062604GER
+#define BOOST_RT_INTERPRET_ARGUMENT_VALUE_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/trace.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+#include <ndnboost/test/utils/basic_cstring/compare.hpp>
+
+// Boost
+#include <ndnboost/optional.hpp>
+#include <ndnboost/lexical_cast.hpp>
+
+// STL
+// !! could we eliminate these includes?
+#include <list>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+// ************************************************************************** //
+// **************       runtime::interpret_argument_value      ************** //
+// ************************************************************************** //
+// returns true if source is used false otherwise
+
+// generic case
+template<typename T>
+struct interpret_argument_value_impl {
+    static bool _( cstring source, ndnboost::optional<T>& res )
+    {
+        BOOST_RT_PARAM_TRACE( "In interpret_argument_value_impl<" << typeid(T).name() << ">" );
+
+        res = lexical_cast<T>( source );
+
+        BOOST_RT_PARAM_TRACE( "String " << source << " is interpreted as " << *res );
+        return true;
+    }
+};
+
+
+//____________________________________________________________________________//
+
+// dstring case
+template<>
+struct interpret_argument_value_impl<dstring> {
+    static bool _( cstring source, ndnboost::optional<dstring>& res )
+    {
+        BOOST_RT_PARAM_TRACE( "In interpret_argument_value_impl<dstring>" );
+
+        res = dstring();
+        assign_op( *res, source, 0 );
+
+        return true;
+    }
+};
+
+//____________________________________________________________________________//
+
+// cstring case
+template<>
+struct interpret_argument_value_impl<cstring> {
+    static bool _( cstring source, ndnboost::optional<cstring>& res )
+    {
+        BOOST_RT_PARAM_TRACE( "In interpret_argument_value_impl<cstring>" );
+
+        res = source;
+
+        return true;
+    }
+};
+
+//____________________________________________________________________________//
+
+// specialization for type bool
+template<>
+struct interpret_argument_value_impl<bool> {
+    static bool _( cstring source, ndnboost::optional<bool>& res )
+    {
+        BOOST_RT_PARAM_TRACE( "In interpret_argument_value_impl<bool>" );
+
+        static literal_cstring YES( BOOST_RT_PARAM_CSTRING_LITERAL( "YES" ) );
+        static literal_cstring Y( BOOST_RT_PARAM_CSTRING_LITERAL( "Y" ) );
+        static literal_cstring NO( BOOST_RT_PARAM_CSTRING_LITERAL( "NO" ) );
+        static literal_cstring N( BOOST_RT_PARAM_CSTRING_LITERAL( "N" ) );
+        static literal_cstring one( BOOST_RT_PARAM_CSTRING_LITERAL( "1" ) );
+        static literal_cstring zero( BOOST_RT_PARAM_CSTRING_LITERAL( "0" ) );
+
+        source.trim();
+
+        if( case_ins_eq( source, YES ) || case_ins_eq( source, Y ) || case_ins_eq( source, one ) ) {
+            res = true;
+            return true;
+        }
+        else if( case_ins_eq( source, NO ) || case_ins_eq( source, N ) || case_ins_eq( source, zero ) ) {
+            res = false;
+            return true;
+        }
+        else {
+            res = true;
+            return false;
+        }
+    }
+};
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline bool
+interpret_argument_value( cstring source, ndnboost::optional<T>& res, long )
+{
+    return interpret_argument_value_impl<T>::_( source, res );
+}
+
+//____________________________________________________________________________//
+
+// specialization for list of values
+template<typename T>
+inline bool
+interpret_argument_value( cstring source, ndnboost::optional<std::list<T> >& res, int )
+{
+    BOOST_RT_PARAM_TRACE( "In interpret_argument_value<std::list<T>>" );
+
+    res = std::list<T>();
+
+    while( !source.is_empty() ) {
+        // !! should we use token_iterator
+        cstring::iterator single_value_end = std::find( source.begin(), source.end(), BOOST_RT_PARAM_LITERAL( ',' ) );
+
+        ndnboost::optional<T> value;
+        interpret_argument_value( cstring( source.begin(), single_value_end ), value, 0 );
+
+        res->push_back( *value );
+
+        source.trim_left( single_value_end + 1 );
+    }
+
+    return true;
+}
+
+//____________________________________________________________________________//
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_INTERPRET_ARGUMENT_VALUE_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/parameter.hpp b/ndnboost/test/utils/runtime/parameter.hpp
new file mode 100644
index 0000000..2f6d1b7
--- /dev/null
+++ b/ndnboost/test/utils/runtime/parameter.hpp
@@ -0,0 +1,38 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : abstract interface for the formal parameter
+// ***************************************************************************
+
+#ifndef BOOST_RT_PARAMETER_HPP_062604GER
+#define BOOST_RT_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+// ************************************************************************** //
+// **************              runtime::parameter              ************** //
+// ************************************************************************** //
+
+class parameter {
+public:
+    virtual ~parameter() {}
+};
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/trace.hpp b/ndnboost/test/utils/runtime/trace.hpp
new file mode 100644
index 0000000..c71eb8e
--- /dev/null
+++ b/ndnboost/test/utils/runtime/trace.hpp
@@ -0,0 +1,30 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : optional internal tracing
+// ***************************************************************************
+
+#ifndef BOOST_RT_TRACE_HPP_062604GER
+#define BOOST_RT_TRACE_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#ifdef BOOST_RT_PARAM_DEBUG
+
+#include <iostream>
+
+#  define BOOST_RT_PARAM_TRACE( str ) std::cerr << str << std::endl
+#else
+#  define BOOST_RT_PARAM_TRACE( str )
+#endif
+
+#endif // BOOST_RT_TRACE_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/validation.hpp b/ndnboost/test/utils/runtime/validation.hpp
new file mode 100644
index 0000000..e794df9
--- /dev/null
+++ b/ndnboost/test/utils/runtime/validation.hpp
@@ -0,0 +1,82 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : defines exceptions and validation tools
+// ***************************************************************************
+
+#ifndef BOOST_RT_VALIDATION_HPP_062604GER
+#define BOOST_RT_VALIDATION_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/class_properties.hpp>
+
+// Boost
+#include <ndnboost/shared_ptr.hpp>
+
+// STL
+#ifdef BOOST_RT_PARAM_EXCEPTION_INHERIT_STD
+#include <stdexcept>
+#endif
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+// ************************************************************************** //
+// **************             runtime::logic_error             ************** //
+// ************************************************************************** //
+
+class logic_error 
+#ifdef BOOST_RT_PARAM_EXCEPTION_INHERIT_STD
+: public std::exception
+#endif
+{
+    typedef shared_ptr<dstring> dstring_ptr;
+public:
+    // Constructor // !! could we eliminate shared_ptr
+    explicit    logic_error( cstring msg ) : m_msg( new dstring( msg.begin(), msg.size() ) ) {}
+    ~logic_error() throw()                          {}
+
+    dstring const&   msg() const                    { return *m_msg; }
+    virtual char_type const* what() const throw()   { return m_msg->c_str(); }
+
+private:
+    dstring_ptr m_msg;
+};
+
+// ************************************************************************** //
+// **************          runtime::report_logic_error         ************** //
+// ************************************************************************** //
+
+inline void
+report_logic_error( format_stream& msg )
+{
+    throw BOOST_RT_PARAM_NAMESPACE::logic_error( msg.str() );
+}
+
+//____________________________________________________________________________//
+
+#define BOOST_RT_PARAM_REPORT_LOGIC_ERROR( msg ) \
+    ndnboost::BOOST_RT_PARAM_NAMESPACE::report_logic_error( format_stream().ref() << msg )
+
+#define BOOST_RT_PARAM_VALIDATE_LOGIC( b, msg ) \
+    if( b ) {} else BOOST_RT_PARAM_REPORT_LOGIC_ERROR( msg )
+
+//____________________________________________________________________________//
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_VALIDATION_HPP_062604GER
diff --git a/ndnboost/test/utils/trivial_singleton.hpp b/ndnboost/test/utils/trivial_singleton.hpp
new file mode 100644
index 0000000..6fba5c9
--- /dev/null
+++ b/ndnboost/test/utils/trivial_singleton.hpp
@@ -0,0 +1,74 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : simple helpers for creating cusom output manipulators
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TRIVIAL_SIGNLETON_HPP_020505GER
+#define BOOST_TEST_TRIVIAL_SIGNLETON_HPP_020505GER
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/detail/workaround.hpp>
+
+#include <ndnboost/noncopyable.hpp>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************                   singleton                  ************** //
+// ************************************************************************** //
+
+template<typename Derived>
+class singleton : private ndnboost::noncopyable {
+public:
+    static Derived& instance() { static Derived the_inst; return the_inst; }    
+protected:
+    singleton()  {}
+    ~singleton() {}
+};
+
+} // namespace unit_test
+
+#define BOOST_TEST_SINGLETON_CONS( type )       \
+friend class ndnboost::unit_test::singleton<type>; \
+type() {}                                       \
+/**/
+
+#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
+
+#define BOOST_TEST_SINGLETON_INST( inst ) \
+template class unit_test::singleton< BOOST_JOIN( inst, _t ) > ; \
+namespace { BOOST_JOIN( inst, _t)& inst = BOOST_JOIN( inst, _t)::instance(); }
+
+#elif defined(__APPLE_CC__) && defined(__GNUC__) && __GNUC__ < 4
+#define BOOST_TEST_SINGLETON_INST( inst ) \
+static BOOST_JOIN( inst, _t)& inst = BOOST_JOIN (inst, _t)::instance();
+
+#else
+
+#define BOOST_TEST_SINGLETON_INST( inst ) \
+namespace { BOOST_JOIN( inst, _t)& inst = BOOST_JOIN( inst, _t)::instance(); }
+
+#endif
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TRIVIAL_SIGNLETON_HPP_020505GER
diff --git a/ndnboost/test/utils/wrap_stringstream.hpp b/ndnboost/test/utils/wrap_stringstream.hpp
new file mode 100644
index 0000000..bd112e9
--- /dev/null
+++ b/ndnboost/test/utils/wrap_stringstream.hpp
@@ -0,0 +1,164 @@
+//  (C) Copyright Gennadiy Rozental 2002-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at 
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : wraps strstream and stringstream (depends with one is present)
+//                to provide the unified interface
+// ***************************************************************************
+
+#ifndef BOOST_WRAP_STRINGSTREAM_HPP_071894GER
+#define BOOST_WRAP_STRINGSTREAM_HPP_071894GER
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+
+// STL
+#ifdef BOOST_NO_STRINGSTREAM
+#include <strstream>        // for std::ostrstream
+#else
+#include <sstream>          // for std::ostringstream
+#endif // BOOST_NO_STRINGSTREAM
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+// ************************************************************************** //
+// **************            basic_wrap_stringstream           ************** //
+// ************************************************************************** //
+
+template<typename CharT>
+class basic_wrap_stringstream {
+public:
+#if defined(BOOST_CLASSIC_IOSTREAMS)
+    typedef std::ostringstream               wrapped_stream;
+#elif defined(BOOST_NO_STRINGSTREAM)
+    typedef std::basic_ostrstream<CharT>     wrapped_stream;
+#else
+    typedef std::basic_ostringstream<CharT>  wrapped_stream;
+#endif // BOOST_NO_STRINGSTREAM
+    // Access methods
+    basic_wrap_stringstream&        ref();
+    wrapped_stream&                 stream();
+    std::basic_string<CharT> const& str();
+
+private:
+    // Data members
+    wrapped_stream                  m_stream;
+    std::basic_string<CharT>        m_str;
+};
+
+//____________________________________________________________________________//
+
+template <typename CharT, typename T>
+inline basic_wrap_stringstream<CharT>&
+operator<<( basic_wrap_stringstream<CharT>& targ, T const& t )
+{
+    targ.stream() << t;
+    return targ;
+}
+
+//____________________________________________________________________________//
+
+template <typename CharT>
+inline typename basic_wrap_stringstream<CharT>::wrapped_stream&
+basic_wrap_stringstream<CharT>::stream()
+{
+    return m_stream;
+}
+
+//____________________________________________________________________________//
+
+template <typename CharT>
+inline basic_wrap_stringstream<CharT>&
+basic_wrap_stringstream<CharT>::ref()
+{ 
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+template <typename CharT>
+inline std::basic_string<CharT> const&
+basic_wrap_stringstream<CharT>::str()
+{
+
+#ifdef BOOST_NO_STRINGSTREAM
+    m_str.assign( m_stream.str(), m_stream.pcount() );
+    m_stream.freeze( false );
+#else
+    m_str = m_stream.str();
+#endif
+
+    return m_str;
+}
+
+//____________________________________________________________________________//
+
+template <typename CharT>
+inline basic_wrap_stringstream<CharT>&
+operator<<( basic_wrap_stringstream<CharT>& targ, basic_wrap_stringstream<CharT>& src )
+{
+    targ << src.str();
+    return targ;
+}
+
+//____________________________________________________________________________//
+
+#if BOOST_TEST_USE_STD_LOCALE 
+
+template <typename CharT>
+inline basic_wrap_stringstream<CharT>&
+operator<<( basic_wrap_stringstream<CharT>& targ, std::ios_base& (BOOST_TEST_CALL_DECL *man)(std::ios_base&) )
+{
+    targ.stream() << man;
+    return targ;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT,typename Elem,typename Tr>
+inline basic_wrap_stringstream<CharT>&
+operator<<( basic_wrap_stringstream<CharT>& targ, std::basic_ostream<Elem,Tr>& (BOOST_TEST_CALL_DECL *man)(std::basic_ostream<Elem, Tr>&) )
+{
+    targ.stream() << man;
+    return targ;
+}
+
+//____________________________________________________________________________//
+
+template<typename CharT,typename Elem,typename Tr>
+inline basic_wrap_stringstream<CharT>&
+operator<<( basic_wrap_stringstream<CharT>& targ, std::basic_ios<Elem, Tr>& (BOOST_TEST_CALL_DECL *man)(std::basic_ios<Elem, Tr>&) )
+{
+    targ.stream() << man;
+    return targ;
+}
+
+//____________________________________________________________________________//
+
+#endif
+
+// ************************************************************************** //
+// **************               wrap_stringstream              ************** //
+// ************************************************************************** //
+
+typedef basic_wrap_stringstream<char>       wrap_stringstream;
+typedef basic_wrap_stringstream<wchar_t>    wrap_wstringstream;
+
+}  // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif  // BOOST_WRAP_STRINGSTREAM_HPP_071894GER
diff --git a/ndnboost/test/utils/xml_printer.hpp b/ndnboost/test/utils/xml_printer.hpp
new file mode 100644
index 0000000..58ecc6b
--- /dev/null
+++ b/ndnboost/test/utils/xml_printer.hpp
@@ -0,0 +1,118 @@
+//  (C) Copyright Gennadiy Rozental 2004-2008.
+//  Distributed under the Boost Software License, Version 1.0.
+//  (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : common code used by any agent serving as XML printer
+// ***************************************************************************
+
+#ifndef BOOST_TEST_XML_PRINTER_HPP_071894GER
+#define BOOST_TEST_XML_PRINTER_HPP_071894GER
+
+// Boost.Test
+#include <ndnboost/test/utils/basic_cstring/basic_cstring.hpp>
+#include <ndnboost/test/utils/fixed_mapping.hpp>
+#include <ndnboost/test/utils/custom_manip.hpp>
+#include <ndnboost/test/utils/foreach.hpp>
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+
+// Boost
+#include <ndnboost/config.hpp>
+
+// STL
+#include <iostream>
+
+#include <ndnboost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace ndnboost {
+
+namespace unit_test {
+
+// ************************************************************************** //
+// **************               xml print helpers              ************** //
+// ************************************************************************** //
+
+inline void
+print_escaped( std::ostream& where_to, const_string value )
+{
+    static fixed_mapping<char,char const*> char_type(
+        '<' , "lt",
+        '>' , "gt",
+        '&' , "amp",
+        '\'', "apos" ,
+        '"' , "quot",
+
+        0
+    );
+
+    BOOST_TEST_FOREACH( char, c, value ) {
+        char const* ref = char_type[c];
+
+        if( ref )
+            where_to << '&' << ref << ';';
+        else
+            where_to << c;
+    }
+}
+
+//____________________________________________________________________________//
+
+inline void
+print_escaped( std::ostream& where_to, std::string const& value )
+{
+    print_escaped( where_to, const_string( value ) );
+}
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline void
+print_escaped( std::ostream& where_to, T const& value )
+{
+    where_to << value;
+}
+
+//____________________________________________________________________________//
+
+typedef custom_manip<struct attr_value_t> attr_value;
+
+template<typename T>
+inline std::ostream&
+operator<<( custom_printer<attr_value> const& p, T const& value )
+{
+    *p << "=\"";
+    print_escaped( *p, value );
+    *p << '"';
+
+    return *p;
+}
+
+//____________________________________________________________________________//
+
+typedef custom_manip<struct cdata_t> cdata;
+
+inline std::ostream&
+operator<<( custom_printer<cdata> const& p, const_string value )
+{
+    return *p << BOOST_TEST_L( "<![CDATA[" ) << value << BOOST_TEST_L( "]]>" );
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+
+} // namespace ndnboost
+
+//____________________________________________________________________________//
+
+#include <ndnboost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_XML_PRINTER_HPP_071894GER
diff --git a/ndnboost/timer.hpp b/ndnboost/timer.hpp
new file mode 100644
index 0000000..95ca7b0
--- /dev/null
+++ b/ndnboost/timer.hpp
@@ -0,0 +1,72 @@
+//  boost timer.hpp header file  ---------------------------------------------//
+
+//  Copyright Beman Dawes 1994-99.  Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/timer for documentation.
+
+//  Revision History
+//  01 Apr 01  Modified to use new <ndnboost/limits.hpp> header. (JMaddock)
+//  12 Jan 01  Change to inline implementation to allow use without library
+//             builds. See docs for more rationale. (Beman Dawes) 
+//  25 Sep 99  elapsed_max() and elapsed_min() added (John Maddock)
+//  16 Jul 99  Second beta
+//   6 Jul 99  Initial boost version
+
+#ifndef BOOST_TIMER_HPP
+#define BOOST_TIMER_HPP
+
+#include <ndnboost/config.hpp>
+#include <ctime>
+#include <ndnboost/limits.hpp>
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+    namespace std { using ::clock_t; using ::clock; }
+# endif
+
+
+namespace ndnboost {
+
+//  timer  -------------------------------------------------------------------//
+
+//  A timer object measures elapsed time.
+
+//  It is recommended that implementations measure wall clock rather than CPU
+//  time since the intended use is performance measurement on systems where
+//  total elapsed time is more important than just process or CPU time.
+
+//  Warnings: The maximum measurable elapsed time may well be only 596.5+ hours
+//  due to implementation limitations.  The accuracy of timings depends on the
+//  accuracy of timing information provided by the underlying platform, and
+//  this varies a great deal from platform to platform.
+
+class timer
+{
+ public:
+         timer() { _start_time = std::clock(); } // postcondition: elapsed()==0
+//         timer( const timer& src );      // post: elapsed()==src.elapsed()
+//        ~timer(){}
+//  timer& operator=( const timer& src );  // post: elapsed()==src.elapsed()
+  void   restart() { _start_time = std::clock(); } // post: elapsed()==0
+  double elapsed() const                  // return elapsed time in seconds
+    { return  double(std::clock() - _start_time) / CLOCKS_PER_SEC; }
+
+  double elapsed_max() const   // return estimated maximum value for elapsed()
+  // Portability warning: elapsed_max() may return too high a value on systems
+  // where std::clock_t overflows or resets at surprising values.
+  {
+    return (double((std::numeric_limits<std::clock_t>::max)())
+       - double(_start_time)) / double(CLOCKS_PER_SEC); 
+  }
+
+  double elapsed_min() const            // return minimum value for elapsed()
+   { return double(1)/double(CLOCKS_PER_SEC); }
+
+ private:
+  std::clock_t _start_time;
+}; // timer
+
+} // namespace ndnboost
+
+#endif  // BOOST_TIMER_HPP
diff --git a/ndnboost/type_traits/conversion_traits.hpp b/ndnboost/type_traits/conversion_traits.hpp
new file mode 100644
index 0000000..589c617
--- /dev/null
+++ b/ndnboost/type_traits/conversion_traits.hpp
@@ -0,0 +1,17 @@
+
+// Copyright 2000 John Maddock (john@johnmaddock.co.uk)
+// Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu)
+// Copyright 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+//
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED
+#define BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED
+
+#include <ndnboost/type_traits/is_convertible.hpp>
+
+#endif // BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED
diff --git a/ndnboost/type_traits/object_traits.hpp b/ndnboost/type_traits/object_traits.hpp
new file mode 100644
index 0000000..a13a998
--- /dev/null
+++ b/ndnboost/type_traits/object_traits.hpp
@@ -0,0 +1,33 @@
+//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+//
+//  defines object traits classes:
+//  is_object, is_scalar, is_class, is_compound, is_pod, 
+//  has_trivial_constructor, has_trivial_copy, has_trivial_assign, 
+//  has_trivial_destructor, is_empty.
+//
+
+#ifndef BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED
+#define BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED
+
+#include <ndnboost/type_traits/has_trivial_assign.hpp>
+#include <ndnboost/type_traits/has_trivial_constructor.hpp>
+#include <ndnboost/type_traits/has_trivial_copy.hpp>
+#include <ndnboost/type_traits/has_trivial_destructor.hpp>
+#include <ndnboost/type_traits/has_nothrow_constructor.hpp>
+#include <ndnboost/type_traits/has_nothrow_copy.hpp>
+#include <ndnboost/type_traits/has_nothrow_assign.hpp>
+#include <ndnboost/type_traits/is_base_and_derived.hpp>
+#include <ndnboost/type_traits/is_class.hpp>
+#include <ndnboost/type_traits/is_compound.hpp>
+#include <ndnboost/type_traits/is_empty.hpp>
+#include <ndnboost/type_traits/is_object.hpp>
+#include <ndnboost/type_traits/is_pod.hpp>
+#include <ndnboost/type_traits/is_scalar.hpp>
+#include <ndnboost/type_traits/is_stateless.hpp>
+
+#endif // BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED
diff --git a/ndnboost/type_traits/same_traits.hpp b/ndnboost/type_traits/same_traits.hpp
new file mode 100644
index 0000000..ece4b42
--- /dev/null
+++ b/ndnboost/type_traits/same_traits.hpp
@@ -0,0 +1,15 @@
+//  (C) Copyright Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+//
+//  defines is_same:
+
+#ifndef BOOST_TT_SAME_TRAITS_HPP_INCLUDED
+#define BOOST_TT_SAME_TRAITS_HPP_INCLUDED
+
+#include <ndnboost/type_traits/is_same.hpp>
+
+#endif  // BOOST_TT_SAME_TRAITS_HPP_INCLUDED
diff --git a/ndnboost/type_traits/transform_traits.hpp b/ndnboost/type_traits/transform_traits.hpp
new file mode 100644
index 0000000..be4ccf5
--- /dev/null
+++ b/ndnboost/type_traits/transform_traits.hpp
@@ -0,0 +1,21 @@
+//  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+//
+//  defines traits classes for transforming one type to another:
+//  remove_reference, add_reference, remove_bounds, remove_pointer.
+//
+
+#ifndef BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED
+#define BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED
+
+#include <ndnboost/type_traits/add_pointer.hpp>
+#include <ndnboost/type_traits/add_reference.hpp>
+#include <ndnboost/type_traits/remove_bounds.hpp>
+#include <ndnboost/type_traits/remove_pointer.hpp>
+#include <ndnboost/type_traits/remove_reference.hpp>
+
+#endif // BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED
diff --git a/ndnboost/typeof/std/memory.hpp b/ndnboost/typeof/std/memory.hpp
deleted file mode 100644
index e002dba..0000000
--- a/ndnboost/typeof/std/memory.hpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (C) 2005 Arkadiy Vertleyb, Peder Holt.
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_TYPEOF_STD_memory_hpp_INCLUDED
-#define BOOST_TYPEOF_STD_memory_hpp_INCLUDED
-
-#include <memory>
-#include <ndnboost/typeof/typeof.hpp>
-
-#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
-
-BOOST_TYPEOF_REGISTER_TEMPLATE(std::allocator, 1)
-BOOST_TYPEOF_REGISTER_TEMPLATE(std::raw_storage_iterator, 2)
-BOOST_TYPEOF_REGISTER_TEMPLATE(std::auto_ptr, 1)
-
-#endif//BOOST_TYPEOF_STD_memory_hpp_INCLUDED
diff --git a/ndnboost/typeof/std/string.hpp b/ndnboost/typeof/std/string.hpp
deleted file mode 100644
index 210c9e7..0000000
--- a/ndnboost/typeof/std/string.hpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (C) 2005 Arkadiy Vertleyb, Peder Holt.
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_TYPEOF_STD_string_hpp_INCLUDED
-#define BOOST_TYPEOF_STD_string_hpp_INCLUDED
-
-#include <string>
-#include <ndnboost/typeof/typeof.hpp>
-#include <ndnboost/typeof/std/memory.hpp>
-
-#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
-
-BOOST_TYPEOF_REGISTER_TEMPLATE(std::char_traits, 1)
-BOOST_TYPEOF_REGISTER_TEMPLATE(std::basic_string, 1)
-BOOST_TYPEOF_REGISTER_TEMPLATE(std::basic_string, 2)
-BOOST_TYPEOF_REGISTER_TEMPLATE(std::basic_string, 3)
-
-#ifndef __BORLANDC__
-//Borland chokes on this "double definition" of string
-BOOST_TYPEOF_REGISTER_TYPE(std::string)
-#endif
-
-#endif//BOOST_TYPEOF_STD_string_hpp_INCLUDED
diff --git a/ndnboost/units/detail/utility.hpp b/ndnboost/units/detail/utility.hpp
new file mode 100644
index 0000000..47946be
--- /dev/null
+++ b/ndnboost/units/detail/utility.hpp
@@ -0,0 +1,104 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_UNITS_UTILITY_HPP
+#define BOOST_UNITS_UTILITY_HPP
+
+#include <cstdlib>
+#include <typeinfo>
+#include <string>
+
+#if defined(__GLIBCXX__) || defined(__GLIBCPP__)
+#define BOOST_UNITS_USE_DEMANGLING
+#include <cxxabi.h>
+#endif // __GNUC__
+
+#ifdef BOOST_UNITS_USE_DEMANGLING
+
+#include <ndnboost/algorithm/string/replace.hpp>
+
+namespace ndnboost {
+
+namespace units {
+
+namespace detail {
+
+inline
+std::string
+demangle(const char* name)
+{
+    // need to demangle C++ symbols
+    char*       realname;
+    std::size_t len; 
+    int         stat;
+     
+    realname = abi::__cxa_demangle(name,NULL,&len,&stat);
+    
+    if (realname != NULL)
+    {
+        std::string   out(realname);
+        
+        std::free(realname);
+        
+        ndnboost::replace_all(out,"ndnboost::units::","");
+        
+        return out;
+    }
+    
+    return std::string("demangle :: error - unable to demangle specified symbol");
+}
+
+} // namespace detail
+
+template<class L>
+std::string simplify_typename(const L& /*source*/)
+{
+    const std::string   demangled = detail::demangle(typeid(L).name());
+
+    return demangled;
+}
+
+} // namespace units
+
+} // namespace ndnboost
+
+#else // BOOST_UNITS_USE_DEMANGLING
+
+namespace ndnboost {
+
+namespace units {
+
+namespace detail {
+
+inline
+std::string
+demangle(const char* name)
+{
+    return name;
+}
+
+} // namespace detail
+
+template<class L>
+std::string simplify_typename(const L& /*source*/)
+{
+    return std::string(typeid(L).name());
+}
+
+} // namespace units
+
+} // namespace ndnboost
+
+// To get system-specific predefined macros:
+// gcc -arch ppc -dM -E - < /dev/null | sort 
+
+#endif // BOOST_UNITS_USE_DEMANGLING
+
+#endif // BOOST_UNITS_UTILITY_HPP
diff --git a/ndnboost/utility.hpp b/ndnboost/utility.hpp
new file mode 100644
index 0000000..7e3e60e
--- /dev/null
+++ b/ndnboost/utility.hpp
@@ -0,0 +1,21 @@
+//  Boost utility.hpp header file  -------------------------------------------//
+
+//  Copyright 1999-2003 Aleksey Gurtovoy.  Use, modification, and distribution are
+//  subject to the Boost Software License, Version 1.0.  (See accompanying file
+//  LICENSE_1_0.txt or a copy at <http://www.boost.org/LICENSE_1_0.txt>.)
+
+//  See <http://www.boost.org/libs/utility/> for the library's home page.
+
+#ifndef BOOST_UTILITY_HPP
+#define BOOST_UTILITY_HPP
+
+#include <ndnboost/utility/addressof.hpp>
+#include <ndnboost/utility/base_from_member.hpp>
+#include <ndnboost/utility/binary.hpp>
+#include <ndnboost/utility/enable_if.hpp>
+#include <ndnboost/utility/identity_type.hpp>
+#include <ndnboost/checked_delete.hpp>
+#include <ndnboost/next_prior.hpp>
+#include <ndnboost/noncopyable.hpp>
+
+#endif  // BOOST_UTILITY_HPP
diff --git a/ndnboost/utility/base_from_member.hpp b/ndnboost/utility/base_from_member.hpp
new file mode 100644
index 0000000..7091f02
--- /dev/null
+++ b/ndnboost/utility/base_from_member.hpp
@@ -0,0 +1,87 @@
+//  boost utility/base_from_member.hpp header file  --------------------------//
+
+//  Copyright 2001, 2003, 2004 Daryle Walker.  Use, modification, and
+//  distribution are subject to the Boost Software License, Version 1.0.  (See
+//  accompanying file LICENSE_1_0.txt or a copy at
+//  <http://www.boost.org/LICENSE_1_0.txt>.)
+
+//  See <http://www.boost.org/libs/utility/> for the library's home page.
+
+#ifndef BOOST_UTILITY_BASE_FROM_MEMBER_HPP
+#define BOOST_UTILITY_BASE_FROM_MEMBER_HPP
+
+#include <ndnboost/preprocessor/arithmetic/inc.hpp>
+#include <ndnboost/preprocessor/repetition/enum_binary_params.hpp>
+#include <ndnboost/preprocessor/repetition/enum_params.hpp>
+#include <ndnboost/preprocessor/repetition/repeat_from_to.hpp>
+
+
+//  Base-from-member arity configuration macro  ------------------------------//
+
+// The following macro determines how many arguments will be in the largest
+// constructor template of base_from_member.  Constructor templates will be
+// generated from one argument to this maximum.  Code from other files can read
+// this number if they need to always match the exact maximum base_from_member
+// uses.  The maximum constructor length can be changed by overriding the
+// #defined constant.  Make sure to apply the override, if any, for all source
+// files during project compiling for consistency.
+
+// Contributed by Jonathan Turkanis
+
+#ifndef BOOST_BASE_FROM_MEMBER_MAX_ARITY
+#define BOOST_BASE_FROM_MEMBER_MAX_ARITY  10
+#endif
+
+
+//  An iteration of a constructor template for base_from_member  -------------//
+
+// A macro that should expand to:
+//     template < typename T1, ..., typename Tn >
+//     base_from_member( T1 x1, ..., Tn xn )
+//         : member( x1, ..., xn )
+//         {}
+// This macro should only persist within this file.
+
+#define BOOST_PRIVATE_CTR_DEF( z, n, data )                            \
+    template < BOOST_PP_ENUM_PARAMS(n, typename T) >                   \
+    explicit base_from_member( BOOST_PP_ENUM_BINARY_PARAMS(n, T, x) )  \
+        : member( BOOST_PP_ENUM_PARAMS(n, x) )                         \
+        {}                                                             \
+    /**/
+
+
+namespace ndnboost
+{
+
+//  Base-from-member class template  -----------------------------------------//
+
+// Helper to initialize a base object so a derived class can use this
+// object in the initialization of another base class.  Used by
+// Dietmar Kuehl from ideas by Ron Klatcho to solve the problem of a
+// base class needing to be initialized by a member.
+
+// Contributed by Daryle Walker
+
+template < typename MemberType, int UniqueID = 0 >
+class base_from_member
+{
+protected:
+    MemberType  member;
+
+    base_from_member()
+        : member()
+        {}
+
+    BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY),
+     BOOST_PRIVATE_CTR_DEF, _ )
+
+};  // ndnboost::base_from_member
+
+}  // namespace ndnboost
+
+
+// Undo any private macros
+#undef BOOST_PRIVATE_CTR_DEF
+
+
+#endif  // BOOST_UTILITY_BASE_FROM_MEMBER_HPP
diff --git a/ndnboost/utility/binary.hpp b/ndnboost/utility/binary.hpp
new file mode 100644
index 0000000..4ea209f
--- /dev/null
+++ b/ndnboost/utility/binary.hpp
@@ -0,0 +1,708 @@
+/*=============================================================================
+    Copyright (c) 2005 Matthew Calabrese
+
+    Use, modification and distribution is subject to the Boost Software
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_UTILITY_BINARY_HPP
+#define BOOST_UTILITY_BINARY_HPP
+
+/*=============================================================================
+
+    Binary Literal Utility
+    ______________________
+
+
+    The following code works by converting the input bit pattern into a
+    Boost.Preprocessor sequence, then converting groupings of 3 bits each into
+    the corresponding octal digit, and finally concatenating all of the digits
+    together along with a leading zero. This yields a standard octal literal
+    with the desired value as specified in bits.
+
+==============================================================================*/
+
+#include <ndnboost/preprocessor/control/deduce_d.hpp>
+#include <ndnboost/preprocessor/facilities/identity.hpp>
+#include <ndnboost/preprocessor/cat.hpp>
+#include <ndnboost/preprocessor/seq/cat.hpp>
+#include <ndnboost/preprocessor/seq/transform.hpp>
+#include <ndnboost/preprocessor/arithmetic/mod.hpp>
+#include <ndnboost/preprocessor/seq/size.hpp>
+#include <ndnboost/preprocessor/facilities/empty.hpp>
+#include <ndnboost/preprocessor/control/while.hpp>
+
+#define BOOST_BINARY( bit_groupings )                                          \
+  BOOST_BINARY_LITERAL_D( BOOST_PP_DEDUCE_D(), bit_groupings ) 
+
+#define BOOST_BINARY_U( bit_groupings )                                        \
+  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, U ) 
+
+#define BOOST_BINARY_L( bit_groupings )                                        \
+  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, L ) 
+
+#define BOOST_BINARY_UL( bit_groupings )                                       \
+  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, UL ) 
+
+#define BOOST_BINARY_LU( bit_groupings )                                       \
+  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, LU ) 
+
+#define BOOST_BINARY_LL( bit_groupings )                                       \
+  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, LL ) 
+
+#define BOOST_BINARY_ULL( bit_groupings )                                      \
+  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, ULL ) 
+
+#define BOOST_BINARY_LLU( bit_groupings )                                      \
+  BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, LLU ) 
+
+#define BOOST_SUFFIXED_BINARY_LITERAL( bit_groupings, suffix )                 \
+  BOOST_SUFFIXED_BINARY_LITERAL_D( BOOST_PP_DEDUCE_D(), bit_groupings, suffix ) 
+
+#define BOOST_SUFFIXED_BINARY_LITERAL_D( d, bit_groupings, suffix )            \
+  BOOST_PP_CAT( BOOST_BINARY_LITERAL_D( d, bit_groupings ), suffix ) 
+
+#define BOOST_BINARY_LITERAL_D( d, bit_groupings )                             \
+  BOOST_PP_SEQ_CAT                                                             \
+  ( (0) BOOST_DETAIL_CREATE_BINARY_LITERAL_OCTAL_SEQUENCE( d, bit_groupings )  \
+  ) 
+
+#define BOOST_DETAIL_CREATE_BINARY_LITERAL_OCTAL_SEQUENCE( d, bit_groupings )  \
+  BOOST_PP_SEQ_TRANSFORM                                                       \
+  ( BOOST_DETAIL_TRIPLE_TO_OCTAL_OPERATION                                     \
+  , BOOST_PP_NIL                                                               \
+  , BOOST_PP_IDENTITY( BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_TRIPLE_SEQUENCE )()\
+    ( BOOST_DETAIL_COMPLETE_TRIPLE_SEQUENCE                                    \
+      (                                                                        \
+        d                                                                      \
+      , BOOST_DETAIL_CREATE_BINARY_LITERAL_BIT_SEQUENCE( d, bit_groupings )    \
+      )                                                                        \
+    )                                                                          \
+  ) 
+
+#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_TRIPLE_SEQUENCE( bit_sequence )   \
+  BOOST_PP_CAT                                                                 \
+  ( BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1 bit_sequence      \
+  , END_BIT                                                                    \
+  ) 
+
+#define BOOST_DETAIL_BITS_PER_OCTIT 3
+
+#define BOOST_DETAIL_COMPLETE_TRIPLE_SEQUENCE( d, incomplete_nibble_sequence ) \
+  BOOST_PP_CAT                                                                 \
+  ( BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_                            \
+  , BOOST_PP_MOD_D( d                                                          \
+                  , BOOST_PP_SEQ_SIZE( incomplete_nibble_sequence )            \
+                  , BOOST_DETAIL_BITS_PER_OCTIT                                \
+                  )                                                            \
+  )                                                                            \
+  incomplete_nibble_sequence 
+
+#define BOOST_DETAIL_FIXED_COMPL( bit )                                        \
+  BOOST_PP_CAT( BOOST_DETAIL_FIXED_COMPL_, bit )
+
+#define BOOST_DETAIL_FIXED_COMPL_0 1 
+
+#define BOOST_DETAIL_FIXED_COMPL_1 0 
+
+#define BOOST_DETAIL_CREATE_BINARY_LITERAL_BIT_SEQUENCE( d, bit_groupings )    \
+  BOOST_PP_EMPTY                                                               \
+  BOOST_PP_CAT( BOOST_PP_WHILE_, d )                                           \
+  ( BOOST_DETAIL_BINARY_LITERAL_PREDICATE                                      \
+  , BOOST_DETAIL_BINARY_LITERAL_OPERATION                                      \
+  , bit_groupings ()                                                           \
+  ) 
+
+#define BOOST_DETAIL_BINARY_LITERAL_PREDICATE( d, state )                      \
+  BOOST_DETAIL_FIXED_COMPL( BOOST_DETAIL_IS_NULLARY_ARGS( state ) ) 
+
+#define BOOST_DETAIL_BINARY_LITERAL_OPERATION( d, state )                      \
+  BOOST_DETAIL_SPLIT_AND_SWAP                                                  \
+  ( BOOST_PP_CAT( BOOST_DETAIL_BINARY_LITERAL_ELEMENT_, state ) ) 
+
+#define BOOST_DETAIL_TRIPLE_TO_OCTAL_OPERATION( s, dummy_param, tuple )        \
+  BOOST_DETAIL_TERNARY_TRIPLE_TO_OCTAL tuple 
+
+#define BOOST_DETAIL_TERNARY_TRIPLE_TO_OCTAL( bit2, bit1, bit0 )               \
+  BOOST_DETAIL_TRIPLE_TO_OCTAL_ ## bit2 ## bit1 ## bit0 
+
+#define BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_1 (0)(0)
+#define BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_2 (0)
+#define BOOST_DETAIL_CREATE_TRIPLE_COMPLETION_SEQUENCE_0  
+
+#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1END_BIT  
+
+#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1( bit )        \
+  ( ( bit, BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_2 
+
+#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_2( bit )        \
+  bit, BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_3 
+
+#define BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_3( bit )        \
+  bit ) ) BOOST_DETAIL_CONVERT_BIT_SEQUENCE_TO_PARENTHETIC_TUPLE_1 
+
+#define BOOST_DETAIL_SPLIT_AND_SWAP( params )                                  \
+  BOOST_PP_IDENTITY( BOOST_DETAIL_SPLIT_AND_SWAP_PARAMS )()( params )
+
+#define BOOST_DETAIL_SPLIT_AND_SWAP_PARAMS( first_param, second_param )        \
+  second_param first_param 
+
+#define BOOST_DETAIL_LEFT_OF_COMMA( params )                                   \
+  BOOST_PP_IDENTITY( BOOST_DETAIL_FIRST_MACRO_PARAM )()( params ) 
+
+#define BOOST_DETAIL_FIRST_MACRO_PARAM( first_param, second_param )            \
+  first_param 
+
+/* Begin derived concepts from Chaos by Paul Mensonides */
+
+#define BOOST_DETAIL_IS_NULLARY_ARGS( param )                                  \
+  BOOST_DETAIL_LEFT_OF_COMMA                                                   \
+  ( BOOST_PP_CAT( BOOST_DETAIL_IS_NULLARY_ARGS_R_                              \
+                , BOOST_DETAIL_IS_NULLARY_ARGS_C param                         \
+                )                                                              \
+  ) 
+
+#define BOOST_DETAIL_IS_NULLARY_ARGS_C()                                       \
+  1 
+
+#define BOOST_DETAIL_IS_NULLARY_ARGS_R_1                                       \
+  1, BOOST_PP_NIL 
+
+#define BOOST_DETAIL_IS_NULLARY_ARGS_R_BOOST_DETAIL_IS_NULLARY_ARGS_C          \
+  0, BOOST_PP_NIL 
+
+/* End derived concepts from Chaos by Paul Mensonides */
+
+#define BOOST_DETAIL_TRIPLE_TO_OCTAL_000 0 
+#define BOOST_DETAIL_TRIPLE_TO_OCTAL_001 1 
+#define BOOST_DETAIL_TRIPLE_TO_OCTAL_010 2 
+#define BOOST_DETAIL_TRIPLE_TO_OCTAL_011 3 
+#define BOOST_DETAIL_TRIPLE_TO_OCTAL_100 4 
+#define BOOST_DETAIL_TRIPLE_TO_OCTAL_101 5 
+#define BOOST_DETAIL_TRIPLE_TO_OCTAL_110 6 
+#define BOOST_DETAIL_TRIPLE_TO_OCTAL_111 7 
+
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0 (0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1 (1), 
+
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00 (0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01 (0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10 (1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11 (1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00 (0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01 (0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10 (1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11 (1)(1), 
+
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000 (0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001 (0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010 (0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011 (0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100 (1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101 (1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110 (1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111 (1)(1)(1), 
+
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000 (0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001 (0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010 (0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011 (0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100 (0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101 (0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110 (0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111 (0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000 (1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001 (1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010 (1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011 (1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100 (1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101 (1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110 (1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111 (1)(1)(1)(1), 
+
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000 (0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001 (0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010 (0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011 (0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100 (0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101 (0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110 (0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111 (0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000 (0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001 (0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010 (0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011 (0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100 (0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101 (0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110 (0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111 (0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000 (1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001 (1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010 (1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011 (1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100 (1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101 (1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110 (1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111 (1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000 (1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001 (1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010 (1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011 (1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100 (1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101 (1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110 (1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111 (1)(1)(1)(1)(1), 
+
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000000 (0)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000001 (0)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000010 (0)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000011 (0)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000100 (0)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000101 (0)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000110 (0)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_000111 (0)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001000 (0)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001001 (0)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001010 (0)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001011 (0)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001100 (0)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001101 (0)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001110 (0)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_001111 (0)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010000 (0)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010001 (0)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010010 (0)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010011 (0)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010100 (0)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010101 (0)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010110 (0)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_010111 (0)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011000 (0)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011001 (0)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011010 (0)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011011 (0)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011100 (0)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011101 (0)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011110 (0)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_011111 (0)(1)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100000 (1)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100001 (1)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100010 (1)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100011 (1)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100100 (1)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100101 (1)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100110 (1)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_100111 (1)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101000 (1)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101001 (1)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101010 (1)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101011 (1)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101100 (1)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101101 (1)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101110 (1)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_101111 (1)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110000 (1)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110001 (1)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110010 (1)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110011 (1)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110100 (1)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110101 (1)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110110 (1)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_110111 (1)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111000 (1)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111001 (1)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111010 (1)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111011 (1)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111100 (1)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111101 (1)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111110 (1)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_111111 (1)(1)(1)(1)(1)(1), 
+
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000000 (0)(0)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000001 (0)(0)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000010 (0)(0)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000011 (0)(0)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000100 (0)(0)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000101 (0)(0)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000110 (0)(0)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0000111 (0)(0)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001000 (0)(0)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001001 (0)(0)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001010 (0)(0)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001011 (0)(0)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001100 (0)(0)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001101 (0)(0)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001110 (0)(0)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0001111 (0)(0)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010000 (0)(0)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010001 (0)(0)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010010 (0)(0)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010011 (0)(0)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010100 (0)(0)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010101 (0)(0)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010110 (0)(0)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0010111 (0)(0)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011000 (0)(0)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011001 (0)(0)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011010 (0)(0)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011011 (0)(0)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011100 (0)(0)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011101 (0)(0)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011110 (0)(0)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0011111 (0)(0)(1)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100000 (0)(1)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100001 (0)(1)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100010 (0)(1)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100011 (0)(1)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100100 (0)(1)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100101 (0)(1)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100110 (0)(1)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0100111 (0)(1)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101000 (0)(1)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101001 (0)(1)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101010 (0)(1)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101011 (0)(1)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101100 (0)(1)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101101 (0)(1)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101110 (0)(1)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0101111 (0)(1)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110000 (0)(1)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110001 (0)(1)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110010 (0)(1)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110011 (0)(1)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110100 (0)(1)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110101 (0)(1)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110110 (0)(1)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0110111 (0)(1)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111000 (0)(1)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111001 (0)(1)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111010 (0)(1)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111011 (0)(1)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111100 (0)(1)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111101 (0)(1)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111110 (0)(1)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_0111111 (0)(1)(1)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000000 (1)(0)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000001 (1)(0)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000010 (1)(0)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000011 (1)(0)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000100 (1)(0)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000101 (1)(0)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000110 (1)(0)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1000111 (1)(0)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001000 (1)(0)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001001 (1)(0)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001010 (1)(0)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001011 (1)(0)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001100 (1)(0)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001101 (1)(0)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001110 (1)(0)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1001111 (1)(0)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010000 (1)(0)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010001 (1)(0)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010010 (1)(0)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010011 (1)(0)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010100 (1)(0)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010101 (1)(0)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010110 (1)(0)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1010111 (1)(0)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011000 (1)(0)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011001 (1)(0)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011010 (1)(0)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011011 (1)(0)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011100 (1)(0)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011101 (1)(0)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011110 (1)(0)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1011111 (1)(0)(1)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100000 (1)(1)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100001 (1)(1)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100010 (1)(1)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100011 (1)(1)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100100 (1)(1)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100101 (1)(1)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100110 (1)(1)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1100111 (1)(1)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101000 (1)(1)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101001 (1)(1)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101010 (1)(1)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101011 (1)(1)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101100 (1)(1)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101101 (1)(1)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101110 (1)(1)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1101111 (1)(1)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110000 (1)(1)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110001 (1)(1)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110010 (1)(1)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110011 (1)(1)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110100 (1)(1)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110101 (1)(1)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110110 (1)(1)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1110111 (1)(1)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111000 (1)(1)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111001 (1)(1)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111010 (1)(1)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111011 (1)(1)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111100 (1)(1)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111101 (1)(1)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111110 (1)(1)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_1111111 (1)(1)(1)(1)(1)(1)(1), 
+
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000000 (0)(0)(0)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000001 (0)(0)(0)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000010 (0)(0)(0)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000011 (0)(0)(0)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000100 (0)(0)(0)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000101 (0)(0)(0)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000110 (0)(0)(0)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00000111 (0)(0)(0)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001000 (0)(0)(0)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001001 (0)(0)(0)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001010 (0)(0)(0)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001011 (0)(0)(0)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001100 (0)(0)(0)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001101 (0)(0)(0)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001110 (0)(0)(0)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00001111 (0)(0)(0)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010000 (0)(0)(0)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010001 (0)(0)(0)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010010 (0)(0)(0)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010011 (0)(0)(0)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010100 (0)(0)(0)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010101 (0)(0)(0)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010110 (0)(0)(0)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00010111 (0)(0)(0)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011000 (0)(0)(0)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011001 (0)(0)(0)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011010 (0)(0)(0)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011011 (0)(0)(0)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011100 (0)(0)(0)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011101 (0)(0)(0)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011110 (0)(0)(0)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00011111 (0)(0)(0)(1)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100000 (0)(0)(1)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100001 (0)(0)(1)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100010 (0)(0)(1)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100011 (0)(0)(1)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100100 (0)(0)(1)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100101 (0)(0)(1)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100110 (0)(0)(1)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00100111 (0)(0)(1)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101000 (0)(0)(1)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101001 (0)(0)(1)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101010 (0)(0)(1)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101011 (0)(0)(1)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101100 (0)(0)(1)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101101 (0)(0)(1)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101110 (0)(0)(1)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00101111 (0)(0)(1)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110000 (0)(0)(1)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110001 (0)(0)(1)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110010 (0)(0)(1)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110011 (0)(0)(1)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110100 (0)(0)(1)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110101 (0)(0)(1)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110110 (0)(0)(1)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00110111 (0)(0)(1)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111000 (0)(0)(1)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111001 (0)(0)(1)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111010 (0)(0)(1)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111011 (0)(0)(1)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111100 (0)(0)(1)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111101 (0)(0)(1)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111110 (0)(0)(1)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_00111111 (0)(0)(1)(1)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000000 (0)(1)(0)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000001 (0)(1)(0)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000010 (0)(1)(0)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000011 (0)(1)(0)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000100 (0)(1)(0)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000101 (0)(1)(0)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000110 (0)(1)(0)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01000111 (0)(1)(0)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001000 (0)(1)(0)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001001 (0)(1)(0)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001010 (0)(1)(0)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001011 (0)(1)(0)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001100 (0)(1)(0)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001101 (0)(1)(0)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001110 (0)(1)(0)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01001111 (0)(1)(0)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010000 (0)(1)(0)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010001 (0)(1)(0)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010010 (0)(1)(0)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010011 (0)(1)(0)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010100 (0)(1)(0)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010101 (0)(1)(0)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010110 (0)(1)(0)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01010111 (0)(1)(0)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011000 (0)(1)(0)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011001 (0)(1)(0)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011010 (0)(1)(0)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011011 (0)(1)(0)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011100 (0)(1)(0)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011101 (0)(1)(0)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011110 (0)(1)(0)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01011111 (0)(1)(0)(1)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100000 (0)(1)(1)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100001 (0)(1)(1)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100010 (0)(1)(1)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100011 (0)(1)(1)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100100 (0)(1)(1)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100101 (0)(1)(1)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100110 (0)(1)(1)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01100111 (0)(1)(1)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101000 (0)(1)(1)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101001 (0)(1)(1)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101010 (0)(1)(1)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101011 (0)(1)(1)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101100 (0)(1)(1)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101101 (0)(1)(1)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101110 (0)(1)(1)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01101111 (0)(1)(1)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110000 (0)(1)(1)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110001 (0)(1)(1)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110010 (0)(1)(1)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110011 (0)(1)(1)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110100 (0)(1)(1)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110101 (0)(1)(1)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110110 (0)(1)(1)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01110111 (0)(1)(1)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111000 (0)(1)(1)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111001 (0)(1)(1)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111010 (0)(1)(1)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111011 (0)(1)(1)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111100 (0)(1)(1)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111101 (0)(1)(1)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111110 (0)(1)(1)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_01111111 (0)(1)(1)(1)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000000 (1)(0)(0)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000001 (1)(0)(0)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000010 (1)(0)(0)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000011 (1)(0)(0)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000100 (1)(0)(0)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000101 (1)(0)(0)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000110 (1)(0)(0)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10000111 (1)(0)(0)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001000 (1)(0)(0)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001001 (1)(0)(0)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001010 (1)(0)(0)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001011 (1)(0)(0)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001100 (1)(0)(0)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001101 (1)(0)(0)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001110 (1)(0)(0)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10001111 (1)(0)(0)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010000 (1)(0)(0)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010001 (1)(0)(0)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010010 (1)(0)(0)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010011 (1)(0)(0)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010100 (1)(0)(0)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010101 (1)(0)(0)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010110 (1)(0)(0)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10010111 (1)(0)(0)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011000 (1)(0)(0)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011001 (1)(0)(0)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011010 (1)(0)(0)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011011 (1)(0)(0)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011100 (1)(0)(0)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011101 (1)(0)(0)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011110 (1)(0)(0)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10011111 (1)(0)(0)(1)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100000 (1)(0)(1)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100001 (1)(0)(1)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100010 (1)(0)(1)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100011 (1)(0)(1)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100100 (1)(0)(1)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100101 (1)(0)(1)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100110 (1)(0)(1)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10100111 (1)(0)(1)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101000 (1)(0)(1)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101001 (1)(0)(1)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101010 (1)(0)(1)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101011 (1)(0)(1)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101100 (1)(0)(1)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101101 (1)(0)(1)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101110 (1)(0)(1)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10101111 (1)(0)(1)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110000 (1)(0)(1)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110001 (1)(0)(1)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110010 (1)(0)(1)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110011 (1)(0)(1)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110100 (1)(0)(1)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110101 (1)(0)(1)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110110 (1)(0)(1)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10110111 (1)(0)(1)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111000 (1)(0)(1)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111001 (1)(0)(1)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111010 (1)(0)(1)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111011 (1)(0)(1)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111100 (1)(0)(1)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111101 (1)(0)(1)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111110 (1)(0)(1)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_10111111 (1)(0)(1)(1)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000000 (1)(1)(0)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000001 (1)(1)(0)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000010 (1)(1)(0)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000011 (1)(1)(0)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000100 (1)(1)(0)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000101 (1)(1)(0)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000110 (1)(1)(0)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11000111 (1)(1)(0)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001000 (1)(1)(0)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001001 (1)(1)(0)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001010 (1)(1)(0)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001011 (1)(1)(0)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001100 (1)(1)(0)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001101 (1)(1)(0)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001110 (1)(1)(0)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11001111 (1)(1)(0)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010000 (1)(1)(0)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010001 (1)(1)(0)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010010 (1)(1)(0)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010011 (1)(1)(0)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010100 (1)(1)(0)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010101 (1)(1)(0)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010110 (1)(1)(0)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11010111 (1)(1)(0)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011000 (1)(1)(0)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011001 (1)(1)(0)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011010 (1)(1)(0)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011011 (1)(1)(0)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011100 (1)(1)(0)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011101 (1)(1)(0)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011110 (1)(1)(0)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11011111 (1)(1)(0)(1)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100000 (1)(1)(1)(0)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100001 (1)(1)(1)(0)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100010 (1)(1)(1)(0)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100011 (1)(1)(1)(0)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100100 (1)(1)(1)(0)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100101 (1)(1)(1)(0)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100110 (1)(1)(1)(0)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11100111 (1)(1)(1)(0)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101000 (1)(1)(1)(0)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101001 (1)(1)(1)(0)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101010 (1)(1)(1)(0)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101011 (1)(1)(1)(0)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101100 (1)(1)(1)(0)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101101 (1)(1)(1)(0)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101110 (1)(1)(1)(0)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11101111 (1)(1)(1)(0)(1)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110000 (1)(1)(1)(1)(0)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110001 (1)(1)(1)(1)(0)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110010 (1)(1)(1)(1)(0)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110011 (1)(1)(1)(1)(0)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110100 (1)(1)(1)(1)(0)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110101 (1)(1)(1)(1)(0)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110110 (1)(1)(1)(1)(0)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11110111 (1)(1)(1)(1)(0)(1)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111000 (1)(1)(1)(1)(1)(0)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111001 (1)(1)(1)(1)(1)(0)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111010 (1)(1)(1)(1)(1)(0)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111011 (1)(1)(1)(1)(1)(0)(1)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111100 (1)(1)(1)(1)(1)(1)(0)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111101 (1)(1)(1)(1)(1)(1)(0)(1), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111110 (1)(1)(1)(1)(1)(1)(1)(0), 
+#define BOOST_DETAIL_BINARY_LITERAL_ELEMENT_11111111 (1)(1)(1)(1)(1)(1)(1)(1), 
+
+#endif
diff --git a/ndnboost/utility/compare_pointees.hpp b/ndnboost/utility/compare_pointees.hpp
new file mode 100644
index 0000000..6e20bf0
--- /dev/null
+++ b/ndnboost/utility/compare_pointees.hpp
@@ -0,0 +1,68 @@
+// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  fernando_cacciola@hotmail.com
+//
+#ifndef BOOST_UTILITY_COMPARE_POINTEES_25AGO2003_HPP
+#define BOOST_UTILITY_COMPARE_POINTEES_25AGO2003_HPP
+
+#include<functional>
+
+namespace ndnboost {
+
+// template<class OP> bool equal_pointees(OP const& x, OP const& y);
+// template<class OP> struct equal_pointees_t;
+//
+// Being OP a model of OptionalPointee (either a pointer or an optional):
+//
+// If both x and y have valid pointees, returns the result of (*x == *y)
+// If only one has a valid pointee, returns false.
+// If none have valid pointees, returns true.
+// No-throw
+template<class OptionalPointee>
+inline
+bool equal_pointees ( OptionalPointee const& x, OptionalPointee const& y )
+{
+  return (!x) != (!y) ? false : ( !x ? true : (*x) == (*y) ) ;
+}
+
+template<class OptionalPointee>
+struct equal_pointees_t : std::binary_function<OptionalPointee,OptionalPointee,bool>
+{
+  bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const
+    { return equal_pointees(x,y) ; }
+} ;
+
+// template<class OP> bool less_pointees(OP const& x, OP const& y);
+// template<class OP> struct less_pointees_t;
+//
+// Being OP a model of OptionalPointee (either a pointer or an optional):
+//
+// If y has not a valid pointee, returns false.
+// ElseIf x has not a valid pointee, returns true.
+// ElseIf both x and y have valid pointees, returns the result of (*x < *y)
+// No-throw
+template<class OptionalPointee>
+inline
+bool less_pointees ( OptionalPointee const& x, OptionalPointee const& y )
+{
+  return !y ? false : ( !x ? true : (*x) < (*y) ) ;
+}
+
+template<class OptionalPointee>
+struct less_pointees_t : std::binary_function<OptionalPointee,OptionalPointee,bool>
+{
+  bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const
+    { return less_pointees(x,y) ; }
+} ;
+
+} // namespace ndnboost
+
+#endif
+
diff --git a/ndnboost/utility/detail/in_place_factory_prefix.hpp b/ndnboost/utility/detail/in_place_factory_prefix.hpp
new file mode 100644
index 0000000..17c82e7
--- /dev/null
+++ b/ndnboost/utility/detail/in_place_factory_prefix.hpp
@@ -0,0 +1,36 @@
+// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+// Copyright (C) 2007, Tobias Schwinger.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  fernando_cacciola@hotmail.com
+//
+#ifndef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_PREFIX_04APR2007_HPP
+#define BOOST_UTILITY_DETAIL_INPLACE_FACTORY_PREFIX_04APR2007_HPP
+
+#include <new>
+#include <cstddef>
+#include <ndnboost/config.hpp>
+#include <ndnboost/preprocessor/cat.hpp>
+#include <ndnboost/preprocessor/punctuation/paren.hpp>
+#include <ndnboost/preprocessor/iteration/iterate.hpp>
+#include <ndnboost/preprocessor/repetition/repeat.hpp>
+#include <ndnboost/preprocessor/repetition/enum.hpp>
+#include <ndnboost/preprocessor/repetition/enum_params.hpp>
+#include <ndnboost/preprocessor/repetition/enum_binary_params.hpp>
+#include <ndnboost/preprocessor/repetition/enum_trailing_params.hpp>
+
+#define BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_INIT(z,n,_) BOOST_PP_CAT(m_a,n) BOOST_PP_LPAREN() BOOST_PP_CAT(a,n) BOOST_PP_RPAREN()
+#define BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_DECL(z,n,_) BOOST_PP_CAT(A,n) const& BOOST_PP_CAT(m_a,n);
+
+#define BOOST_MAX_INPLACE_FACTORY_ARITY 10
+
+#undef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_SUFFIX_04APR2007_HPP
+
+#endif
+
diff --git a/ndnboost/utility/detail/in_place_factory_suffix.hpp b/ndnboost/utility/detail/in_place_factory_suffix.hpp
new file mode 100644
index 0000000..58f48c7
--- /dev/null
+++ b/ndnboost/utility/detail/in_place_factory_suffix.hpp
@@ -0,0 +1,23 @@
+// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+// Copyright (C) 2007, Tobias Schwinger.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  fernando_cacciola@hotmail.com
+//
+#ifndef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_SUFFIX_04APR2007_HPP
+#define BOOST_UTILITY_DETAIL_INPLACE_FACTORY_SUFFIX_04APR2007_HPP
+
+#undef BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_INIT
+#undef BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_DECL
+#undef BOOST_MAX_INPLACE_FACTORY_ARITY
+
+#undef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_PREFIX_04APR2007_HPP
+
+#endif
+
diff --git a/ndnboost/utility/identity_type.hpp b/ndnboost/utility/identity_type.hpp
new file mode 100644
index 0000000..060ddbd
--- /dev/null
+++ b/ndnboost/utility/identity_type.hpp
@@ -0,0 +1,46 @@
+
+// Copyright (C) 2009-2012 Lorenzo Caminiti
+// Distributed under the Boost Software License, Version 1.0
+// (see accompanying file LICENSE_1_0.txt or a copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// Home at http://www.boost.org/libs/utility/identity_type
+
+/** @file
+Wrap type expressions with round parenthesis so they can be passed to macros
+even if they contain commas.
+*/
+
+#ifndef BOOST_IDENTITY_TYPE_HPP_
+#define BOOST_IDENTITY_TYPE_HPP_
+
+#include <ndnboost/type_traits/function_traits.hpp>
+
+/**
+@brief This macro allows to wrap the specified type expression within extra
+round parenthesis so the type can be passed as a single macro parameter even if
+it contains commas (not already wrapped within round parenthesis).
+
+@Params
+@Param{parenthesized_type,
+The type expression to be passed as macro parameter wrapped by a single set
+of round parenthesis <c>(...)</c>.
+This type expression can contain an arbitrary number of commas.
+}
+@EndParams
+
+This macro works on any C++03 compiler (it does not use variadic macros).
+
+This macro must be prefixed by <c>typename</c> when used within templates.
+Note that the compiler will not be able to automatically determine function
+template parameters when they are wrapped with this macro (these parameters
+need to be explicitly specified when calling the function template).
+
+On some compilers (like GCC), using this macro on abstract types requires to
+add and remove a reference to the specified type.
+*/
+#define BOOST_IDENTITY_TYPE(parenthesized_type) \
+    /* must NOT prefix this with `::` to work with parenthesized syntax */ \
+    ndnboost::function_traits< void parenthesized_type >::arg1_type
+
+#endif // #include guard
+
diff --git a/ndnboost/utility/in_place_factory.hpp b/ndnboost/utility/in_place_factory.hpp
new file mode 100644
index 0000000..f849649
--- /dev/null
+++ b/ndnboost/utility/in_place_factory.hpp
@@ -0,0 +1,88 @@
+// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+// Copyright (C) 2007, Tobias Schwinger.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+//  fernando_cacciola@hotmail.com
+//
+#ifndef BOOST_UTILITY_INPLACE_FACTORY_04APR2007_HPP
+#ifndef BOOST_PP_IS_ITERATING
+
+#include <ndnboost/utility/detail/in_place_factory_prefix.hpp>
+
+namespace ndnboost {
+
+class in_place_factory_base {} ;
+
+#define  BOOST_PP_ITERATION_LIMITS (0, BOOST_MAX_INPLACE_FACTORY_ARITY)
+#define  BOOST_PP_FILENAME_1 <ndnboost/utility/in_place_factory.hpp>
+#include BOOST_PP_ITERATE()
+
+} // namespace ndnboost
+
+#include <ndnboost/utility/detail/in_place_factory_suffix.hpp>
+
+#define BOOST_UTILITY_INPLACE_FACTORY_04APR2007_HPP
+#else
+#define N BOOST_PP_ITERATION()
+
+#if N
+template< BOOST_PP_ENUM_PARAMS(N, class A) >
+#endif
+class BOOST_PP_CAT(in_place_factory,N)
+  : 
+  public in_place_factory_base
+{
+public:
+
+  explicit BOOST_PP_CAT(in_place_factory,N)
+      ( BOOST_PP_ENUM_BINARY_PARAMS(N,A,const& a) )
+#if N > 0
+    : BOOST_PP_ENUM(N, BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_INIT, _)
+#endif
+  {}
+
+  template<class T>
+  void* apply(void* address
+      BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) const
+  {
+    return new(address) T( BOOST_PP_ENUM_PARAMS(N, m_a) );
+  }
+
+  template<class T>
+  void* apply(void* address, std::size_t n
+      BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) const
+  {
+    for(char* next = address = this->BOOST_NESTED_TEMPLATE apply<T>(address);
+        !! --n;)
+      this->BOOST_NESTED_TEMPLATE apply<T>(next = next+sizeof(T));
+    return address; 
+  }
+
+  BOOST_PP_REPEAT(N, BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_DECL, _)
+};
+
+#if N > 0
+template< BOOST_PP_ENUM_PARAMS(N, class A) >
+inline BOOST_PP_CAT(in_place_factory,N)< BOOST_PP_ENUM_PARAMS(N, A) >
+in_place( BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& a) )
+{
+  return BOOST_PP_CAT(in_place_factory,N)< BOOST_PP_ENUM_PARAMS(N, A) >
+      ( BOOST_PP_ENUM_PARAMS(N, a) );
+}
+#else
+inline in_place_factory0 in_place()
+{
+  return in_place_factory0();
+}
+#endif
+
+#undef N
+#endif
+#endif
+
diff --git a/ndnboost/utility/value_init.hpp b/ndnboost/utility/value_init.hpp
new file mode 100644
index 0000000..6767810
--- /dev/null
+++ b/ndnboost/utility/value_init.hpp
@@ -0,0 +1,258 @@
+// (C) Copyright 2002-2008, Fernando Luis Cacciola Carballal.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// 21 Ago 2002 (Created) Fernando Cacciola
+// 24 Dec 2007 (Refactored and worked around various compiler bugs) Fernando Cacciola, Niels Dekker
+// 23 May 2008 (Fixed operator= const issue, added initialized_value) Niels Dekker, Fernando Cacciola
+// 21 Ago 2008 (Added swap) Niels Dekker, Fernando Cacciola
+// 20 Feb 2009 (Fixed logical const-ness issues) Niels Dekker, Fernando Cacciola
+// 03 Apr 2010 (Added initialized<T>, suggested by Jeffrey Hellrung, fixing #3472) Niels Dekker
+// 30 May 2010 (Made memset call conditional, fixing #3869) Niels Dekker
+//
+#ifndef BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
+#define BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
+
+// Note: The implementation of ndnboost::value_initialized had to deal with the
+// fact that various compilers haven't fully implemented value-initialization.
+// The constructor of ndnboost::value_initialized<T> works around these compiler
+// issues, by clearing the bytes of T, before constructing the T object it
+// contains. More details on these issues are at libs/utility/value_init.htm
+
+#include <ndnboost/aligned_storage.hpp>
+#include <ndnboost/config.hpp> // For BOOST_NO_COMPLETE_VALUE_INITIALIZATION.
+#include <ndnboost/detail/workaround.hpp>
+#include <ndnboost/static_assert.hpp>
+#include <ndnboost/type_traits/cv_traits.hpp>
+#include <ndnboost/type_traits/alignment_of.hpp>
+#include <ndnboost/swap.hpp>
+#include <cstring>
+#include <new>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#if _MSC_VER >= 1310
+// It is safe to ignore the following warning from MSVC 7.1 or higher:
+// "warning C4351: new behavior: elements of array will be default initialized"
+#pragma warning(disable: 4351)
+// It is safe to ignore the following MSVC warning, which may pop up when T is 
+// a const type: "warning C4512: assignment operator could not be generated".
+#pragma warning(disable: 4512)
+#endif
+#endif
+
+#ifdef BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+  // Implementation detail: The macro BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED 
+  // suggests that a workaround should be applied, because of compiler issues 
+  // regarding value-initialization.
+  #define BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED
+#endif
+
+// Implementation detail: The macro BOOST_DETAIL_VALUE_INIT_WORKAROUND
+// switches the value-initialization workaround either on or off.
+#ifndef BOOST_DETAIL_VALUE_INIT_WORKAROUND
+  #ifdef BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED
+  #define BOOST_DETAIL_VALUE_INIT_WORKAROUND 1
+  #else
+  #define BOOST_DETAIL_VALUE_INIT_WORKAROUND 0
+  #endif
+#endif
+
+namespace ndnboost {
+
+template<class T>
+class initialized
+{
+  private :
+    struct wrapper
+    {
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
+      typename
+#endif 
+      remove_const<T>::type data;
+
+      wrapper()
+      :
+      data()
+      {
+      }
+
+      wrapper(T const & arg)
+      :
+      data(arg)
+      {
+      }
+    };
+
+    mutable
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
+      typename
+#endif 
+      aligned_storage<sizeof(wrapper), alignment_of<wrapper>::value>::type x;
+
+    wrapper * wrapper_address() const
+    {
+      return static_cast<wrapper *>( static_cast<void*>(&x));
+    }
+
+  public :
+
+    initialized()
+    {
+#if BOOST_DETAIL_VALUE_INIT_WORKAROUND
+      std::memset(&x, 0, sizeof(x));
+#endif
+      new (wrapper_address()) wrapper();
+    }
+
+    initialized(initialized const & arg)
+    {
+      new (wrapper_address()) wrapper( static_cast<wrapper const &>(*(arg.wrapper_address())));
+    }
+
+    explicit initialized(T const & arg)
+    {
+      new (wrapper_address()) wrapper(arg);
+    }
+
+    initialized & operator=(initialized const & arg)
+    {
+      // Assignment is only allowed when T is non-const.
+      BOOST_STATIC_ASSERT( ! is_const<T>::value );
+      *wrapper_address() = static_cast<wrapper const &>(*(arg.wrapper_address()));
+      return *this;
+    }
+
+    ~initialized()
+    {
+      wrapper_address()->wrapper::~wrapper();
+    }
+
+    T const & data() const
+    {
+      return wrapper_address()->data;
+    }
+
+    T& data()
+    {
+      return wrapper_address()->data;
+    }
+
+    void swap(initialized & arg)
+    {
+      ::ndnboost::swap( this->data(), arg.data() );
+    }
+
+    operator T const &() const
+    {
+      return wrapper_address()->data;
+    }
+
+    operator T&()
+    {
+      return wrapper_address()->data;
+    }
+
+} ;
+
+template<class T>
+T const& get ( initialized<T> const& x )
+{
+  return x.data() ;
+}
+
+template<class T>
+T& get ( initialized<T>& x )
+{
+  return x.data() ;
+}
+
+template<class T>
+void swap ( initialized<T> & lhs, initialized<T> & rhs )
+{
+  lhs.swap(rhs) ;
+}
+
+template<class T>
+class value_initialized
+{
+  private :
+
+    // initialized<T> does value-initialization by default.
+    initialized<T> m_data;
+
+  public :
+    
+    value_initialized()
+    :
+    m_data()
+    { }
+    
+    T const & data() const
+    {
+      return m_data.data();
+    }
+
+    T& data()
+    {
+      return m_data.data();
+    }
+
+    void swap(value_initialized & arg)
+    {
+      m_data.swap(arg.m_data);
+    }
+
+    operator T const &() const
+    {
+      return m_data;
+    }
+
+    operator T&()
+    {
+      return m_data;
+    }
+} ;
+
+
+template<class T>
+T const& get ( value_initialized<T> const& x )
+{
+  return x.data() ;
+}
+
+template<class T>
+T& get ( value_initialized<T>& x )
+{
+  return x.data() ;
+}
+
+template<class T>
+void swap ( value_initialized<T> & lhs, value_initialized<T> & rhs )
+{
+  lhs.swap(rhs) ;
+}
+
+
+class initialized_value_t
+{
+  public :
+    
+    template <class T> operator T() const
+    {
+      return initialized<T>().data();
+    }
+};
+
+initialized_value_t const initialized_value = {} ;
+
+
+} // namespace ndnboost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
diff --git a/ndnboost/visit_each.hpp b/ndnboost/visit_each.hpp
new file mode 100644
index 0000000..43dfa65
--- /dev/null
+++ b/ndnboost/visit_each.hpp
@@ -0,0 +1,29 @@
+// Boost.Signals library
+
+// Copyright Douglas Gregor 2001-2003. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org/libs/signals
+
+#ifndef BOOST_VISIT_EACH_HPP
+#define BOOST_VISIT_EACH_HPP
+
+#include <ndnboost/config.hpp>
+
+namespace ndnboost {
+  template<typename Visitor, typename T>
+  inline void visit_each(Visitor& visitor, const T& t, long)
+  {
+    visitor(t);
+  }
+
+  template<typename Visitor, typename T>
+  inline void visit_each(Visitor& visitor, const T& t)
+  {
+    visit_each(visitor, t, 0);
+  }
+}
+
+#endif // BOOST_VISIT_EACH_HPP
