These are chat archives for boostorg/hana

Mar 2016
Louis Dionne
Mar 23 2016 22:24 UTC
@ricejasonf What would you answer to this? I mean, it’s not possible right now but I’m definitely sympathetic to the use case.
I could say “use a make_yourtype function that deduces the type of the map", but it’s inconvenient. The only other thing I could think about is to have hana::map<pairs…> be the same as decltype(hana::make_map(std::declval<Pairs>()…)), but that type would still be an ugly beast.
Jason Rice
Mar 23 2016 22:51 UTC
I guess I could see a metafunction that hides the ugly decltype(hana::make_map(std::declval<Pairs>()…)), but the real question is why does he need the type before he makes it?
would he even need the declval if he wrapped the same expression in decltype?
using MyMap = decltype(hana::make_map(
    hana::make_pair(hana::type_c<int>, 2),
    hana::make_pair(hana::type_c<char const*>, "hi"),
    hana::make_pair(hana::type_c<double>, 3.0)