diff --git a/CPP20.md b/CPP20.md index 61df1fe..c5e8800 100644 --- a/CPP20.md +++ b/CPP20.md @@ -221,9 +221,9 @@ g(baz{}); // PASS. ```c++ template concept C = requires(T x) { - {*x} -> typename T::inner; // the type of the expression `*x` is convertible to `T::inner` + {*x} -> std::convertible_to; // the type of the expression `*x` is convertible to `T::inner` {x + 1} -> std::same_as; // the expression `x + 1` satisfies `std::same_as` - {x * 1} -> T; // the type of the expression `x * 1` is convertible to `T` + {x * 1} -> std::convertible_to; // the type of the expression `x * 1` is convertible to `T` }; ``` * **Nested requirements** - denoted by the `requires` keyword, specify additional constraints (such as those on local parameter arguments). diff --git a/README.md b/README.md index b7c5ebc..3cdae56 100644 --- a/README.md +++ b/README.md @@ -324,9 +324,9 @@ g(baz{}); // PASS. ```c++ template concept C = requires(T x) { - {*x} -> typename T::inner; // the type of the expression `*x` is convertible to `T::inner` + {*x} -> std::convertible_to; // the type of the expression `*x` is convertible to `T::inner` {x + 1} -> std::same_as; // the expression `x + 1` satisfies `std::same_as` - {x * 1} -> T; // the type of the expression `x * 1` is convertible to `T` + {x * 1} -> std::convertible_to; // the type of the expression `x * 1` is convertible to `T` }; ``` * **Nested requirements** - denoted by the `requires` keyword, specify additional constraints (such as those on local parameter arguments).