diff --git a/doc/build.py b/doc/build.py index 2506e45a..da9bc774 100755 --- a/doc/build.py +++ b/doc/build.py @@ -89,7 +89,9 @@ def build_docs(version='dev', **kwargs): FMT_USE_VARIADIC_TEMPLATES=1 \ FMT_USE_RVALUE_REFERENCES=1 \ FMT_USE_USER_DEFINED_LITERALS=1 \ - FMT_API= + FMT_API= \ + FMT_BEGIN_NAMESPACE=namespace fmt { \ + FMT_END_NAMESPACE=} EXCLUDE_SYMBOLS = fmt::internal::* StringValue write_str '''.format(include_dir, doxyxml_dir).encode('UTF-8')) if p.returncode != 0: diff --git a/include/fmt/core.h b/include/fmt/core.h index f497e79d..8580cc93 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -133,14 +133,16 @@ # define FMT_DTOR_NOEXCEPT FMT_NOEXCEPT #endif -#if FMT_HAS_FEATURE(cxx_inline_namespaces) || FMT_MSC_VER >= 1900 -# define FMT_INLINE_NAMESPACE inline namespace -# define FMT_END_NAMESPACE }} -#else -# define FMT_INLINE_NAMESPACE namespace -# define FMT_END_NAMESPACE } using namespace v5; } +#ifndef FMT_BEGIN_NAMESPACE +# if FMT_HAS_FEATURE(cxx_inline_namespaces) || FMT_MSC_VER >= 1900 +# define FMT_INLINE_NAMESPACE inline namespace +# define FMT_END_NAMESPACE }} +# else +# define FMT_INLINE_NAMESPACE namespace +# define FMT_END_NAMESPACE } using namespace v5; } +# endif +# define FMT_BEGIN_NAMESPACE namespace fmt { FMT_INLINE_NAMESPACE v5 { #endif -#define FMT_BEGIN_NAMESPACE namespace fmt { FMT_INLINE_NAMESPACE v5 { #if !defined(FMT_HEADER_ONLY) && defined(_WIN32) # ifdef FMT_EXPORT