139 : fStringData_{src.fStringData_}
143#if qCompilerAndStdLib_vector_constexpr_Buggy
148 FormatString<char>::FormatString (
const basic_string_view<char>& s)
149 : fStringData_{s.begin (), s.end ()}
150 , fFmtStr_{basic_string_view<wchar_t>{fStringData_.data (), fStringData_.size ()}, FormatString<wchar_t>::Unchecked_{}}
152 Character::CheckASCII (span{s});
154#if qCompilerAndStdLib_vector_constexpr_Buggy
159 FormatString<char>& FormatString<char>::operator= (
const FormatString& rhs)
162 fStringData_ = rhs.fStringData_;
163 fFmtStr_ = FormatString<wchar_t>{basic_string_view<wchar_t>{fStringData_.data (), fStringData_.size ()}, FormatString<wchar_t>::Unchecked_{}};
166 constexpr wstring_view FormatString<char>::get ()
const
168 return fFmtStr_.get ();
170 constexpr qStroika_Foundation_Characters_FMT_PREFIX_::wstring_view FormatString<char>::getx_ ()
const
172 return fFmtStr_.getx_ ();
174 template <Stroika_Foundation_Common_formattable_FilterOnStringLitOp_BWA (IFormattable)... ARGS>
175 [[nodiscard]]
inline String FormatString<char>::operator() (ARGS&&... args)
const
177 return fFmtStr_ (forward<ARGS> (args)...);
179 template <Stroika_Foundation_Common_formattable_FilterOnStringLitOp_BWA (IFormattable)... ARGS>
180 [[nodiscard]]
inline String FormatString<char>::operator() (
const locale& loc, ARGS&&... args)
const
182 return fFmtStr_ (loc, forward<ARGS> (args)...);
190 template <Private_::FixedString_ LITERAL>
191 constexpr FormatLiteral<LITERAL>::FormatLiteral ()
192 : FormatString<wchar_t>{wstring_view{kWide_.data (),
decltype (LITERAL)::kChars}, Unchecked_{}}
195 template <Private_::FixedString_ LITERAL>
196 template <Stroika_Foundation_Common_formattable_FilterOnStringLitOp_BWA (IFormattable)... ARGS>
199 CheckArgs<ARGS...> ();
202 template <Private_::FixedString_ LITERAL>
203 template <Stroika_Foundation_Common_formattable_FilterOnStringLitOp_BWA (
IFormattable)... ARGS>
206 CheckArgs<ARGS...> ();
209 template <Private_::FixedString_ LITERAL>
210 template <
typename... ARGS>
214 using Checked = Common::StdCompat::wformat_string<Private_::FormatArg_t<ARGS>...>;
215#if qCompilerAndStdLib_format_dynamic_spec_Buggy
217 bool inField =
false;
218 for (
size_t i = 0; i <
decltype (LITERAL)::kChars; ++i) {
219 if (kWide_[i] ==
'{') {
223 if (kWide_[i + 1] ==
'{') {
230 else if (kWide_[i] ==
'}') {
235#if qCompilerAndStdLib_format_check_StaticArray_Buggy
236 const auto wide = Private_::Widen_<LITERAL> ();
237 [[maybe_unused]] Checked checked{wstring_view{wide.data (),
decltype (LITERAL)::kChars}};
239 [[maybe_unused]] Checked checked{wstring_view{kWide_.data (),
decltype (LITERAL)::kChars}};
242 template <Private_::FixedString_ LITERAL>
244 requires (same_as<typename decltype (LITERAL)::CharType,
char>)
254 inline namespace Literals {
255 template <Private_::FixedString_ LITERAL>
261#if qCompilerAndStdLib_vector_constexpr_warning_Buggy
262 DISABLE_COMPILER_GCC_WARNING_END (
"GCC diagnostic ignored \"-Winvalid-constexpr\"");
270 template <
typename CHAR_T>
273 return Common::StdCompat::vformat (f.
getx_ (), args);
275 template <
typename CHAR_T>
278 return Common::StdCompat::vformat (loc, f.
getx_ (), args);
286 template <
typename CHAR_T, IFormattable... ARGS>
289 return f (forward<ARGS> (args)...);
291 template <
typename CHAR_T, IFormattable... ARGS>
294 return f (loc, forward<ARGS> (args)...);
296 template <Private_::FixedString_ LITERAL, Stroika_Foundation_Common_formattable_FilterOnStringLitOp_BWA (IFormattable)... ARGS>
299 return f (forward<ARGS> (args)...);
301 template <Private_::FixedString_ LITERAL, Stroika_Foundation_Common_formattable_FilterOnStringLitOp_BWA (IFormattable)... ARGS>
304 return f (loc, forward<ARGS> (args)...);