X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Ffmt%2Finclude%2Ffmt%2Flocale.h;h=7571b5261ba78c62d0e45c7ba71567ae512ea6bb;hb=20effc670b57271cb089376d6d0800990e5218d5;hp=34b5c89082adf49f5f77f1e68399d60a176615b1;hpb=a71831dadd1e1f3e0fa70405511f65cc33db0498;p=ceph.git diff --git a/ceph/src/fmt/include/fmt/locale.h b/ceph/src/fmt/include/fmt/locale.h index 34b5c8908..7571b5261 100644 --- a/ceph/src/fmt/include/fmt/locale.h +++ b/ceph/src/fmt/include/fmt/locale.h @@ -1,78 +1,2 @@ -// Formatting library for C++ - std::locale support -// -// Copyright (c) 2012 - present, Victor Zverovich -// All rights reserved. -// -// For the license information refer to format.h. - -#ifndef FMT_LOCALE_H_ -#define FMT_LOCALE_H_ - -#include - -#include "format.h" - -FMT_BEGIN_NAMESPACE - -namespace detail { -template -typename buffer_context::iterator vformat_to( - const std::locale& loc, buffer& buf, - basic_string_view format_str, - basic_format_args>> args) { - using range = buffer_range; - return vformat_to>(buf, to_string_view(format_str), args, - detail::locale_ref(loc)); -} - -template -std::basic_string vformat( - const std::locale& loc, basic_string_view format_str, - basic_format_args>> args) { - basic_memory_buffer buffer; - detail::vformat_to(loc, buffer, format_str, args); - return fmt::to_string(buffer); -} -} // namespace detail - -template > -inline std::basic_string vformat( - const std::locale& loc, const S& format_str, - basic_format_args>> args) { - return detail::vformat(loc, to_string_view(format_str), args); -} - -template > -inline std::basic_string format(const std::locale& loc, - const S& format_str, Args&&... args) { - return detail::vformat( - loc, to_string_view(format_str), - detail::make_args_checked(format_str, args...)); -} - -template ::value, char_t>> -inline OutputIt vformat_to( - OutputIt out, const std::locale& loc, const S& format_str, - format_args_t, Char> args) { - using range = detail::output_range; - return vformat_to>( - range(out), to_string_view(format_str), args, detail::locale_ref(loc)); -} - -template ::value&& - detail::is_string::value)> -inline OutputIt format_to(OutputIt out, const std::locale& loc, - const S& format_str, Args&&... args) { - detail::check_format_string(format_str); - using context = format_context_t>; - format_arg_store as{args...}; - return vformat_to(out, loc, to_string_view(format_str), - basic_format_args(as)); -} - -FMT_END_NAMESPACE - -#endif // FMT_LOCALE_H_ +#include "xchar.h" +#warning fmt/locale.h is deprecated, include fmt/format.h or fmt/xchar.h instead