https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96355
Robert Douglas changed:
What|Removed |Added
CC||rwdougla at gmail dot com
--- Comment
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rwdougla at gmail dot com
Target Milestone: ---
It appears I can no longer use a Concept within the if-constexpr's expression.
I receive the error:
:26:58: error: expected unqualified-id before ')'
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rwdougla at gmail dot com
Target Milestone: ---
int foo(int) { return 0; }
template
struct Foo
{
bool val = requires {
{foo(T{})} -> int;
};
};
int main()
{
Fo
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rwdougla at gmail dot com
Target Milestone: ---
static_assert fires inside c++/7.2.0/type_traits:2259:7
Godbolt link: https://godbolt.org/g/raan9j
Pasted here: (compiler flags are -std=c++1z
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82171
--- Comment #1 from Robert Douglas ---
I came about this, transitioning from habits using SFINAE. I have just realized
I can simplify it to:
template
concept bool MapLike = requires(T t) {
{t[typename T::value_type::first_type{}]}
->