diff --git a/example/stream.cpp b/example/stream.cpp index dc0eae0..d7fc944 100644 --- a/example/stream.cpp +++ b/example/stream.cpp @@ -4,7 +4,7 @@ #include "../test/test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else @@ -26,8 +26,6 @@ namespace cnv = boost::cnv; namespace arg = boost::cnv::parameter; //] -#include "../test/test.hpp" - static void example1() diff --git a/include/boost/convert.hpp b/include/boost/convert.hpp index 91bb769..d3364d5 100644 --- a/include/boost/convert.hpp +++ b/include/boost/convert.hpp @@ -120,7 +120,7 @@ namespace boost } } -namespace boost::cnv +namespace boost { namespace cnv { template struct reference @@ -204,6 +204,6 @@ namespace boost::cnv { return cnv::reference(cnv); } -} +}} #endif // BOOST_CONVERT_HPP diff --git a/include/boost/convert/base.hpp b/include/boost/convert/base.hpp index 163a20a..ccb2e28 100644 --- a/include/boost/convert/base.hpp +++ b/include/boost/convert/base.hpp @@ -10,7 +10,7 @@ #include #include -namespace boost::cnv { template struct cnvbase; } +namespace boost { namespace cnv { template struct cnvbase; }} #define BOOST_CNV_TO_STRING \ template \ diff --git a/include/boost/convert/charconv.hpp b/include/boost/convert/charconv.hpp index 4406969..f2b5713 100644 --- a/include/boost/convert/charconv.hpp +++ b/include/boost/convert/charconv.hpp @@ -21,7 +21,7 @@ #include #include -namespace boost::cnv { struct charconv; } +namespace boost { namespace cnv { struct charconv; }} /// @brief std::to/from_chars-based extended converter /// @details The converter offers good overall performance and moderate formatting facilities. diff --git a/include/boost/convert/detail/char.hpp b/include/boost/convert/detail/char.hpp index 70980d9..a3d49e4 100644 --- a/include/boost/convert/detail/char.hpp +++ b/include/boost/convert/detail/char.hpp @@ -9,7 +9,7 @@ #include #include -namespace boost::cnv +namespace boost { namespace cnv { using char_type = char; using uchar_type = unsigned char; @@ -33,7 +33,7 @@ namespace boost::cnv template<> inline char_type to_upper ( char_type c) { return std::toupper(static_cast(c)); } template<> inline uchar_type to_upper (uchar_type c) { return std::toupper(c); } template<> inline wchar_type to_upper (wchar_type c) { return std::towupper(c); } -} +}} #endif // BOOST_CONVERT_DETAIL_IS_CHAR_HPP diff --git a/include/boost/convert/detail/config.hpp b/include/boost/convert/detail/config.hpp index c2bbfe9..2db671c 100644 --- a/include/boost/convert/detail/config.hpp +++ b/include/boost/convert/detail/config.hpp @@ -10,25 +10,25 @@ #include #include -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES) -#undef BOOST_CONVERT_CXX11 +#if defined(BOOST_NO_CXX14) +#undef BOOST_CONVERT_CXX14 #else -#define BOOST_CONVERT_CXX11 +#define BOOST_CONVERT_CXX14 #endif // Intel 12.0 and lower have broken SFINAE #if defined(BOOST_INTEL) && (BOOST_INTEL <= 1200) -# define BOOST_CONVERT_IS_NOT_SUPPORTED +#undef BOOST_CONVERT_CXX14 #endif // No C++11 support #if defined(__GNUC__) && (__GNUC__ < 6) -# define BOOST_CONVERT_IS_NOT_SUPPORTED +#undef BOOST_CONVERT_CXX14 #endif // MSVC-11 and lower have broken SFINAE #if defined(_MSVC_VER) && (_MSVC_VER < 1800) -# define BOOST_CONVERT_IS_NOT_SUPPORTED +#undef BOOST_CONVERT_CXX14 #endif #if defined(_MSC_VER) diff --git a/include/boost/convert/detail/is_callable.hpp b/include/boost/convert/detail/is_callable.hpp index 972fa92..912eedd 100644 --- a/include/boost/convert/detail/is_callable.hpp +++ b/include/boost/convert/detail/is_callable.hpp @@ -7,7 +7,7 @@ #include -namespace boost::cnv::detail +namespace boost { namespace cnv { namespace detail { using yes_type = ::boost::type_traits::yes_type; using no_type = ::boost::type_traits:: no_type; @@ -37,7 +37,7 @@ namespace boost::cnv::detail static yes_type test (...); static no_type test (not_found); }; -} +}}} // No-args case needs to be implemented differently and has not been implemented yet. // template diff --git a/include/boost/convert/detail/is_fun.hpp b/include/boost/convert/detail/is_fun.hpp index c790f0a..5dabff8 100644 --- a/include/boost/convert/detail/is_fun.hpp +++ b/include/boost/convert/detail/is_fun.hpp @@ -11,7 +11,7 @@ #include #include -namespace boost::cnv +namespace boost { namespace cnv { using yes_type = ::boost::type_traits::yes_type; using no_type = ::boost::type_traits:: no_type; @@ -51,7 +51,7 @@ namespace boost::cnv BOOST_STATIC_CONSTANT(bool, value = (is_convertible::value)); }; -} +}} #endif // BOOST_CONVERT_IS_FUNCTION_HPP diff --git a/include/boost/convert/detail/is_string.hpp b/include/boost/convert/detail/is_string.hpp index 95a39ad..161f5a7 100644 --- a/include/boost/convert/detail/is_string.hpp +++ b/include/boost/convert/detail/is_string.hpp @@ -7,7 +7,7 @@ #include -namespace boost::cnv +namespace boost { namespace cnv { namespace detail { @@ -31,6 +31,6 @@ namespace boost::cnv typename std::remove_const::type, std::is_class::value && cnv::is_range::value> {}; -} +}} #endif // BOOST_CONVERT_DETAIL_IS_STRING_HPP diff --git a/include/boost/convert/detail/range.hpp b/include/boost/convert/detail/range.hpp index 22028df..69da887 100644 --- a/include/boost/convert/detail/range.hpp +++ b/include/boost/convert/detail/range.hpp @@ -9,7 +9,7 @@ #include #include -namespace boost::cnv +namespace boost { namespace cnv { namespace detail { @@ -112,6 +112,6 @@ namespace boost::cnv { range (T* b, T* e =0) : range(b, e) {} }; -} +}} #endif // BOOST_CONVERT_DETAIL_RANGE_HPP diff --git a/include/boost/convert/lexical_cast.hpp b/include/boost/convert/lexical_cast.hpp index b5076f0..400e16f 100644 --- a/include/boost/convert/lexical_cast.hpp +++ b/include/boost/convert/lexical_cast.hpp @@ -7,7 +7,7 @@ #include -namespace boost::cnv { struct lexical_cast; } +namespace boost { namespace cnv { struct lexical_cast; }} /// @brief boost::lexical_cast-based converter /// @details The purpose of the converter is to diff --git a/include/boost/convert/parameters.hpp b/include/boost/convert/parameters.hpp index 57270f6..33a44b2 100644 --- a/include/boost/convert/parameters.hpp +++ b/include/boost/convert/parameters.hpp @@ -9,7 +9,7 @@ #include #include -namespace boost::cnv +namespace boost { namespace cnv { enum class adjust : uint8_t { left, right, center }; enum class base : uint8_t { bin =2, oct =8, dec =10, hex =16 }; @@ -28,6 +28,6 @@ namespace boost::cnv BOOST_PARAMETER_NAME((lowercase, type) lowercase) BOOST_PARAMETER_NAME(( width, type) width) } -} +}} #endif // BOOST_CONVERT_PARAMETERS_HPP diff --git a/include/boost/convert/printf.hpp b/include/boost/convert/printf.hpp index c6d89cc..96afa76 100644 --- a/include/boost/convert/printf.hpp +++ b/include/boost/convert/printf.hpp @@ -12,7 +12,7 @@ #include #include -namespace boost::cnv { struct printf; } +namespace boost { namespace cnv { struct printf; }} struct boost::cnv::printf : boost::cnv::cnvbase { diff --git a/include/boost/convert/spirit.hpp b/include/boost/convert/spirit.hpp index e698c1b..b5fdb2d 100644 --- a/include/boost/convert/spirit.hpp +++ b/include/boost/convert/spirit.hpp @@ -10,7 +10,7 @@ #include #include -namespace boost::cnv { struct spirit; } +namespace boost { namespace cnv { struct spirit; }} struct boost::cnv::spirit : boost::cnv::cnvbase { diff --git a/include/boost/convert/stream.hpp b/include/boost/convert/stream.hpp index 9040c2f..d01e713 100644 --- a/include/boost/convert/stream.hpp +++ b/include/boost/convert/stream.hpp @@ -30,13 +30,13 @@ typename mpl::has_key< \ argument_pack, cnv::parameter::type::param_name>::type()); -namespace boost::cnv +namespace boost { namespace cnv { template struct basic_stream; using cstream = boost::cnv::basic_stream; using wstream = boost::cnv::basic_stream; -} +}} template struct boost::cnv::basic_stream diff --git a/include/boost/convert/strtol.hpp b/include/boost/convert/strtol.hpp index 9f2188b..943eeb6 100644 --- a/include/boost/convert/strtol.hpp +++ b/include/boost/convert/strtol.hpp @@ -11,7 +11,7 @@ #include #include -namespace boost::cnv { struct strtol; } +namespace boost { namespace cnv { struct strtol; }} /// @brief std::strtol-based extended converter /// @details The converter offers a fairly decent overall performance and moderate formatting facilities. diff --git a/test/callable.cpp b/test/callable.cpp index 0b85e53..9ace54c 100644 --- a/test/callable.cpp +++ b/test/callable.cpp @@ -5,7 +5,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else diff --git a/test/charconv_converter.cpp b/test/charconv_converter.cpp index 20329cd..bfa2a62 100644 --- a/test/charconv_converter.cpp +++ b/test/charconv_converter.cpp @@ -5,7 +5,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) || defined(BOOST_NO_CXX17_HDR_CHARCONV) +#if !defined(BOOST_CONVERT_CXX14) || defined(BOOST_NO_CXX17_HDR_CHARCONV) int main(int, char const* []) { return 0; } #else diff --git a/test/encryption.cpp b/test/encryption.cpp index 19f383e..33db389 100644 --- a/test/encryption.cpp +++ b/test/encryption.cpp @@ -4,7 +4,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else diff --git a/test/fallbacks.cpp b/test/fallbacks.cpp index cca07d2..8a0bddf 100644 --- a/test/fallbacks.cpp +++ b/test/fallbacks.cpp @@ -5,7 +5,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else diff --git a/test/has_member.cpp b/test/has_member.cpp index d27bcc6..3492cb3 100644 --- a/test/has_member.cpp +++ b/test/has_member.cpp @@ -5,7 +5,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else diff --git a/test/lcast_converter.cpp b/test/lcast_converter.cpp index a99ea0c..c70d415 100644 --- a/test/lcast_converter.cpp +++ b/test/lcast_converter.cpp @@ -5,7 +5,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else diff --git a/test/performance.cpp b/test/performance.cpp index fa30832..d4f5db1 100644 --- a/test/performance.cpp +++ b/test/performance.cpp @@ -5,7 +5,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) || defined(BOOST_NO_CXX17_HDR_CHARCONV) int main(int, char const* []) { return 0; } #else diff --git a/test/performance_spirit.cpp b/test/performance_spirit.cpp index 3e9b586..2ea7209 100644 --- a/test/performance_spirit.cpp +++ b/test/performance_spirit.cpp @@ -9,7 +9,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else diff --git a/test/printf_converter.cpp b/test/printf_converter.cpp index 4d4b126..542a6ca 100644 --- a/test/printf_converter.cpp +++ b/test/printf_converter.cpp @@ -5,7 +5,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else diff --git a/test/sfinae.cpp b/test/sfinae.cpp index c037ef0..c6551ba 100644 --- a/test/sfinae.cpp +++ b/test/sfinae.cpp @@ -5,7 +5,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else diff --git a/test/spirit_converter.cpp b/test/spirit_converter.cpp index 5bfd48e..6c8b4dc 100644 --- a/test/spirit_converter.cpp +++ b/test/spirit_converter.cpp @@ -5,7 +5,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else diff --git a/test/str_to_int.cpp b/test/str_to_int.cpp index 447f1f5..8747d72 100644 --- a/test/str_to_int.cpp +++ b/test/str_to_int.cpp @@ -5,7 +5,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else diff --git a/test/stream_converter.cpp b/test/stream_converter.cpp index a548866..421090a 100644 --- a/test/stream_converter.cpp +++ b/test/stream_converter.cpp @@ -5,7 +5,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else diff --git a/test/strtol_converter.cpp b/test/strtol_converter.cpp index 054af68..b199f3b 100644 --- a/test/strtol_converter.cpp +++ b/test/strtol_converter.cpp @@ -5,7 +5,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else diff --git a/test/test.hpp b/test/test.hpp index 0d098ae..7e00f1a 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -7,7 +7,7 @@ #include -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) #else #include diff --git a/test/user_type.cpp b/test/user_type.cpp index f9c357b..f620b71 100644 --- a/test/user_type.cpp +++ b/test/user_type.cpp @@ -5,7 +5,7 @@ #include "./test.hpp" -#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED) +#if !defined(BOOST_CONVERT_CXX14) int main(int, char const* []) { return 0; } #else