Skip to content

Commit

Permalink
✏️ Fix some doc typos
Browse files Browse the repository at this point in the history
  • Loading branch information
elbeno authored and lukevalenty committed May 22, 2024
1 parent 0b90c7f commit 4b1d296
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
12 changes: 12 additions & 0 deletions docs/ct_format.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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<char, '4', '2'>{}
----

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}}
----
3 changes: 2 additions & 1 deletion docs/intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The following compilers are supported:
* clang 14
* clang 15
* clang 16
* clang 17
* clang 18
* gcc 12
* gcc 13

Expand All @@ -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`]
Expand Down
2 changes: 1 addition & 1 deletion docs/tuple.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4b1d296

Please sign in to comment.