C++ Logo

STD-DISCUSSION

Advanced search

Subject: requires-clause, pack expansion and constraints-ordering
From: tobi_at_[hidden]
Date: 2021-03-28 07:10:03


While playing with concepts and parameter-packs, I tried to expand a
pack inside a requires-clause:
It worked wrt. concept-checking but it failed to create the right
constraints-ordering for overload resolution.

Here is an example, showing the problem: https://godbolt.org/z/onnTYPzzj

According to N4861, [temp.variadic] (10.4) an expansion of a
fold-expression is mere a rewrite.
So, I would have expected, that constraints-ordering also works with
packs, but it seems that clang, gcc and msvc disagree.

Tobias


STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups