Add support for multiple namespaces

This commit is contained in:
Victor Zverovich
2024-06-02 07:01:40 -07:00
parent a10e032148
commit 03d14c3beb
4 changed files with 95 additions and 80 deletions

View File

@@ -149,7 +149,6 @@ import std;
# define FMT_USE_NONTYPE_TEMPLATE_ARGS 0
#endif
// Detect C++20 concepts
#ifdef FMT_USE_CONCEPTS
// Use the provided definition.
#elif defined(__cpp_concepts)
@@ -834,7 +833,7 @@ class compile_parse_context : public basic_format_parse_context<Char> {
};
/// A contiguous memory buffer with an optional growing ability. It is an
// internal class and shouldn't be used directly, only via `memory_buffer`.
/// internal class and shouldn't be used directly, only via `memory_buffer`.
template <typename T> class buffer {
private:
T* ptr_;

View File

@@ -3869,21 +3869,19 @@ FMT_API auto vsystem_error(int error_code, string_view format_str,
format_args args) -> std::system_error;
/**
\rst
Constructs :class:`std::system_error` with a message formatted with
``fmt::format(fmt, args...)``.
*error_code* is a system error code as given by ``errno``.
**Example**::
// This throws std::system_error with the description
// cannot open file 'madeup': No such file or directory
// or similar (system message may vary).
const char* filename = "madeup";
std::FILE* file = std::fopen(filename, "r");
if (!file)
throw fmt::system_error(errno, "cannot open file '{}'", filename);
\endrst
* Constructs `std::system_error` with a message formatted with
* `fmt::format(fmt, args...)`.
* *error_code* is a system error code as given by `errno`.
*
* **Example**::
*
* // This throws std::system_error with the description
* // cannot open file 'madeup': No such file or directory
* // or similar (system message may vary).
* const char* filename = "madeup";
* std::FILE* file = std::fopen(filename, "r");
* if (!file)
* throw fmt::system_error(errno, "cannot open file '{}'", filename);
*/
template <typename... T>
auto system_error(int error_code, format_string<T...> fmt, T&&... args)