Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concepts and meta::lambda #65

Open
CaseyCarter opened this issue Jan 14, 2019 · 1 comment
Open

Concepts and meta::lambda #65

CaseyCarter opened this issue Jan 14, 2019 · 1 comment

Comments

@CaseyCarter
Copy link
Contributor

There are issues in the interaction between the concept constraints in meta and the lambda implementation that need to be investigated. Concepts are applied when forming a template-id, even before instantiation, so e.g.:

template<class> concept Foo = false;
template<Foo T> struct X;
using U = X<int>; // ill-formed despite not instantiating X<int>

Yet the implementation of lambdas relies on the ability to name "invalid" specializations which are later pattern-matched and substituted into valid specializations. GCC's concept implementation is lax enough that we've been getting by with some cheating in cmcstl2, but clang-concepts (and I suspect other implementations of C++20 concepts) refuses to compile the lambda test cases in meta.cpp.

@kedarbhat
Copy link
Contributor

kedarbhat commented Jan 15, 2019

Working my way down meta.cpp, on line 67 (the last type alias (outer) in Res tuple_cat(Tuples &&... tpls)):
quote_i<std::size_t, make_index_sequence> fails Invocable (in a static_assert). quote<std::index_sequence_for> as a replacement works (not a good solution, but at least allows me down to the lambda tests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants