File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -221,9 +221,9 @@ g(baz{}); // PASS.
221221``` c++
222222template <typename T>
223223concept C = requires (T x) {
224- {* x} -> typename T::inner; // the type of the expression ` *x ` is convertible to ` T::inner `
224+ {* x} -> std::convertible_to< typename T::inner > ; // the type of the expression ` *x ` is convertible to ` T::inner `
225225 {x + 1} -> std::same_as<int >; // the expression ` x + 1 ` satisfies ` std::same_as<decltype((x + 1))> `
226- {x * 1} -> T ; // the type of the expression ` x * 1 ` is convertible to ` T `
226+ {x * 1} -> std::convertible_to< T > ; // the type of the expression ` x * 1 ` is convertible to ` T `
227227};
228228```
229229* ** Nested requirements** - denoted by the ` requires ` keyword, specify additional constraints (such as those on local parameter arguments).
Original file line number Diff line number Diff line change @@ -324,9 +324,9 @@ g(baz{}); // PASS.
324324``` c++
325325template <typename T>
326326concept C = requires (T x) {
327- {* x} -> typename T::inner; // the type of the expression ` *x ` is convertible to ` T::inner `
327+ {* x} -> std::convertible_to< typename T::inner > ; // the type of the expression ` *x ` is convertible to ` T::inner `
328328 {x + 1} -> std::same_as<int >; // the expression ` x + 1 ` satisfies ` std::same_as<decltype((x + 1))> `
329- {x * 1} -> T ; // the type of the expression ` x * 1 ` is convertible to ` T `
329+ {x * 1} -> std::convertible_to< T > ; // the type of the expression ` x * 1 ` is convertible to ` T `
330330};
331331```
332332* ** Nested requirements** - denoted by the ` requires ` keyword, specify additional constraints (such as those on local parameter arguments).
You can’t perform that action at this time.
0 commit comments