diff --git a/README.md b/README.md index 66367f8..72e9087 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Some of the extras are available only with C++20 or later. *stdx* supports: -- clang 14 through 17 +- clang 14 through 18 - gcc 12 through 13 See the [full documentation](https://intel.github.io/cpp-std-extensions/). diff --git a/docs/ct_format.adoc b/docs/ct_format.adoc index 803857f..381bc87 100644 --- a/docs/ct_format.adoc +++ b/docs/ct_format.adoc @@ -58,3 +58,15 @@ template argument to `ct_format`. auto s = stdx::ct_format<"{}", sc::string_constant>(CX_VALUE(42)); // s is sc::string_constant{} ---- + +When formatting a compile-time `stdx::format_result`, the strings and argument +tuples are collapsed to a single `stdx::format_result`: + +[source,cpp] +---- +constexpr static auto a = stdx::ct_format<"The answer is {}">(42); +// a is stdx::format_result{"The answer is {}", stdx::tuple{42}} + +constexpr static auto q = stdx::ct_format<"{}. But what is the question?">(CX_VALUE(a)); +// q is stdx::format_result{"The answer is {}. But what is the question?", stdx::tuple{42}} +---- diff --git a/docs/intro.adoc b/docs/intro.adoc index 3d9e072..63a65e7 100644 --- a/docs/intro.adoc +++ b/docs/intro.adoc @@ -19,7 +19,7 @@ The following compilers are supported: * clang 14 * clang 15 * clang 16 -* clang 17 +* clang 18 * gcc 12 * gcc 13 @@ -40,6 +40,7 @@ The following headers are available: * https://github.com/intel/cpp-std-extensions/blob/main/include/stdx/compiler.hpp[`compiler.hpp`] * https://github.com/intel/cpp-std-extensions/blob/main/include/stdx/concepts.hpp[`concepts.hpp`] * https://github.com/intel/cpp-std-extensions/blob/main/include/stdx/ct_conversions.hpp[`ct_conversions.hpp`] +* https://github.com/intel/cpp-std-extensions/blob/main/include/stdx/ct_format.hpp[`ct_format.hpp`] * https://github.com/intel/cpp-std-extensions/blob/main/include/stdx/ct_string.hpp[`ct_string.hpp`] * https://github.com/intel/cpp-std-extensions/blob/main/include/stdx/cx_map.hpp[`cx_map.hpp`] * https://github.com/intel/cpp-std-extensions/blob/main/include/stdx/cx_multimap.hpp[`cx_multimap.hpp`] diff --git a/docs/tuple.adoc b/docs/tuple.adoc index 001bcf9..884e2a0 100644 --- a/docs/tuple.adoc +++ b/docs/tuple.adoc @@ -4,7 +4,7 @@ https://github.com/intel/cpp-std-extensions/blob/main/include/stdx/tuple.hpp[`tuple.hpp`] provides a tuple implementation that mirrors https://en.cppreference.com/w/cpp/utility/tuple[`std::tuple`]. Mostly, -`stdx::tuple` works the same way as `std::tuple`, with some extra functonality +`stdx::tuple` works the same way as `std::tuple`, with some extra functionality and faster compilation times. All functions on tuples are `constexpr`-capable. NOTE: `tuple` is available only in C++20 and later.