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

Should alloy::unpack be implicit? #6

Open
brunocodutra opened this issue Jul 29, 2017 · 0 comments
Open

Should alloy::unpack be implicit? #6

brunocodutra opened this issue Jul 29, 2017 · 0 comments

Comments

@brunocodutra
Copy link
Owner

currently in order to use std::tuples and std::variants as Sources, one has to be explicit:

auto tup = std::make_tuple(1, '1', "one");

alloy::unpack(tup) >> sink; // equivalent to sink(1, '1', "one");

std::variant<int, char, std::string> var = "two"; 

alloy::unpack(var) >> sink; // equivalent to sink("two");

// or even
alloy::unpack(tup, var) >> sink; // equivalent to sink(1, '1', "one", "two");

should alloy::unpack be implicit instead?

auto tup = std::make_tuple(1, '1', "one");

tup >> sink; // equivalent to sink(1, '1', "one");

std::variant<int, char, std::string> var = "two"; 

var >> sink; // equivalent to sink("two");

alloy::join(tup, var) >> sink; // equivalent to sink(1, '1', "one", "two");
@brunocodutra brunocodutra changed the title Consider making alloy::unpack implicit Should alloy::unpack be implicit? Jul 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant