Open goertzenator opened 10 years ago
Please have a look: https://github.com/chrta/message_queuex/commit/8a57b6aabf796814b9bf795fc727323d7a6cc652
This works with std:tie() and std::tuple().
I also have an uncommitted variation that implements rvalue tuples, but I think it had some limitations. Consider some of these wrinkles:
I didn't try your code so I don't know how it holds up to the above properties, but I think I had some problems with them in my code. I'll have to take a closer look (and add unit tests) to see if either of us actually resolved them.
nifpp::get should accept an rvalue tuple consisting of lvalue references. Currently only lvalue tuples are accepted.
We want the following to work:
int a,b; nifpp::get_throws(env, term, std::tie(a,b)); // crack {123, 456}