C++ Logo

std-discussion

Advanced search

Requires expressions: local parameters

From: Vladimir Grigoriev <vlad.moscow_at_[hidden]>
Date: Thu, 08 Aug 2019 12:09:02 +0300
From the description of the requires expressions (C++20) it is not clear what is a valid local declaration and whether they are estimated the same way as the type-requirement.

Fro example it is impossible to say based on the description of the requires expressions in the C++ Standard whether this local parameter declaration is valid

template <typename T>
requires requires ( typename T::value_type x ) { /* ... */ }
struct A {};

Will the decl-specifier typename T::value_type be considered as a type-requirement and evaluated to true or false?

So in my opinion the description is incomplete. It should describe such a case.

With best regards.
Vlad from Moscow

You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com

Received on 2019-08-08 04:11:04