wchar.h -> xchar.h because it handles other code unit types too
This commit is contained in:
parent
0901176fe4
commit
ff37e41625
@ -227,7 +227,7 @@ endfunction()
|
|||||||
# Define the fmt library, its includes and the needed defines.
|
# Define the fmt library, its includes and the needed defines.
|
||||||
add_headers(FMT_HEADERS args.h chrono.h color.h compile.h core.h format.h
|
add_headers(FMT_HEADERS args.h chrono.h color.h compile.h core.h format.h
|
||||||
format-inl.h locale.h os.h ostream.h printf.h ranges.h
|
format-inl.h locale.h os.h ostream.h printf.h ranges.h
|
||||||
wchar.h)
|
xchar.h)
|
||||||
if (FMT_MODULE)
|
if (FMT_MODULE)
|
||||||
set(FMT_SOURCES src/fmt.cc)
|
set(FMT_SOURCES src/fmt.cc)
|
||||||
elseif (FMT_OS)
|
elseif (FMT_OS)
|
||||||
|
@ -2889,8 +2889,8 @@ inline auto formatted_size(const S& fmt, Args&&... args) -> size_t {
|
|||||||
FMT_MODULE_EXPORT_END
|
FMT_MODULE_EXPORT_END
|
||||||
FMT_END_NAMESPACE
|
FMT_END_NAMESPACE
|
||||||
|
|
||||||
#ifdef FMT_DEPRECATED_INCLUDE_WCHAR
|
#ifdef FMT_DEPRECATED_INCLUDE_XCHAR
|
||||||
# include "wchar.h"
|
# include "xchar.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FMT_HEADER_ONLY
|
#ifdef FMT_HEADER_ONLY
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#include "wchar.h"
|
#include "xchar.h"
|
||||||
#warning fmt/locale.h is deprecated, include fmt/format.h or fmt/wchar.h instead
|
#warning fmt/locale.h is deprecated, include fmt/format.h or fmt/xchar.h instead
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Formatting library for C++ - optional wchar_t support
|
// Formatting library for C++ - optional wchar_t and exotic character support
|
||||||
//
|
//
|
||||||
// Copyright (c) 2012 - present, Victor Zverovich
|
// Copyright (c) 2012 - present, Victor Zverovich
|
||||||
// All rights reserved.
|
// All rights reserved.
|
14
src/fmt.cc
14
src/fmt.cc
@ -8,8 +8,10 @@ module;
|
|||||||
# define WIN32_LEAN_AND_MEAN
|
# define WIN32_LEAN_AND_MEAN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
#include <chrono>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
#include <clocale>
|
#include <clocale>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@ -21,9 +23,6 @@ module;
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <cwchar>
|
#include <cwchar>
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <chrono>
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
@ -76,17 +75,16 @@ export module fmt;
|
|||||||
#define FMT_END_DETAIL_NAMESPACE \
|
#define FMT_END_DETAIL_NAMESPACE \
|
||||||
} \
|
} \
|
||||||
export {
|
export {
|
||||||
|
|
||||||
// all library-provided declarations and definitions
|
// all library-provided declarations and definitions
|
||||||
// must be in the module purview to be exported
|
// must be in the module purview to be exported
|
||||||
#include "fmt/format.h"
|
|
||||||
#include "fmt/args.h"
|
#include "fmt/args.h"
|
||||||
|
#include "fmt/chrono.h"
|
||||||
#include "fmt/color.h"
|
#include "fmt/color.h"
|
||||||
#include "fmt/compile.h"
|
#include "fmt/compile.h"
|
||||||
#include "fmt/chrono.h"
|
#include "fmt/format.h"
|
||||||
#include "fmt/printf.h"
|
|
||||||
#include "fmt/wchar.h"
|
|
||||||
#include "fmt/os.h"
|
#include "fmt/os.h"
|
||||||
|
#include "fmt/printf.h"
|
||||||
|
#include "fmt/xchar.h"
|
||||||
|
|
||||||
module : private;
|
module : private;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "fmt/format.h"
|
#include "fmt/format.h"
|
||||||
#include "fmt/ostream.h"
|
#include "fmt/ostream.h"
|
||||||
#include "fmt/ranges.h"
|
#include "fmt/ranges.h"
|
||||||
#include "fmt/wchar.h"
|
#include "fmt/xchar.h"
|
||||||
|
|
||||||
// Exercise the API to verify that everything we expect to can compile.
|
// Exercise the API to verify that everything we expect to can compile.
|
||||||
void test_format_api() {
|
void test_format_api() {
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
//
|
//
|
||||||
// For the license information refer to format.h.
|
// For the license information refer to format.h.
|
||||||
|
|
||||||
#include "fmt/wchar.h"
|
|
||||||
|
|
||||||
#include <complex>
|
#include <complex>
|
||||||
|
|
||||||
|
#include "fmt/xchar.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
using fmt::detail::max_value;
|
using fmt::detail::max_value;
|
||||||
|
Loading…
Reference in New Issue
Block a user