diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index da0eca5..3ca05fe 100644 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -2,6 +2,6 @@ set -euo pipefail -version=0.9.1 +version=0.10.0 npm install -g "cowel@${version}" diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 5f72965..007160a 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -23,13 +23,13 @@ Most paper sources are written in **COWEL**. It is a specialized language designed for C++ proposal documentation. - **File extensions**: `.cow` or `.cowel` -- **Default version**: COWEL 0.9.1 +- **Default version**: COWEL 0.10.0 - **Version specification**: All files include a version comment at the top - (e.g., `\: cowel 0.9.1`) + (e.g., `\: cowel 0.10.0`) - **Build command**: `cowel run input.cow output.html` - **Installation**: - Latest: `npm i -g cowel` - - Specific version: `npm i -g cowel@0.9.1` + - Specific version: `npm i -g cowel@0.10.0` **Resources**: diff --git a/.github/workflows/verify-docs.yml b/.github/workflows/verify-docs.yml index 3da56b1..01000f8 100644 --- a/.github/workflows/verify-docs.yml +++ b/.github/workflows/verify-docs.yml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v4 - name: Install cowel - run: npm install -g cowel@0.9.1 + run: npm install -g cowel@0.10.0 - name: Verify docs match sources run: bash scripts/verify-docs.sh diff --git a/README.md b/README.md index 36d3608..746c4d4 100644 --- a/README.md +++ b/README.md @@ -10,5 +10,5 @@ or if you have suggestions for improvement. This repository includes a GitHub Codespaces/devcontainer setup that installs Node.js, -`cowel@0.9.1`, +`cowel@0.10.0`, and the COWEL VS Code extension automatically. diff --git a/docs/big-int.html b/docs/big-int.html index 871cbba..1d71c6b 100644 --- a/docs/big-int.html +++ b/docs/big-int.html @@ -1569,8 +1569,6 @@ } - -

std::big_int

@@ -1654,40 +1652,40 @@

X.2 Header <big_int> synopsis // [big.int.expos], exposition-only helpers template<class T> - concept signed-or-unsigned = see below; // exposition only + concept signed-or-unsigned = see below; // exposition only template<class T> - concept arbitrary-integer = see below; // exposition only + concept arbitrary-integer = see below; // exposition only template<class T> - concept arbitrary-arithmetic-type = see below; // exposition only + concept arbitrary-arithmetic-type = see below; // exposition only template<class L, class R> - using common-big-int-type = see below; // exposition only + using common-big-int-type = see below; // exposition only template<class T, class U> - concept common-big-int-type-with = requires { // exposition only - typename common-big-int-type<T, U>; + concept common-big-int-type-with = requires { // exposition only + typename common-big-int-type<T, U>; }; // [big.int.alias], alias big_int using big_int = basic_big_int<see below>; // [big.int.cmp], non-member comparison operator functions - template<class L, common-big-int-type-with<L> R> + template<class L, common-big-int-type-with<L> R> constexpr bool operator==(const L& lhs, const R& rhs) noexcept; - template<class L, common-big-int-type-with<L> R> + template<class L, common-big-int-type-with<L> R> constexpr strong_ordering operator<=>(const L& lhs, const R& rhs) noexcept; // [big.int.binary], binary operations - template<class L, class R> constexpr common-big-int-type<L, R> operator+(L&& x, R&& y); - template<class L, class R> constexpr common-big-int-type<L, R> operator-(L&& x, R&& y); - template<class L, class R> constexpr common-big-int-type<L, R> operator*(L&& x, R&& y); - template<class L, class R> constexpr common-big-int-type<L, R> operator/(L&& x, R&& y); - template<class L, class R> constexpr common-big-int-type<L, R> operator%(L&& x, R&& y); + template<class L, class R> constexpr common-big-int-type<L, R> operator+(L&& x, R&& y); + template<class L, class R> constexpr common-big-int-type<L, R> operator-(L&& x, R&& y); + template<class L, class R> constexpr common-big-int-type<L, R> operator*(L&& x, R&& y); + template<class L, class R> constexpr common-big-int-type<L, R> operator/(L&& x, R&& y); + template<class L, class R> constexpr common-big-int-type<L, R> operator%(L&& x, R&& y); - template<class L, class R> constexpr common-big-int-type<L, R> operator&(L&& x, R&& y); - template<class L, class R> constexpr common-big-int-type<L, R> operator|(L&& x, R&& y); - template<class L, class R> constexpr common-big-int-type<L, R> operator^(L&& x, R&& y); + template<class L, class R> constexpr common-big-int-type<L, R> operator&(L&& x, R&& y); + template<class L, class R> constexpr common-big-int-type<L, R> operator|(L&& x, R&& y); + template<class L, class R> constexpr common-big-int-type<L, R> operator^(L&& x, R&& y); - template<class T, signed-or-unsigned S> remove_cvref_t<T> operator<<(T&& x, S s); - template<class T, signed-or-unsigned S> remove_cvref_t<T> operator>>(T&& x, S s); + template<class T, signed-or-unsigned S> remove_cvref_t<T> operator<<(T&& x, S s); + template<class T, signed-or-unsigned S> remove_cvref_t<T> operator>>(T&& x, S s); namespace pmr { template<size_t b> @@ -1749,28 +1747,28 @@

