Talk:cpp/keyword/requires

There's no mention of non-template scenarios. I don't feel qualified to try and describe that, but the following also works

template struct Foo { T m requires (!is_void_v{}) { ... }    void m requires (is_void_v{}) { ... } };

This also works.. it's in a template class, but the method, m, itself is not considered a template, is it?


 * on this page, this case falls under "in a template declaration" (it's not done until the last {{c|};}}. On the page that line links to, cpp/language/constraints. the first sentence mentions this case "and non-template functions (typically members of class templates)" --Cubbi (talk) 06:50, 5 January 2022 (PST)