wchar.h -> xchar.h because it handles other code unit types too

This commit is contained in:
Victor Zverovich 2021-05-29 09:37:17 -07:00
parent 0901176fe4
commit ff37e41625
7 changed files with 14 additions and 17 deletions

View File

@ -227,7 +227,7 @@ endfunction()
# 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
format-inl.h locale.h os.h ostream.h printf.h ranges.h
wchar.h)
xchar.h)
if (FMT_MODULE)
set(FMT_SOURCES src/fmt.cc)
elseif (FMT_OS)

View File

@ -2889,8 +2889,8 @@ inline auto formatted_size(const S& fmt, Args&&... args) -> size_t {
FMT_MODULE_EXPORT_END
FMT_END_NAMESPACE
#ifdef FMT_DEPRECATED_INCLUDE_WCHAR
# include "wchar.h"
#ifdef FMT_DEPRECATED_INCLUDE_XCHAR
# include "xchar.h"
#endif
#ifdef FMT_HEADER_ONLY

View File

@ -1,2 +1,2 @@
#include "wchar.h"
#warning fmt/locale.h is deprecated, include fmt/format.h or fmt/wchar.h instead
#include "xchar.h"
#warning fmt/locale.h is deprecated, include fmt/format.h or fmt/xchar.h instead

View File

@ -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
// All rights reserved.

View File

@ -8,8 +8,10 @@ module;
# define WIN32_LEAN_AND_MEAN
#endif
#include <algorithm>
#include <cctype>
#include <cerrno>
#include <chrono>
#include <climits>
#include <clocale>
#include <cmath>
@ -21,9 +23,6 @@ module;
#include <cstring>
#include <ctime>
#include <cwchar>
#include <algorithm>
#include <chrono>
#include <exception>
#include <functional>
#include <iterator>
@ -76,17 +75,16 @@ export module fmt;
#define FMT_END_DETAIL_NAMESPACE \
} \
export {
// all library-provided declarations and definitions
// must be in the module purview to be exported
#include "fmt/format.h"
#include "fmt/args.h"
#include "fmt/chrono.h"
#include "fmt/color.h"
#include "fmt/compile.h"
#include "fmt/chrono.h"
#include "fmt/printf.h"
#include "fmt/wchar.h"
#include "fmt/format.h"
#include "fmt/os.h"
#include "fmt/printf.h"
#include "fmt/xchar.h"
module : private;

View File

@ -13,7 +13,7 @@
#include "fmt/format.h"
#include "fmt/ostream.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.
void test_format_api() {

View File

@ -5,10 +5,9 @@
//
// For the license information refer to format.h.
#include "fmt/wchar.h"
#include <complex>
#include "fmt/xchar.h"
#include "gtest/gtest.h"
using fmt::detail::max_value;