X.3 Class template basic_big_int class basic_big_int { // [big.int.defns], types and constants using allocator_type = Allocator; - using size_type = implementation-defined; + using size_type = implementation-defined; static constexpr size_type inplace_representation_capacity = see below; static constexpr size_type inplace_capacity = inplace_representation_capacity * numeric_limits<uint_multiprecision_t>::digits; // [big.int.expos], exposition-only helpers template<class T> - inline constexpr bool no-alloc-constructible-from = see below; // exposition only + inline constexpr bool no-alloc-constructible-from = see below; // exposition only // [big.int.cons], construct/copy/destroy constexpr basic_big_int() noexcept(noexcept(Allocator())); constexpr explicit basic_big_int(const Allocator& a) noexcept; constexpr basic_big_int(const basic_big_int& x); constexpr basic_big_int(basic_big_int&& x) noexcept; - template<arbitrary-arithmetic-type T> + template<arbitrary-arithmetic-type T> constexpr explicit(see below) basic_big_int(T&& x) - noexcept(no-alloc-constructible-from<T>); - template<arbitrary-arithmetic-type T> + noexcept(no-alloc-constructible-from<T>); + template<arbitrary-arithmetic-type T> constexpr explicit basic_big_int(const T& x, const Allocator& a) - noexcept(no-alloc-constructible-from<T>); + noexcept(no-alloc-constructible-from<T>); template<input_range R> - requires signed-or-unsigned<ranges::range_value_t<R>> + requires signed-or-unsigned<ranges::range_value_t<R>> constexpr explicit basic_big_int(from_range_t, R&&, const Allocator& a = Allocator()); constexpr ~basic_big_int(); @@ -1791,28 +1789,28 @@

X.3 Class template basic_big_int // [big.int.modifiers], modifiers constexpr basic_big_int& operator=(const basic_big_int& x); constexpr basic_big_int& operator=(basic_big_int&& x) noexcept; - template<arbitrary-integer T> - constexpr basic_big_int& operator=(T&& x) noexcept(no-alloc-constructible-from<T>); + template<arbitrary-integer T> + constexpr basic_big_int& operator=(T&& x) noexcept(no-alloc-constructible-from<T>); - template<common-big-int-type-with<basic_big_int> T> + template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator+=(T&& x); - template<common-big-int-type-with<basic_big_int> T> + template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator-=(T&& x); - template<common-big-int-type-with<basic_big_int> T> + template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator*=(T&& x); - template<common-big-int-type-with<basic_big_int> T> + template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator/=(T&& x); - template<common-big-int-type-with<basic_big_int> T> + template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator%=(T&& x); - template<common-big-int-type-with<basic_big_int> T> + template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator&=(T&& x); - template<common-big-int-type-with<basic_big_int> T> + template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator|=(T&& x); - template<common-big-int-type-with<basic_big_int> T> + template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator^=(T&& x); - template<signed-or-unsigned S> constexpr basic_big_int& operator<<=(S s); - template<signed-or-unsigned S> constexpr basic_big_int& operator>>=(S s); + template<signed-or-unsigned S> constexpr basic_big_int& operator<<=(S s); + template<signed-or-unsigned S> constexpr basic_big_int& operator>>=(S s); constexpr void swap(basic_big_int& x) noexcept(allocator_traits<Allocator>::propagate_on_container_swap::value || @@ -1937,7 +1935,7 @@

X.3.2 Exposition-only helpers [big.int.expos]<

1 -The exposition-only concept signed-or-unsigned +The exposition-only concept signed-or-unsigned is satisfied and modeled if and only if T is a signed or unsigned integer type ([basic.fundamental]).

@@ -1947,7 +1945,7 @@

X.3.2 Exposition-only helpers [big.int.expos]<

2 -The exposition-only concept arbitrary-integer +The exposition-only concept arbitrary-integer is satisfied and modeled if and only if remove_cvref_t<T> is either a signed or unsigned integer type ([basic.fundamental]) or a specialization of basic_big_int. @@ -1958,7 +1956,7 @@

X.3.2 Exposition-only helpers [big.int.expos]<

3 -The exposition-only concept arbitrary-arithmetic-type +The exposition-only concept arbitrary-arithmetic-type is satisfied and modeled if and only if remove_cvref_t<T> is either a cv-unqualified arithmetic type ([basic.fundamental]) or a specialization of basic_big_int. @@ -1996,12 +1994,12 @@

X.3.2 Exposition-only helpers [big.int.expos]<

template<class T> - inline constexpr bool no-alloc-constructible-from = see below; + inline constexpr bool no-alloc-constructible-from = see below;

6 Effects: -no-alloc-constructible-from is true if +no-alloc-constructible-from is true if remove_cvref_t<T> is a signed or unsigned integer type whose width is less than or equal to inplace_bits, and false otherwise. @@ -2051,8 +2049,8 @@

X.3.3 Construct/copy/destroy [big.int.cons]x.get_allocator().

-template<arbitrary-arithmetic-type T> - constexpr explicit(see below) basic_big_int(T&& x) noexcept(no-alloc-constructible-from<T>); +template<arbitrary-arithmetic-type T> + constexpr explicit(see below) basic_big_int(T&& x) noexcept(no-alloc-constructible-from<T>);

6 @@ -2102,9 +2100,9 @@

X.3.3 Construct/copy/destroy [big.int.cons]

-template<arbitrary-arithmetic-type T> +template<arbitrary-arithmetic-type T> constexpr basic_big_int(const T& x, const Allocator& a) - noexcept(no-alloc-constructible-from<T>); + noexcept(no-alloc-constructible-from<T>);

11 @@ -2131,7 +2129,7 @@

X.3.3 Construct/copy/destroy [big.int.cons]

template<input_range R> - requires signed-or-unsigned<ranges::range_value_t<R>> + requires signed-or-unsigned<ranges::range_value_t<R>> constexpr explicit basic_big_int(from_range_t, R&& r, const Allocator& a = Allocator());
@@ -2278,9 +2276,9 @@

X.3.4 Operations [big.int.ops]

9 Returns: -max(inplace_representation_capacity, dynamic-representation-capacity() +max(inplace_representation_capacity, dynamic-representation-capacity() * numeric_­limits<uint_­multiprecision_t>::digits), -where dynamic-representation-capacity() is the number of currently allocated +where dynamic-representation-capacity() is the number of currently allocated uint_­multiprecision_t objects.

@@ -2364,8 +2362,8 @@

X.3.5 Modifiers [big.int.modifiers]

*this.

-template<arbitrary-integer T> - constexpr basic_big_int& operator=(T&& x) noexcept(no-alloc-constructible-from<T>); +template<arbitrary-integer T> + constexpr basic_big_int& operator=(T&& x) noexcept(no-alloc-constructible-from<T>);

5 @@ -2381,21 +2379,21 @@

X.3.5 Modifiers [big.int.modifiers]

*this.

-template<common-big-int-type-with<basic_big_int> T> +template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator+=(T&& x); -template<common-big-int-type-with<basic_big_int> T> +template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator-=(T&& x); -template<common-big-int-type-with<basic_big_int> T> +template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator*=(T&& x); -template<common-big-int-type-with<basic_big_int> T> +template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator/=(T&& x); -template<common-big-int-type-with<basic_big_int> T> +template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator%=(T&& x); -template<common-big-int-type-with<basic_big_int> T> +template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator&=(T&& x); -template<common-big-int-type-with<basic_big_int> T> +template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator|=(T&& x); -template<common-big-int-type-with<basic_big_int> T> +template<common-big-int-type-with<basic_big_int> T> constexpr basic_big_int& operator^=(T&& x);
@@ -2408,7 +2406,7 @@

X.3.5 Modifiers [big.int.modifiers]

in the respective operator@=.

-template<signed-or-unsigned S> constexpr basic_big_int& operator<<=(S s); +template<signed-or-unsigned S> constexpr basic_big_int& operator<<=(S s);

9 @@ -2416,7 +2414,7 @@

X.3.5 Modifiers [big.int.modifiers]

Equivalent to: return *this = std::move(*this) << s;

-template<signed-or-unsigned S> constexpr basic_big_int& operator>>=(S s); +template<signed-or-unsigned S> constexpr basic_big_int& operator>>=(S s);

10 @@ -2578,7 +2576,7 @@

X.3.8 Alias big_int X.3.9 Non-member comparison operator functions [big.int.cmp]

-template<class L, common-big-int-type-with<L> R> +template<class L, common-big-int-type-with<L> R> constexpr bool operator==(const L& x, const R& y) noexcept;
@@ -2597,7 +2595,7 @@

X.3.9 Non-member comparison operator functions [big.i

-template<class L, common-big-int-type-with<L> R> +template<class L, common-big-int-type-with<L> R> constexpr strong_ordering operator<=>(const L& x, const R& y) noexcept;
@@ -2612,15 +2610,15 @@

X.3.9 Non-member comparison operator functions [big.i

X.3.10 Binary operations [big.int.binary]

-template<class L, class R> constexpr common-big-int-type<L, R> operator+(L&& x, R&& y); -template<class L, class R> constexpr common-big-int-type<L, R> operator-(L&& x, R&& y); -template<class L, class R> constexpr common-big-int-type<L, R> operator*(L&& x, R&& y); -template<class L, class R> constexpr common-big-int-type<L, R> operator/(L&& x, R&& y); -template<class L, class R> constexpr common-big-int-type<L, R> operator%(L&& x, R&& y); +template<class L, class R> constexpr common-big-int-type<L, R> operator+(L&& x, R&& y); +template<class L, class R> constexpr common-big-int-type<L, R> operator-(L&& x, R&& y); +template<class L, class R> constexpr common-big-int-type<L, R> operator*(L&& x, R&& y); +template<class L, class R> constexpr common-big-int-type<L, R> operator/(L&& x, R&& y); +template<class L, class R> constexpr common-big-int-type<L, R> operator%(L&& x, R&& y); -template<class L, class R> constexpr common-big-int-type<L, R> operator&(L&& x, R&& y); -template<class L, class R> constexpr common-big-int-type<L, R> operator|(L&& x, R&& y); -template<class L, class R> constexpr common-big-int-type<L, R> operator^(L&& x, R&& y); +template<class L, class R> constexpr common-big-int-type<L, R> operator&(L&& x, R&& y); +template<class L, class R> constexpr common-big-int-type<L, R> operator|(L&& x, R&& y); +template<class L, class R> constexpr common-big-int-type<L, R> operator^(L&& x, R&& y);

1 @@ -2647,7 +2645,7 @@

X.3.10 Binary operations [big.int.binary]

-template<class T, signed-or-unsigned S> remove_cvref_t<T> operator<<(T&& x, S s); +template<class T, signed-or-unsigned S> remove_cvref_t<T> operator<<(T&& x, S s);

3 @@ -2666,7 +2664,7 @@

X.3.10 Binary operations [big.int.binary]

and whose allocator is that of x.

-template<class T, signed-or-unsigned S> remove_cvref_t<T> operator>>(T&& x, S s); +template<class T, signed-or-unsigned S> remove_cvref_t<T> operator>>(T&& x, S s);

6 @@ -2746,7 +2744,7 @@

X.3.12 Literals [big.int.literal]

Otherwise, each invocation of the UDL needs to allocate memory.

Perhaps a good way of implementing this would be to have a variable template -template<char... digits> big_int_parsed; +template<char... digits> big_int_parsed; which holds std::optional<std::big_int>, where a value is present only if the pre-parsed value fits in std::big_int without allocation. @@ -2765,7 +2763,7 @@

[charconv]

[…] constexpr to_chars_result to_chars(char* first, char* last, // freestanding - integer-type value, int base = 10); + integer-type value, int base = 10); template<size_t inplace_bits, class Allocator> constexpr to_chars_result to_chars(char* first, char* last, const basic_big_int<inplace_bits, Allocator>& value, @@ -2776,7 +2774,7 @@

[charconv]

[…] constexpr from_chars_result from_chars(const char* first, const char* last, // freestanding - integer-type& value, int base = 10); + integer-type& value, int base = 10); template<size_t inplace_bits, class Allocator> constexpr from_chars_result from_chars(const char* first, const char* last, basic_big_int<inplace_bits, Allocator>& value, @@ -2802,7 +2800,7 @@

[numeric.int. template<class T> constexpr div_result<T> div_rem_to_zero(T x, T y); template<class L, class R> - constexpr div_result<common-big-int-type<L, R>> div_rem_to_zero(L&& x, R&& y); + constexpr div_result<common-big-int-type<L, R>> div_rem_to_zero(L&& x, R&& y);

[numeric.abs]

diff --git a/docs/bitint.html b/docs/bitint.html index ce5ff9b..71d8615 100644 --- a/docs/bitint.html +++ b/docs/bitint.html @@ -3728,7 +3728,7 @@

6. Implementation experience

-

_BitInt, formerly known as _ExtInt, has been a compiler extension +

_BitInt, formerly known as _ExtInt, has been a compiler extension in Clang for several years now. The core language changes are essentially standardizing that compiler extension.

diff --git a/scripts/rebuild-docs.sh b/scripts/rebuild-docs.sh index b5d8e4e..544f8f8 100755 --- a/scripts/rebuild-docs.sh +++ b/scripts/rebuild-docs.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Rebuild HTML files in docs/ for every COWEL 0.9.1 source file, +# Rebuild HTML files in docs/ for every COWEL 0.10.0 source file, # but only when a corresponding HTML file already exists in docs/. # # Usage: scripts/rebuild-docs.sh @@ -18,6 +18,6 @@ while IFS= read -r src; do fi cowel run "$src" "$dest" echo "BUILT: $src -> $dest" -done < <(grep -rl '\\: cowel 0\.9\.1' src/) +done < <(grep -rl '\\: cowel 0\.10\.0' src/) exit $failed diff --git a/src/array.cow b/src/array.cow index 95c07c2..e6343e7 100644 --- a/src/array.cow +++ b/src/array.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title = {\tcode{std::array} is a wrapper for an array!}){ diff --git a/src/ascii.cow b/src/ascii.cow index 07ee436..99c831d 100644 --- a/src/ascii.cow +++ b/src/ascii.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow")\ \ \cowel_macro("charset"){\tt{\hl("string"){[\cowel_put]}}}\ diff --git a/src/better-shifting.cow b/src/better-shifting.cow index 93391df..3f9dd30 100644 --- a/src/better-shifting.cow +++ b/src/better-shifting.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Better shifting}){ @@ -107,8 +107,8 @@ width of the first operand. Consider the task of implementing the following function: \cppblock{ -/// \serif{Return the value of \tcode{x} with the least significant \tcode{num_bits} bits masked out.} -/// \serif{\tcode{num_bits} shall be nonnegative and \'LESS-THAN OR EQUAL TO' \tcode{32}.} +/// \serif{Return the value of \ocode{x} with the least significant \ocode{num_bits} bits masked out.} +/// \serif{\ocode{num_bits} shall be nonnegative and \'LESS-THAN OR EQUAL TO' \ocode{32}.} std::uint32_t mask_lsb(std::uint32_t x, int num_bits); } diff --git a/src/big-int.cow b/src/big-int.cow index 0be7a25..794bb7d 100644 --- a/src/big-int.cow +++ b/src/big-int.cow @@ -1,8 +1,6 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") -\cowel_macro("cexposid"){\tcode{\i{\cowel_put}}} - \wg21_head(title={\tcode{std::big_int}}){ \dl{ \dt{Document number:} \dd{\docnum{D4444R0}} @@ -61,49 +59,49 @@ as well as related type aliases. #include namespace std { - // alias \tcode{uint_multiprecision_t} + // alias \ocode{uint_multiprecision_t} using uint_multiprecision_t = \seebelow; - //\serif{ [big.int.class], class template \tcode{basic_big_int}} + //\serif{ [big.int.class], class template \ocode{basic_big_int}} template> class basic_big_int; //\serif{ [big.int.expos], exposition-only helpers} template - concept \tcode{\i{signed-or-unsigned}} = \seebelow; //\serif{ exposition only} + concept \exposid{signed-or-unsigned} = \seebelow; //\serif{ exposition only} template - concept \tcode{\i{arbitrary-integer}} = \seebelow; //\serif{ exposition only} + concept \exposid{arbitrary-integer} = \seebelow; //\serif{ exposition only} template - concept \tcode{\i{arbitrary-arithmetic-type}} = \seebelow; //\serif{ exposition only} + concept \exposid{arbitrary-arithmetic-type} = \seebelow; //\serif{ exposition only} template - using \tcode{\i{common-big-int-type}} = \seebelow; //\serif{ exposition only} + using \exposid{common-big-int-type} = \seebelow; //\serif{ exposition only} template - concept \tcode{\i{common-big-int-type-with}} = requires { //\serif{ exposition only} - typename \tcode{\i{common-big-int-type}}; + concept \exposid{common-big-int-type-with} = requires { //\serif{ exposition only} + typename \exposid{common-big-int-type}; }; - //\serif{ [big.int.alias], alias \tcode{big_int}} + //\serif{ [big.int.alias], alias \ocode{big_int}} using big_int = basic_big_int<\seebelow>; //\serif{ [big.int.cmp], non-member comparison operator functions} - template R> + template R> constexpr bool operator==(const L& lhs, const R& rhs) noexcept; - template R> + template R> constexpr strong_ordering operator<=>(const L& lhs, const R& rhs) noexcept; //\serif{ [big.int.binary], binary operations} - template constexpr \cexposid{common-big-int-type} operator+(L&& x, R&& y); - template constexpr \cexposid{common-big-int-type} operator-(L&& x, R&& y); - template constexpr \cexposid{common-big-int-type} operator*(L&& x, R&& y); - template constexpr \cexposid{common-big-int-type} operator/(L&& x, R&& y); - template constexpr \cexposid{common-big-int-type} operator%(L&& x, R&& y); + template constexpr \exposid{common-big-int-type} operator+(L&& x, R&& y); + template constexpr \exposid{common-big-int-type} operator-(L&& x, R&& y); + template constexpr \exposid{common-big-int-type} operator*(L&& x, R&& y); + template constexpr \exposid{common-big-int-type} operator/(L&& x, R&& y); + template constexpr \exposid{common-big-int-type} operator%(L&& x, R&& y); - template constexpr \cexposid{common-big-int-type} operator&(L&& x, R&& y); - template constexpr \cexposid{common-big-int-type} operator|(L&& x, R&& y); - template constexpr \cexposid{common-big-int-type} operator^(L&& x, R&& y); + template constexpr \exposid{common-big-int-type} operator&(L&& x, R&& y); + template constexpr \exposid{common-big-int-type} operator|(L&& x, R&& y); + template constexpr \exposid{common-big-int-type} operator^(L&& x, R&& y); - template remove_cvref_t operator<<(T&& x, S s); - template remove_cvref_t operator>>(T&& x, S s); + template remove_cvref_t operator<<(T&& x, S s); + template remove_cvref_t operator>>(T&& x, S s); namespace pmr { template @@ -167,28 +165,28 @@ template class basic_big_int { //\serif{ [big.int.defns], types and constants} using allocator_type = Allocator; - using size_type = \cexposid{implementation-defined}; + using size_type = \exposid{implementation-defined}; static constexpr size_type inplace_representation_capacity = \seebelow; static constexpr size_type inplace_capacity = inplace_representation_capacity * numeric_limits::digits; //\serif{ [big.int.expos], exposition-only helpers} template - inline constexpr bool \cexposid{no-alloc-constructible-from} = \seebelow; //\serif{ exposition only} + inline constexpr bool \exposid{no-alloc-constructible-from} = \seebelow; //\serif{ exposition only} //\serif{ [big.int.cons], construct/copy/destroy} constexpr basic_big_int() noexcept(noexcept(Allocator())); constexpr explicit basic_big_int(const Allocator& a) noexcept; constexpr basic_big_int(const basic_big_int& x); constexpr basic_big_int(basic_big_int&& x) noexcept; - template<\cexposid{arbitrary-arithmetic-type} T> + template<\exposid{arbitrary-arithmetic-type} T> constexpr explicit(\seebelow) basic_big_int(T&& x) - noexcept(\cexposid{no-alloc-constructible-from}); - template<\cexposid{arbitrary-arithmetic-type} T> + noexcept(\exposid{no-alloc-constructible-from}); + template<\exposid{arbitrary-arithmetic-type} T> constexpr explicit basic_big_int(const T& x, const Allocator& a) - noexcept(\cexposid{no-alloc-constructible-from}); + noexcept(\exposid{no-alloc-constructible-from}); template - requires \cexposid{signed-or-unsigned}> + requires \exposid{signed-or-unsigned}> constexpr explicit basic_big_int(from_range_t, R&&, const Allocator& a = Allocator()); constexpr ~basic_big_int(); @@ -209,28 +207,28 @@ class basic_big_int { //\serif{ [big.int.modifiers], modifiers} constexpr basic_big_int& operator=(const basic_big_int& x); constexpr basic_big_int& operator=(basic_big_int&& x) noexcept; - template<\cexposid{arbitrary-integer} T> - constexpr basic_big_int& operator=(T&& x) noexcept(\cexposid{no-alloc-constructible-from}); + template<\exposid{arbitrary-integer} T> + constexpr basic_big_int& operator=(T&& x) noexcept(\exposid{no-alloc-constructible-from}); - template<\cexposid{common-big-int-type-with} T> + template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator+=(T&& x); - template<\cexposid{common-big-int-type-with} T> + template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator-=(T&& x); - template<\cexposid{common-big-int-type-with} T> + template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator*=(T&& x); - template<\cexposid{common-big-int-type-with} T> + template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator/=(T&& x); - template<\cexposid{common-big-int-type-with} T> + template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator%=(T&& x); - template<\cexposid{common-big-int-type-with} T> + template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator&=(T&& x); - template<\cexposid{common-big-int-type-with} T> + template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator|=(T&& x); - template<\cexposid{common-big-int-type-with} T> + template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator^=(T&& x); - template<\cexposid{signed-or-unsigned} S> constexpr basic_big_int& operator<<=(S s); - template<\cexposid{signed-or-unsigned} S> constexpr basic_big_int& operator>>=(S s); + template<\exposid{signed-or-unsigned} S> constexpr basic_big_int& operator<<=(S s); + template<\exposid{signed-or-unsigned} S> constexpr basic_big_int& operator>>=(S s); constexpr void swap(basic_big_int& x) noexcept(allocator_traits::propagate_on_container_swap::value || @@ -355,24 +353,24 @@ The value of \tcode{inplace_representation_capacity} shall be at least \itemdecl{ template - concept \tcode{\i{signed-or-unsigned}} = \seebelow; + concept \ocode{\i{signed-or-unsigned}} = \seebelow; } \itemdescr{ \pnum -The exposition-only concept \cexposid{signed-or-unsigned} +The exposition-only concept \exposid{signed-or-unsigned} is satisfied and modeled if and only if \tcode{T} is a signed or unsigned integer type\iref{basic.fundamental}. } \itemdecl{ template - concept \tcode{\i{arbitrary-integer}} = \seebelow; + concept \ocode{\i{arbitrary-integer}} = \seebelow; } \itemdescr{ \pnum -The exposition-only concept \cexposid{arbitrary-integer} +The exposition-only concept \exposid{arbitrary-integer} is satisfied and modeled if and only if \tcode{remove_cvref_t} is either a signed or unsigned integer type\iref{basic.fundamental} or a specialization of \tcode{basic_big_int}. @@ -380,12 +378,12 @@ or a specialization of \tcode{basic_big_int}. \itemdecl{ template - concept \tcode{\i{arbitrary-arithmetic-type}} = \seebelow; + concept \ocode{\i{arbitrary-arithmetic-type}} = \seebelow; } \itemdescr{ \pnum -The exposition-only concept \cexposid{arbitrary-arithmetic-type} +The exposition-only concept \exposid{arbitrary-arithmetic-type} is satisfied and modeled if and only if \tcode{remove_cvref_t} is either a cv-unqualified arithmetic type\iref{basic.fundamental} or a specialization of \tcode{basic_big_int}. @@ -393,7 +391,7 @@ or a specialization of \tcode{basic_big_int}. \itemdecl{ template - using \tcode{\i{common-big-int-type}} = \seebelow; + using \ocode{\i{common-big-int-type}} = \seebelow; } \itemdescr{ @@ -426,13 +424,13 @@ let \tcode{RT} be \tcode{remove_cvref_t}. \itemdecl{ template - inline constexpr bool \cexposid{no-alloc-constructible-from} = \seebelow; + inline constexpr bool \exposid{no-alloc-constructible-from} = \seebelow; } \itemdescr{ \pnum \effects -\cexposid{no-alloc-constructible-from} is \tcode{true} if +\exposid{no-alloc-constructible-from} is \tcode{true} if \tcode{remove_cvref_t} is a signed or unsigned integer type whose width is less than or equal to \tcode{inplace_bits}, and \tcode{false} otherwise. @@ -491,8 +489,8 @@ Initializes the allocator to \tcode{x.get_allocator()}. } \itemdecl{ -template<\cexposid{arbitrary-arithmetic-type} T> - constexpr explicit(\seebelow) basic_big_int(T&& x) noexcept(\cexposid{no-alloc-constructible-from}); +template<\exposid{arbitrary-arithmetic-type} T> + constexpr explicit(\seebelow) basic_big_int(T&& x) noexcept(\exposid{no-alloc-constructible-from}); } \itemdescr{ @@ -544,9 +542,9 @@ which is arguably needed because character types and integers are used in differ } \itemdecl{ -template<\cexposid{arbitrary-arithmetic-type} T> +template<\exposid{arbitrary-arithmetic-type} T> constexpr basic_big_int(const T& x, const Allocator& a) - noexcept(\cexposid{no-alloc-constructible-from}); + noexcept(\exposid{no-alloc-constructible-from}); } \itemdescr{ @@ -575,7 +573,7 @@ otherwise, exceptions thrown during allocation. \itemdecl{ template - requires \cexposid{signed-or-unsigned}> + requires \exposid{signed-or-unsigned}> constexpr explicit basic_big_int(from_range_t, R&& r, const Allocator& a = Allocator()); } @@ -737,9 +735,9 @@ constexpr size_type representation_capacity() const noexcept; \itemdescr{ \pnum \returns -\tcode{max(inplace_representation_capacity, \cexposid{dynamic-representation-capacity}() +\tcode{max(inplace_representation_capacity, \exposid{dynamic-representation-capacity}() * numeric_\'SOFT HYPHEN'limits\brk{}::digits)}, -where \tcode{\cexposid{dynamic-representation-capacity}()} is the number of currently allocated +where \tcode{\exposid{dynamic-representation-capacity}()} is the number of currently allocated \tcode{uint_\'SOFT HYPHEN'multiprecision_t} objects. } @@ -836,8 +834,8 @@ Sets the integer value to that of \tcode{x}. } \itemdecl{ -template<\cexposid{arbitrary-integer} T> - constexpr basic_big_int& operator=(T&& x) noexcept(\cexposid{no-alloc-constructible-from}); +template<\exposid{arbitrary-integer} T> + constexpr basic_big_int& operator=(T&& x) noexcept(\exposid{no-alloc-constructible-from}); } \itemdescr{ @@ -855,21 +853,21 @@ Sets the integer value to that of \tcode{x}. } \itemdecl{ -template<\cexposid{common-big-int-type-with} T> +template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator+=(T&& x); -template<\cexposid{common-big-int-type-with} T> +template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator-=(T&& x); -template<\cexposid{common-big-int-type-with} T> +template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator*=(T&& x); -template<\cexposid{common-big-int-type-with} T> +template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator/=(T&& x); -template<\cexposid{common-big-int-type-with} T> +template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator%=(T&& x); -template<\cexposid{common-big-int-type-with} T> +template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator&=(T&& x); -template<\cexposid{common-big-int-type-with} T> +template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator|=(T&& x); -template<\cexposid{common-big-int-type-with} T> +template<\exposid{common-big-int-type-with} T> constexpr basic_big_int& operator^=(T&& x); } @@ -886,7 +884,7 @@ in the respective \tcode{operator@=}. } \itemdecl{ -template<\cexposid{signed-or-unsigned} S> constexpr basic_big_int& operator<<=(S s); +template<\exposid{signed-or-unsigned} S> constexpr basic_big_int& operator<<=(S s); } \itemdescr{ @@ -896,7 +894,7 @@ Equivalent to: \tcode{return *this = std::move(*this) << s;} } \itemdecl{ -template<\cexposid{signed-or-unsigned} S> constexpr basic_big_int& operator>>=(S s); +template<\exposid{signed-or-unsigned} S> constexpr basic_big_int& operator>>=(S s); } \itemdescr{ @@ -1090,7 +1088,7 @@ may represent the value of all commonly used integer types without allocating. \cowel_html_element("h4"){X.\cowel_var_get("snum1").\snum2 Non-member comparison operator functions \stable_ref{big.int.cmp}} \itemdecl{ -template R> +template R> constexpr bool operator==(const L& x, const R& y) noexcept; } @@ -1111,7 +1109,7 @@ This may involve multi-precision comparisons such as in \tcode{big_int == __int1 } \itemdecl{ -template R> +template R> constexpr strong_ordering operator<=>(const L& x, const R& y) noexcept; } @@ -1128,15 +1126,15 @@ is greater than the integer value of \tcode{y}, and \cowel_html_element("h4"){X.\cowel_var_get("snum1").\snum2 Binary operations \stable_ref{big.int.binary}} \itemdecl{ -template constexpr \cexposid{common-big-int-type} operator+(L&& x, R&& y); -template constexpr \cexposid{common-big-int-type} operator-(L&& x, R&& y); -template constexpr \cexposid{common-big-int-type} operator*(L&& x, R&& y); -template constexpr \cexposid{common-big-int-type} operator/(L&& x, R&& y); -template constexpr \cexposid{common-big-int-type} operator%(L&& x, R&& y); +template constexpr \exposid{common-big-int-type} operator+(L&& x, R&& y); +template constexpr \exposid{common-big-int-type} operator-(L&& x, R&& y); +template constexpr \exposid{common-big-int-type} operator*(L&& x, R&& y); +template constexpr \exposid{common-big-int-type} operator/(L&& x, R&& y); +template constexpr \exposid{common-big-int-type} operator%(L&& x, R&& y); -template constexpr \cexposid{common-big-int-type} operator&(L&& x, R&& y); -template constexpr \cexposid{common-big-int-type} operator|(L&& x, R&& y); -template constexpr \cexposid{common-big-int-type} operator^(L&& x, R&& y); +template constexpr \exposid{common-big-int-type} operator&(L&& x, R&& y); +template constexpr \exposid{common-big-int-type} operator|(L&& x, R&& y); +template constexpr \exposid{common-big-int-type} operator^(L&& x, R&& y); } \itemdescr{ @@ -1165,7 +1163,7 @@ maybe copy the wording from there. } \itemdecl{ -template remove_cvref_t operator<<(T&& x, S s); +template remove_cvref_t operator<<(T&& x, S s); } \itemdescr{ @@ -1186,7 +1184,7 @@ and whose allocator is that of \tcode{x}. } \itemdecl{ -template remove_cvref_t operator>>(T&& x, S s); +template remove_cvref_t operator>>(T&& x, S s); } @@ -1272,7 +1270,7 @@ If so, the specialization is \tcode{noexcept}. Otherwise, each invocation of the UDL needs to allocate memory. Perhaps a good way of implementing this would be to have a variable template -\tcode{template \cexposid{big_int_parsed};} +\tcode{template \exposid{big_int_parsed};} which holds \tcode{std::optional}, where a value is present only if the pre-parsed value fits in \tcode{std::big_int} without allocation. @@ -1292,7 +1290,7 @@ namespace std { \etc constexpr to_chars_result to_chars(char* first, char* last, //\serif{ freestanding} - \cexposid{integer-type} value, int base = 10); + \exposid{integer-type} value, int base = 10); \ins{ template constexpr to_chars_result to_chars(char* first, char* last, const basic_big_int& value, @@ -1303,7 +1301,7 @@ namespace std { \etc constexpr from_chars_result from_chars(const char* first, const char* last, //\serif{ freestanding} - \cexposid{integer-type}& value, int base = 10); + \exposid{integer-type}& value, int base = 10); \ins{ template constexpr from_chars_result from_chars(const char* first, const char* last, basic_big_int& value, @@ -1332,7 +1330,7 @@ There is a proposal \ref("P3724R3") in the pipeline which adds the initial set o template constexpr div_result div_rem_to_zero(T x, T y); \ins{template - constexpr div_result<\cexposid{common-big-int-type}> div_rem_to_zero(L&& x, R&& y);} + constexpr div_result<\exposid{common-big-int-type}> div_rem_to_zero(L&& x, R&& y);} } } diff --git a/src/bit-cast-padding.cow b/src/bit-cast-padding.cow index 3a2b361..71a7846 100644 --- a/src/bit-cast-padding.cow +++ b/src/bit-cast-padding.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Fixing \tcode{std::bit_cast} of types\br{}with padding bits}){ diff --git a/src/bit-permutations-simd.cow b/src/bit-permutations-simd.cow index 48e52b9..ba0b37c 100644 --- a/src/bit-permutations-simd.cow +++ b/src/bit-permutations-simd.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={\tcode{std::simd} overloads for bit permutations}){ diff --git a/src/bitint.cow b/src/bitint.cow index 184bfe9..db1a48f 100644 --- a/src/bitint.cow +++ b/src/bitint.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Bit-precise integers}){ @@ -1533,11 +1533,11 @@ which may be surprising. The following code is ill-formed if \tcode{intmax_t} is a 64-bit signed integer (which it is on many platforms): \cppblock{ -#if \cowel_highlight("cpp"){1'000'000'000'000'000'000'000'000wb} // error +#if \code("cpp",nested=true){1'000'000'000'000'000'000'000'000wb} // error #endif _BitInt(81) x = 1'000'000'000'000'000'000'000'000wb; // OK } -\tcode{#if \cowel_highlight("cpp"){1'000'000'000'000'000'000'000'000wb}} is ill-formed +\tcode{#if \code("cpp",nested=true){1'000'000'000'000'000'000'000'000wb}} is ill-formed because the integer literal is of type \tcode{_BitInt(81)}, which behaves like \tcode{intmax_t} within \tcode{#if}. Since \math{\msup{\mn{10}\mn{32}}} does not fit within \tcode{intmax_t}, @@ -2926,8 +2926,8 @@ The non-deduced contexts are: \itemdecl{ \ins{template void f(_BitInt(N)); template void g(_BitInt(N + 1)); -f(100wb); // \serif{OK}, \tcode{N = 8} -g(100wb); // \serif{error: no argument for deduced \tcode{N}}} +f(100wb); // \serif{OK}, \ocode{N = 8} +g(100wb); // \serif{error: no argument for deduced \ocode{N}}} } }} } @@ -2990,7 +2990,7 @@ The type of \tcode{N} in the type \tcode{_BitInt(N)} is \tcode{std::size_t}. \itemdecl{ template void f(_BitInt(n)); -f(0wb); // \serif{OK; \tcode{T} was deduced as \tcode{std::size_t} from an argument of type \tcode{_BitInt(1)}} +f(0wb); // \serif{OK; \ocode{T} was deduced as \ocode{std::size_t} from an argument of type \ocode{_BitInt(1)}} } } } diff --git a/src/case-ranges.cow b/src/case-ranges.cow index a5219d1..5ae87b9 100644 --- a/src/case-ranges.cow +++ b/src/case-ranges.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Case ranges}){ @@ -413,7 +413,7 @@ Attach an example to the previous paragraph (now paragraph 3): \itemdecl{ unsigned int i = 0; switch (i) { - case -1: //\serif{ error: narrowing conversion from \tcode{-1} to \tcode{unsigned int}} + case -1: //\serif{ error: narrowing conversion from \ocode{-1} to \ocode{unsigned int}} case 0 ... 10ull: //\serif{ OK} case 2 ... 3: //\serif{ error: value range overlaps with that of previous label} } diff --git a/src/charconv-ext.cow b/src/charconv-ext.cow index 1478d56..2be03ec 100644 --- a/src/charconv-ext.cow +++ b/src/charconv-ext.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Extending \tcode{} support to more character types}){ @@ -102,7 +102,7 @@ severely limits what can be done elsewhere: \li{ A hypothetical \tcode{std::u8to_string} could not easily be created because \tcode{std::to_string} is specified to return \tcode{std::format("{}", val), - i.e. in terms of \tcode{std::to_chars}.} + i.e. in terms of \ocode{std::to_chars}.} } \li{ A hypothetical string parsing counterpart to \tcode{std::format} @@ -205,7 +205,7 @@ u8string_view u8str = u8"123\\xFF"; // \serif{malformed UTF-8} int i2; const auto [p2, e2] = from_chars(u8str.data(), u8str.data() + u8str.size(), i2); // \serif{OK} -assert(i1 == i2); // \serif{holds, both \tcode{i1} and \tcode{i2} equal \tcode{123}} +assert(i1 == i2); // \serif{holds, both \ocode{i1} and \ocode{i2} equal \ocode{123}} assert(p1 - cstr.data() == p2 - u8str.data()); // \serif{holds, both patterns are three code units long} } } diff --git a/src/clarify-fp-overflow.cow b/src/clarify-fp-overflow.cow index 9ff8f13..ff25346 100644 --- a/src/clarify-fp-overflow.cow +++ b/src/clarify-fp-overflow.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Clarify the behavior of floating-point overflow}){ diff --git a/src/clmul.cow b/src/clmul.cow index 0e77c31..ac4b11b 100644 --- a/src/clmul.cow +++ b/src/clmul.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Carry-less product: \tt{std::clmul}}){ diff --git a/src/cmath-c23.cow b/src/cmath-c23.cow index 62c8f1d..426a3d3 100644 --- a/src/cmath-c23.cow +++ b/src/cmath-c23.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Rebasing \tt{} on C23}){ @@ -611,7 +611,7 @@ and having no prefix at all would create undesirable overload sets with other fu The design goal for these functions is for the user to be able to write: \cppblock{ #ifdef __cplusplus - #define f32add(...) \cowel_highlight("cpp"){::std::fadd(__VA_ARGS__)} + #define f32add(...) \code("cpp",nested=true){::std::fadd(__VA_ARGS__)} // ... #else #include diff --git a/src/concise-grammar.cow b/src/concise-grammar.cow index f64f443..856319d 100644 --- a/src/concise-grammar.cow +++ b/src/concise-grammar.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Improve readability of the C++ grammar by adding a syntax for groups and repetitions}){ diff --git a/src/correctly-rounded-math.cow b/src/correctly-rounded-math.cow index f16acf2..1d39af2 100644 --- a/src/correctly-rounded-math.cow +++ b/src/correctly-rounded-math.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Correctly rounded floating-point maths functions}){ diff --git a/src/deprecate-unicode-conversion.cow b/src/deprecate-unicode-conversion.cow index e0792ae..1469804 100644 --- a/src/deprecate-unicode-conversion.cow +++ b/src/deprecate-unicode-conversion.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Deprecate implicit conversions @@ -587,8 +587,8 @@ bool is_oe(char8_t c) { } void f() { char32_t c = u8'x'; // \serif{deprecated} - char32_t c = u'x'; // \serif{OK, conversion from \tcode{char16_t} to \tcode{char32_t}} - char8_t c = 'x'; // \serif{OK, conversion from \tcode{char} to \tcode{char8_t}} + char32_t c = u'x'; // \serif{OK, conversion from \ocode{char16_t} to \ocode{char32_t}} + char8_t c = 'x'; // \serif{OK, conversion from \ocode{char} to \ocode{char8_t}} is_oe(U'ö'); // \serif{deprecated} is_oe(static_cast(U'ö')); // \serif{OK, explicit conversion\iref{expr.static.cast}} is_oe((char8_t)U'ö'); // \serif{OK, explicit conversion} diff --git a/src/fix-declaration-font.cow b/src/fix-declaration-font.cow index af409a1..0ddb936 100644 --- a/src/fix-declaration-font.cow +++ b/src/fix-declaration-font.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Fix inappropriate font choices for "declaration"}){ diff --git a/src/fix-floating-from-chars.cow b/src/fix-floating-from-chars.cow index 5fff0a9..41b913c 100644 --- a/src/fix-floating-from-chars.cow +++ b/src/fix-floating-from-chars.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Fix defects in floating-point \tcode{std::from_chars}\br diff --git a/src/floating-point-values.cow b/src/floating-point-values.cow index 893a236..b1c45ab 100644 --- a/src/floating-point-values.cow +++ b/src/floating-point-values.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Values of floating-point types}){ diff --git a/src/intdiv.cow b/src/intdiv.cow index e39609a..8d97f0c 100644 --- a/src/intdiv.cow +++ b/src/intdiv.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Integer division}){ @@ -1807,8 +1807,8 @@ to have well-defined behavior even when \br\example{ Assume that \tcode{\hl("name-macro"){INT_MAX}} equals \tcode{2'147'483'647}. \itemdecl{ -const auto q_to_zero = \hl("name-macro"){INT_MAX} / 2; // \serif{\tcode{q_to_zero} is \tcode{1'073'741'823}.} -const auto [q, r] = div_rem_to_pos_inf(\hl("name-macro"){INT_MAX}, 2); // \serif{\tcode{q} is \tcode{1'073'741'824} and \tcode{r} is \tcode{-1}.} +const auto q_to_zero = \hl("name-macro"){INT_MAX} / 2; // \serif{\ocode{q_to_zero} is \ocode{1'073'741'823}.} +const auto [q, r] = div_rem_to_pos_inf(\hl("name-macro"){INT_MAX}, 2); // \serif{\ocode{q} is \ocode{1'073'741'824} and \ocode{r} is \ocode{-1}.} int r2 = x - q * 2; // \serif{This multiplication has undefined behavior.} } }} diff --git a/src/libwg21-9.cow b/src/libwg21-9.cow index 4b2ff4c..cab9fbf 100644 --- a/src/libwg21-9.cow +++ b/src/libwg21-9.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_actions{ \cowel_macro("hl"){\cowel_paragraph_enter\cowel_highlight_as(...){\cowel_put}} @@ -15,6 +15,7 @@ \cowel_macro("placeholder"){\i{\cowel_put}} \cowel_macro("placeholdernc"){\i{\cowel_put}} \cowel_macro("tcode"){\code("cpp"){\cowel_put}} +\cowel_macro("ocode"){\cowel_to_html{\code("cpp"){\cowel_put}}} \cowel_macro("keyword"){\hl("keyword"){\cowel_put}} \cowel_macro("grammarterm"){\gterm{\cowel_put}} \cowel_macro("header"){\code("cpp"){\hl("string"){<\cowel_put>}}} diff --git a/src/more-bitset-operations.cow b/src/more-bitset-operations.cow index 0a33988..b4683f7 100644 --- a/src/more-bitset-operations.cow +++ b/src/more-bitset-operations.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={More bitset operations}){ diff --git a/src/more-trailing-commas.cow b/src/more-trailing-commas.cow index b34acc4..a9888b2 100644 --- a/src/more-trailing-commas.cow +++ b/src/more-trailing-commas.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={More trailing commas}){ @@ -590,7 +590,7 @@ and not currently permitted. d[a, b,] // \serif{\gterm{expression-list} in subscript operator} f(a, b,) // \serif{\gterm{expression-list} in call operator} T(0,) // \serif{\gterm{expression-list} in function-style cast} -typename T(0,) // \serif{\gterm{expression-list} in function-style cast with \tcode{typename}} +typename T(0,) // \serif{\gterm{expression-list} in function-style cast with \ocode{typename}} new (a, b,) T // \serif{\gterm{expression-list} in \gterm{new-placement}} new T(a, b,) // \serif{\gterm{expression-list} in \gterm{new-initializer}} template for (int _ : { a, b, }) // \serif{\gterm{expression-list} in \gterm{expansion-init-list}} @@ -755,7 +755,7 @@ Another not proposed trailing comma is that after an ellipsis parameter: \cppblock{ void f( int x, - ..., // \serif{after \tcode{...} in \gterm{parameter-declaration-clause}} + ..., // \serif{after \ocode{...} in \gterm{parameter-declaration-clause}} ); } diff --git a/src/more-unicode-escapes.cow b/src/more-unicode-escapes.cow index 760e038..9e0a653 100644 --- a/src/more-unicode-escapes.cow +++ b/src/more-unicode-escapes.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \cowel_macro("zwnbsp"){\'ZERO WIDTH NO-BREAK SPACE'} diff --git a/src/n-algorithms.cow b/src/n-algorithms.cow index 568fb3e..6087c7f 100644 --- a/src/n-algorithms.cow +++ b/src/n-algorithms.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={\tcode{partial_sort_at_most}, \tcode{nth_element_at_most}}){ diff --git a/src/named-args.cow b/src/named-args.cow index cf9191f..831fe4b 100644 --- a/src/named-args.cow +++ b/src/named-args.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Named function arguments}){ diff --git a/src/random-chars.cow b/src/random-chars.cow index 329541a..125ee10 100644 --- a/src/random-chars.cow +++ b/src/random-chars.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Supporting \tt{signed char} and \tt{unsigned char}\br in random number generation}){ diff --git a/src/rename-sat.cow b/src/rename-sat.cow index a6930a6..4cfdc31 100644 --- a/src/rename-sat.cow +++ b/src/rename-sat.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Renaming saturation arithmetic functions}){ diff --git a/src/replace-charconv.cow b/src/replace-charconv.cow index 7e94eba..b12046f 100644 --- a/src/replace-charconv.cow +++ b/src/replace-charconv.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Provide a better replacement for \tt{std::to_chars} and \tt{std::from_chars}}){ diff --git a/src/sd-7-updates.cow b/src/sd-7-updates.cow index 0430115..3186b8a 100644 --- a/src/sd-7-updates.cow +++ b/src/sd-7-updates.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \cowel_macro("bolden"){\del{\cowel_put} \ins{\b{\cowel_put}}} diff --git a/src/sequential-hex-digits.cow b/src/sequential-hex-digits.cow index 57c2bd4..24c8cb8 100644 --- a/src/sequential-hex-digits.cow +++ b/src/sequential-hex-digits.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Sequential hexadecimal digits}){ diff --git a/src/template-9.cow b/src/template-9.cow index 1a1dc7a..40638fc 100644 --- a/src/template-9.cow +++ b/src/template-9.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head( @@ -28,7 +28,7 @@ \h2{Wording} -The changes are relative to \ref("N5032"). +The changes are relative to \ref("N5046"). \h3(show_number=false){[version.syn]} diff --git a/src/to-signed-unsigned.cow b/src/to-signed-unsigned.cow index 88b200e..cca859c 100644 --- a/src/to-signed-unsigned.cow +++ b/src/to-signed-unsigned.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={\tcode{std::to_signed} and \tcode{std::to_unsigned}}){ diff --git a/src/trivially-copyable-optional-ref.cow b/src/trivially-copyable-optional-ref.cow index bc41a84..c00b670 100644 --- a/src/trivially-copyable-optional-ref.cow +++ b/src/trivially-copyable-optional-ref.cow @@ -1,4 +1,4 @@ -\: cowel 0.9.1 +\: cowel 0.10.0 \cowel_include("libwg21-9.cow") \wg21_head(title={Make \tcode{optional} trivially copyable\br{}(NB comment US 134-215)}){