In common.h, define func_lib for function objects. In configure.ac, define HAVE_STD_FUNCTION and HAVE_BOOST_FUNCTION. Include function headers in ndnboost.
diff --git a/ndnboost/config/compiler/borland.hpp b/ndnboost/config/compiler/borland.hpp
index bcb6156..99965c4 100644
--- a/ndnboost/config/compiler/borland.hpp
+++ b/ndnboost/config/compiler/borland.hpp
@@ -190,6 +190,7 @@
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_NOEXCEPT
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#if __BORLANDC__ >= 0x590
# define BOOST_HAS_TR1_HASH
diff --git a/ndnboost/config/compiler/clang.hpp b/ndnboost/config/compiler/clang.hpp
index 18d6e54..8e38821 100644
--- a/ndnboost/config/compiler/clang.hpp
+++ b/ndnboost/config/compiler/clang.hpp
@@ -20,7 +20,7 @@
# define BOOST_NO_TYPEID
#endif
-#if defined(__int64)
+#if defined(__int64) && !defined(__GNUC__)
# define BOOST_HAS_MS_INT64
#endif
@@ -38,6 +38,16 @@
# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
#endif
+//
+// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through
+// between switch labels.
+//
+#if __cplusplus >= 201103L && defined(__has_warning)
+# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")
+# define BOOST_FALLTHROUGH [[clang::fallthrough]]
+# endif
+#endif
+
#if !__has_feature(cxx_auto_type)
# define BOOST_NO_CXX11_AUTO_DECLARATIONS
# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
@@ -132,6 +142,10 @@
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#endif
+#if !__has_feature(cxx_user_literals)
+# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+#endif
+
// Clang always supports variadic macros
// Clang always supports extern templates
diff --git a/ndnboost/config/compiler/codegear.hpp b/ndnboost/config/compiler/codegear.hpp
index 90790de..7108663 100644
--- a/ndnboost/config/compiler/codegear.hpp
+++ b/ndnboost/config/compiler/codegear.hpp
@@ -110,6 +110,7 @@
#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
//
// TR1 macros:
diff --git a/ndnboost/config/compiler/common_edg.hpp b/ndnboost/config/compiler/common_edg.hpp
index 441a055..4b5d2d2 100644
--- a/ndnboost/config/compiler/common_edg.hpp
+++ b/ndnboost/config/compiler/common_edg.hpp
@@ -95,6 +95,7 @@
#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#ifdef c_plusplus
// EDG has "long long" in non-strict mode
diff --git a/ndnboost/config/compiler/cray.hpp b/ndnboost/config/compiler/cray.hpp
index cabb98a..43a5db9 100644
--- a/ndnboost/config/compiler/cray.hpp
+++ b/ndnboost/config/compiler/cray.hpp
@@ -51,6 +51,7 @@
#define BOOST_NO_CXX11_DECLTYPE_N3276
#define BOOST_NO_CXX11_DECLTYPE
#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
#define BOOST_NO_CXX11_CHAR32_T
#define BOOST_NO_CXX11_CHAR16_T
diff --git a/ndnboost/config/compiler/digitalmars.hpp b/ndnboost/config/compiler/digitalmars.hpp
index 15cc209..0206dc3 100644
--- a/ndnboost/config/compiler/digitalmars.hpp
+++ b/ndnboost/config/compiler/digitalmars.hpp
@@ -86,6 +86,7 @@
#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#if (__DMC__ < 0x812)
#define BOOST_NO_CXX11_VARIADIC_MACROS
diff --git a/ndnboost/config/compiler/gcc.hpp b/ndnboost/config/compiler/gcc.hpp
index c0ac30a..b3d12ec 100644
--- a/ndnboost/config/compiler/gcc.hpp
+++ b/ndnboost/config/compiler/gcc.hpp
@@ -11,7 +11,14 @@
// See http://www.boost.org for most recent version.
-// GNU C++ compiler setup:
+// GNU C++ compiler setup.
+
+//
+// Define BOOST_GCC so we know this is "real" GCC and not some pretender:
+//
+#if !defined(__CUDACC__)
+#define BOOST_GCC (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+#endif
#if __GNUC__ < 3
# if __GNUC_MINOR__ == 91
@@ -147,9 +154,16 @@
#endif
//
-// Recent GCC versions have __int128 when in 64-bit mode:
+// Recent GCC versions have __int128 when in 64-bit mode.
//
-#if defined(__SIZEOF_INT128__)
+// We disable this if the compiler is really nvcc as it
+// doesn't actually support __int128 as of CUDA_VERSION=5000
+// even though it defines __SIZEOF_INT128__.
+// See https://svn.boost.org/trac/boost/ticket/8048
+// Only re-enable this for nvcc if you're absolutely sure
+// of the circumstances under which it's supported:
+//
+#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__)
# define BOOST_HAS_INT128
#endif
@@ -222,12 +236,18 @@
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#endif
+// C++0x features in 4.7.n and later
+//
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
# define BOOST_NO_CXX11_TEMPLATE_ALIASES
+# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#endif
-// C++0x features not supported at all yet
+
+// C++0x features in 4.8.1 and later
//
-#define BOOST_NO_CXX11_DECLTYPE_N3276
+#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40801) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_NO_CXX11_DECLTYPE_N3276
+#endif
#ifndef BOOST_COMPILER
# define BOOST_COMPILER "GNU C++ version " __VERSION__
diff --git a/ndnboost/config/compiler/gcc_xml.hpp b/ndnboost/config/compiler/gcc_xml.hpp
index eaed4b5..1af2fc1 100644
--- a/ndnboost/config/compiler/gcc_xml.hpp
+++ b/ndnboost/config/compiler/gcc_xml.hpp
@@ -53,7 +53,8 @@
# define BOOST_NO_CXX11_RAW_LITERALS
# define BOOST_NO_CXX11_UNICODE_LITERALS
# define BOOST_NO_CXX11_NOEXCEPT
-#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__
diff --git a/ndnboost/config/compiler/hp_acc.hpp b/ndnboost/config/compiler/hp_acc.hpp
index bad1a45..f2c917a 100644
--- a/ndnboost/config/compiler/hp_acc.hpp
+++ b/ndnboost/config/compiler/hp_acc.hpp
@@ -118,6 +118,7 @@
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
/*
See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and
diff --git a/ndnboost/config/compiler/intel.hpp b/ndnboost/config/compiler/intel.hpp
index e79e3cf..ea27b8d 100644
--- a/ndnboost/config/compiler/intel.hpp
+++ b/ndnboost/config/compiler/intel.hpp
@@ -181,7 +181,7 @@
// (Niels Dekker, LKEB, May 2010)
// Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression).
#if defined(__INTEL_COMPILER)
-# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999)
+# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1500))
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
# endif
#endif
diff --git a/ndnboost/config/compiler/metrowerks.hpp b/ndnboost/config/compiler/metrowerks.hpp
index 184cb71..4ca8af8 100644
--- a/ndnboost/config/compiler/metrowerks.hpp
+++ b/ndnboost/config/compiler/metrowerks.hpp
@@ -119,6 +119,7 @@
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_VARIADIC_MACROS
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
diff --git a/ndnboost/config/compiler/mpw.hpp b/ndnboost/config/compiler/mpw.hpp
index 14adee0..7ef38ef 100644
--- a/ndnboost/config/compiler/mpw.hpp
+++ b/ndnboost/config/compiler/mpw.hpp
@@ -68,6 +68,7 @@
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_VARIADIC_MACROS
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
//
// versions check:
diff --git a/ndnboost/config/compiler/pathscale.hpp b/ndnboost/config/compiler/pathscale.hpp
index 3041126..07d1460 100644
--- a/ndnboost/config/compiler/pathscale.hpp
+++ b/ndnboost/config/compiler/pathscale.hpp
@@ -76,5 +76,6 @@
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
# define BOOST_NO_CXX11_HDR_CODECVT
# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#endif
diff --git a/ndnboost/config/compiler/pgi.hpp b/ndnboost/config/compiler/pgi.hpp
index fa32fef..64c0d75 100644
--- a/ndnboost/config/compiler/pgi.hpp
+++ b/ndnboost/config/compiler/pgi.hpp
@@ -111,6 +111,7 @@
#define BOOST_NO_CXX11_HDR_CODECVT
#define BOOST_NO_CXX11_HDR_CHRONO
#define BOOST_NO_CXX11_HDR_ARRAY
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
//
// version check:
diff --git a/ndnboost/config/compiler/sunpro_cc.hpp b/ndnboost/config/compiler/sunpro_cc.hpp
index 65beb50..88421ee 100644
--- a/ndnboost/config/compiler/sunpro_cc.hpp
+++ b/ndnboost/config/compiler/sunpro_cc.hpp
@@ -127,6 +127,7 @@
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_CXX11_VARIADIC_MACROS
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
//
// Version
diff --git a/ndnboost/config/compiler/vacpp.hpp b/ndnboost/config/compiler/vacpp.hpp
index 2410d5a..47b9903 100644
--- a/ndnboost/config/compiler/vacpp.hpp
+++ b/ndnboost/config/compiler/vacpp.hpp
@@ -53,8 +53,8 @@
#error "Compiler not supported or configured - please reconfigure"
#endif
//
-// last known and checked version is 1110:
-#if (__IBMCPP__ > 1110)
+// last known and checked version is 1210:
+#if (__IBMCPP__ > 1210)
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results"
# endif
@@ -106,6 +106,7 @@
#define BOOST_NO_CXX11_NULLPTR
#define BOOST_NO_CXX11_RANGE_BASED_FOR
#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
#if ! __IBMCPP_RVALUE_REFERENCES
# define BOOST_NO_CXX11_RVALUE_REFERENCES
#endif
diff --git a/ndnboost/config/compiler/visualc.hpp b/ndnboost/config/compiler/visualc.hpp
index 22c5708..a7d3025 100644
--- a/ndnboost/config/compiler/visualc.hpp
+++ b/ndnboost/config/compiler/visualc.hpp
@@ -134,10 +134,6 @@
// (Niels Dekker, LKEB, May 2010)
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-#if _MSC_VER < 1600 || !defined(BOOST_STRICT_CONFIG) // 150X == VC++ 9.0
-# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#endif
-
#ifndef _NATIVE_WCHAR_T_DEFINED
# define BOOST_NO_INTRINSIC_WCHAR_T
#endif
@@ -221,24 +217,32 @@
# define BOOST_NO_CXX11_SCOPED_ENUMS
#endif // _MSC_VER < 1700
-// C++0x features not supported by any versions
+// C++11 features supported by VC++ 11 (aka 2012) November 2012 CTP
+// Because the CTP is unsupported, unrelease, and only alpha quality,
+// it is only supported if BOOST_MSVC_ENABLE_2012_NOV_CTP is defined.
+//
+#if _MSC_FULL_VER < 170051025 || !defined(BOOST_MSVC_ENABLE_2012_NOV_CTP)
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+# define BOOST_NO_CXX11_RAW_LITERALS
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#endif
+
+// C++11 features not supported by any versions
#define BOOST_NO_CXX11_CHAR16_T
#define BOOST_NO_CXX11_CHAR32_T
#define BOOST_NO_CXX11_CONSTEXPR
#define BOOST_NO_CXX11_DECLTYPE_N3276
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
#define BOOST_NO_CXX11_DELETED_FUNCTIONS
-#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#define BOOST_NO_CXX11_NOEXCEPT
-#define BOOST_NO_CXX11_RAW_LITERALS
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
#define BOOST_NO_CXX11_UNICODE_LITERALS
-#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+
//
// prefix and suffix headers:
//