On 01/05/2014 09:13 a.m., Roland Bock wrote:
On 2014-05-01 05:10, Agustín K-ballo Bergé wrote:
On 30/04/2014 07:34 p.m., Louis Dionne wrote:
As an aside, I think your `all_t` and `any_t` metafunctions could be more efficient. I'm currently (literally right now) benchmarking different implementations for those; I will notify you if there is a better alternative.
I don't know which implementations you are considering (are they publicly available online?), but here is one I found to perform good enough:
https://github.com/eggs-cpp/tupleware/blob/draft/include/eggs/tupleware/core...
Very cool, indeed. The only drawback in my eyes is that the logic of using noexcept is a bit convoluted.
That got me thinking, and here's a new version. Even faster (at least on my setup, see below), and very easy to read, I think:
// ------------------------------ #include
template
struct all_helper {}; template
using all_t = std::is_same , all_helper<(true or Bs)...>>; // --------------------------------
Awesome results, and the technique is so simple! I'm going to keep this approach in mind for other possible use cases in the future. Regards, -- Agustín K-ballo Bergé.- http://talesofcpp.fusionfenix.com