hana icon indicating copy to clipboard operation
hana copied to clipboard

Constructor Template Auto Deduction guides

Open rmpowell77 opened this issue 6 years ago • 0 comments

It seems with Hana in Boost 1.67 it doesn't have Compiler Template Auto Deduction guides.

This doesn't compile:

#include <boost/hana.hpp>

namespace hana = boost::hana;

int main() {
    auto args = hana::tuple(10, 0.5, "hello world");
}

But if we add some deduction guides, it can compile:

#include <boost/hana.hpp>

namespace hana = boost::hana;

namespace boost::hana {
    template <typename... Args>
    tuple(Args&&...) -> tuple<Args...>;
}

int main() {
    auto args = hana::tuple(10, 0.5, "hello world");
}

Would be a good addition.

rmpowell77 avatar Jul 21 '18 00:07 rmpowell77