diff options
Diffstat (limited to 'src/lib/util/strformat.cpp')
-rw-r--r-- | src/lib/util/strformat.cpp | 173 |
1 files changed, 109 insertions, 64 deletions
diff --git a/src/lib/util/strformat.cpp b/src/lib/util/strformat.cpp index c47bb1b8996..f62ba55dc2d 100644 --- a/src/lib/util/strformat.cpp +++ b/src/lib/util/strformat.cpp @@ -9,7 +9,6 @@ ***************************************************************************/ #include "strformat.h" -#include "vecstream.h" #include <iostream> #include <sstream> @@ -24,69 +23,115 @@ template class format_chars<wchar_t>; template void format_flags::apply(std::ostream &) const; template void format_flags::apply(std::wostream &) const; -template void format_flags::apply(std::iostream &) const; -template void format_flags::apply(std::wiostream &) const; -template void format_flags::apply(std::ostringstream &) const; -template void format_flags::apply(std::wostringstream &) const; -template void format_flags::apply(std::stringstream &) const; -template void format_flags::apply(std::wstringstream &) const; -template void format_flags::apply(ovectorstream &) const; -template void format_flags::apply(wovectorstream &) const; -template void format_flags::apply(vectorstream &) const; -template void format_flags::apply(wvectorstream &) const; - -template class format_argument<std::ostream>; -template class format_argument<std::wostream>; -template class format_argument<std::iostream>; -template class format_argument<std::wiostream>; -template class format_argument<std::ostringstream>; -template class format_argument<std::wostringstream>; -template class format_argument<std::stringstream>; -template class format_argument<std::wstringstream>; -template class format_argument<ovectorstream>; -template class format_argument<wovectorstream>; -template class format_argument<vectorstream>; -template class format_argument<wvectorstream>; - -template class format_argument_pack<std::ostream>; -template class format_argument_pack<std::wostream>; -template class format_argument_pack<std::iostream>; -template class format_argument_pack<std::wiostream>; -template class format_argument_pack<std::ostringstream>; -template class format_argument_pack<std::wostringstream>; -template class format_argument_pack<std::stringstream>; -template class format_argument_pack<std::wstringstream>; -template class format_argument_pack<ovectorstream>; -template class format_argument_pack<wovectorstream>; -template class format_argument_pack<vectorstream>; -template class format_argument_pack<wvectorstream>; - -template std::ostream::off_type stream_format(std::ostream &, format_argument_pack<std::ostream> const &); -template std::wostream::off_type stream_format(std::wostream &, format_argument_pack<std::wostream> const &); -template std::iostream::off_type stream_format(std::iostream &, format_argument_pack<std::ostream> const &); -template std::iostream::off_type stream_format(std::iostream &, format_argument_pack<std::iostream> const &); -template std::wiostream::off_type stream_format(std::wiostream &, format_argument_pack<std::wostream> const &); -template std::wiostream::off_type stream_format(std::wiostream &, format_argument_pack<std::wiostream> const &); -template std::ostringstream::off_type stream_format(std::ostringstream &, format_argument_pack<std::ostream> const &); -template std::ostringstream::off_type stream_format(std::ostringstream &, format_argument_pack<std::ostringstream> const &); -template std::wostringstream::off_type stream_format(std::wostringstream &, format_argument_pack<std::wostream> const &); -template std::wostringstream::off_type stream_format(std::wostringstream &, format_argument_pack<std::wostringstream> const &); -template std::stringstream::off_type stream_format(std::stringstream &, format_argument_pack<std::ostream> const &); -template std::stringstream::off_type stream_format(std::stringstream &, format_argument_pack<std::iostream> const &); -template std::stringstream::off_type stream_format(std::stringstream &, format_argument_pack<std::stringstream> const &); -template std::wstringstream::off_type stream_format(std::wstringstream &, format_argument_pack<std::wostream> const &); -template std::wstringstream::off_type stream_format(std::wstringstream &, format_argument_pack<std::wiostream> const &); -template std::wstringstream::off_type stream_format(std::wstringstream &, format_argument_pack<std::wstringstream> const &); -template ovectorstream::off_type stream_format(ovectorstream &, format_argument_pack<std::ostream> const &); -template ovectorstream::off_type stream_format(ovectorstream &, format_argument_pack<ovectorstream> const &); -template wovectorstream::off_type stream_format(wovectorstream &, format_argument_pack<std::wostream> const &); -template wovectorstream::off_type stream_format(wovectorstream &, format_argument_pack<wovectorstream> const &); -template vectorstream::off_type stream_format(vectorstream &, format_argument_pack<std::ostream> const &); -template vectorstream::off_type stream_format(vectorstream &, format_argument_pack<std::iostream> const &); -template vectorstream::off_type stream_format(vectorstream &, format_argument_pack<vectorstream> const &); -template wvectorstream::off_type stream_format(wvectorstream &, format_argument_pack<std::wostream> const &); -template wvectorstream::off_type stream_format(wvectorstream &, format_argument_pack<std::wiostream> const &); -template wvectorstream::off_type stream_format(wvectorstream &, format_argument_pack<wvectorstream> const &); + +template class format_argument<char>; +template void format_argument<char>::static_output<bool>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<char>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<signed char>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<unsigned char>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<short>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<unsigned short>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<int>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<unsigned int>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<long>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<unsigned long>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<long long>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<unsigned long long>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<char *>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<char const *>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<std::string>(std::ostream &, format_flags const &, void const *); +template void format_argument<char>::static_output<std::string_view>(std::ostream &, format_flags const &, void const *); +template bool format_argument<char>::static_make_integer<bool>(void const *, int &); +template bool format_argument<char>::static_make_integer<char>(void const *, int &); +template bool format_argument<char>::static_make_integer<signed char>(void const *, int &); +template bool format_argument<char>::static_make_integer<unsigned char>(void const *, int &); +template bool format_argument<char>::static_make_integer<short>(void const *, int &); +template bool format_argument<char>::static_make_integer<unsigned short>(void const *, int &); +template bool format_argument<char>::static_make_integer<int>(void const *, int &); +template bool format_argument<char>::static_make_integer<unsigned int>(void const *, int &); +template bool format_argument<char>::static_make_integer<long>(void const *, int &); +template bool format_argument<char>::static_make_integer<unsigned long>(void const *, int &); +template bool format_argument<char>::static_make_integer<long long>(void const *, int &); +template bool format_argument<char>::static_make_integer<unsigned long long>(void const *, int &); +template bool format_argument<char>::static_make_integer<char *>(void const *, int &); +template bool format_argument<char>::static_make_integer<char const *>(void const *, int &); +template bool format_argument<char>::static_make_integer<std::string>(void const *, int &); +template bool format_argument<char>::static_make_integer<std::string_view>(void const *, int &); +template void format_argument<char>::static_store_integer<bool>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<char>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<signed char>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<unsigned char>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<short>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<unsigned short>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<int>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<unsigned int>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<long>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<unsigned long>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<long long>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<unsigned long long>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<char *>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<char const *>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<std::string>(void const *, std::streamoff); +template void format_argument<char>::static_store_integer<std::string_view>(void const *, std::streamoff); + +template class format_argument<wchar_t>; +template void format_argument<wchar_t>::static_output<bool>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<char>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<signed char>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<unsigned char>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<wchar_t>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<short>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<unsigned short>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<int>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<unsigned int>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<long>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<unsigned long>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<long long>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<unsigned long long>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<wchar_t *>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<wchar_t const *>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<std::wstring>(std::wostream &, format_flags const &, void const *); +template void format_argument<wchar_t>::static_output<std::wstring_view>(std::wostream &, format_flags const &, void const *); +template bool format_argument<wchar_t>::static_make_integer<bool>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<char>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<signed char>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<unsigned char>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<wchar_t>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<short>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<unsigned short>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<int>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<unsigned int>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<long>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<unsigned long>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<long long>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<unsigned long long>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<wchar_t *>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<wchar_t const *>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<std::wstring>(void const *, int &); +template bool format_argument<wchar_t>::static_make_integer<std::wstring_view>(void const *, int &); +template void format_argument<wchar_t>::static_store_integer<bool>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<char>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<signed char>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<unsigned char>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<wchar_t>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<short>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<unsigned short>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<int>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<unsigned int>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<long>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<unsigned long>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<long long>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<unsigned long long>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<wchar_t *>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<wchar_t const *>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<std::wstring>(void const *, std::streamoff); +template void format_argument<wchar_t>::static_store_integer<std::wstring_view>(void const *, std::streamoff); + +template class format_argument_pack<char>; +template class format_argument_pack<wchar_t>; + +template std::ostream::off_type stream_format(std::ostream &, format_argument_pack<char> const &); +template std::wostream::off_type stream_format(std::wostream &, format_argument_pack<wchar_t> const &); } // namespace detail |