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

Resolve recursive type by index #2

Open
vittorioromeo opened this issue May 9, 2017 · 0 comments
Open

Resolve recursive type by index #2

vittorioromeo opened this issue May 9, 2017 · 0 comments

Comments

@vittorioromeo
Copy link
Owner

vittorioromeo commented May 9, 2017

namespace sr = scelta::recursive;

using _ = sr::placeholder;
using builder = sr::builder<std::variant<int, std::vector<_>>>;
using type = sr::type<builder>;

Currently, to resolve the vector, the user has to say:

using vector_type = sr::resolve<builder, std::vector<_>>;

It would probably be nicer to say:

using vector_type = sr::resolve_nth<builder, 1>;
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

1 participant