2
0
mirror of https://github.com/boostorg/convert.git synced 2026-01-19 04:02:18 +00:00

13NOV-08:30 Reverted nested namespaces for C++14 support

This commit is contained in:
Vladimir Batov
2022-11-13 08:30:53 +11:00
parent 39bcd6e60c
commit 4411945c32
32 changed files with 45 additions and 47 deletions

View File

@@ -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()

View File

@@ -120,7 +120,7 @@ namespace boost
}
}
namespace boost::cnv
namespace boost { namespace cnv
{
template<typename Converter, typename TypeOut, typename TypeIn>
struct reference
@@ -204,6 +204,6 @@ namespace boost::cnv
{
return cnv::reference<Converter, TypeOut, void>(cnv);
}
}
}}
#endif // BOOST_CONVERT_HPP

View File

@@ -10,7 +10,7 @@
#include <algorithm>
#include <cstring>
namespace boost::cnv { template<typename> struct cnvbase; }
namespace boost { namespace cnv { template<typename> struct cnvbase; }}
#define BOOST_CNV_TO_STRING \
template<typename string_type> \

View File

@@ -21,7 +21,7 @@
#include <charconv>
#include <type_traits>
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.

View File

@@ -9,7 +9,7 @@
#include <cctype>
#include <cwctype>
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<uchar_type>(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

View File

@@ -10,25 +10,25 @@
#include <boost/optional.hpp>
#include <type_traits>
#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)

View File

@@ -7,7 +7,7 @@
#include <boost/convert/detail/has_member.hpp>
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 <typename R>

View File

@@ -11,7 +11,7 @@
#include <boost/function_types/function_arity.hpp>
#include <boost/function_types/result_type.hpp>
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<func_type, out_type>::value));
};
}
}}
#endif // BOOST_CONVERT_IS_FUNCTION_HPP

View File

@@ -7,7 +7,7 @@
#include <boost/convert/detail/range.hpp>
namespace boost::cnv
namespace boost { namespace cnv
{
namespace detail
{
@@ -31,6 +31,6 @@ namespace boost::cnv
typename std::remove_const<T>::type,
std::is_class<T>::value && cnv::is_range<T>::value>
{};
}
}}
#endif // BOOST_CONVERT_DETAIL_IS_STRING_HPP

View File

@@ -9,7 +9,7 @@
#include <boost/convert/detail/char.hpp>
#include <boost/range/iterator.hpp>
namespace boost::cnv
namespace boost { namespace cnv
{
namespace detail
{
@@ -112,6 +112,6 @@ namespace boost::cnv
{
range (T* b, T* e =0) : range<T*>(b, e) {}
};
}
}}
#endif // BOOST_CONVERT_DETAIL_RANGE_HPP

View File

@@ -7,7 +7,7 @@
#include <boost/lexical_cast.hpp>
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

View File

@@ -9,7 +9,7 @@
#include <boost/parameter/is_argument_pack.hpp>
#include <boost/mpl/has_key.hpp>
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

View File

@@ -12,7 +12,7 @@
#include <string>
#include <cstdio>
namespace boost::cnv { struct printf; }
namespace boost { namespace cnv { struct printf; }}
struct boost::cnv::printf : boost::cnv::cnvbase<boost::cnv::printf>
{

View File

@@ -10,7 +10,7 @@
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/karma.hpp>
namespace boost::cnv { struct spirit; }
namespace boost { namespace cnv { struct spirit; }}
struct boost::cnv::spirit : boost::cnv::cnvbase<boost::cnv::spirit>
{

View File

@@ -30,13 +30,13 @@
typename mpl::has_key< \
argument_pack, cnv::parameter::type::param_name>::type());
namespace boost::cnv
namespace boost { namespace cnv
{
template<class Char> struct basic_stream;
using cstream = boost::cnv::basic_stream<char>;
using wstream = boost::cnv::basic_stream<wchar_t>;
}
}}
template<class Char>
struct boost::cnv::basic_stream

View File

@@ -11,7 +11,7 @@
#include <climits>
#include <cstdlib>
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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -7,7 +7,7 @@
#include <boost/convert/detail/config.hpp>
#if defined(BOOST_CONVERT_IS_NOT_SUPPORTED)
#if !defined(BOOST_CONVERT_CXX14)
#else
#include <boost/make_default.hpp>

View File

@@ -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