These are chat archives for boostorg/hana

2nd
Nov 2015
Jason Rice
@ricejasonf
Nov 02 2015 23:13
Hello again. It would be cool if map had a default constructor. I added a simple one, and it passes all of the tests.
without it I was passing around tuple of pairs and calling unpack/make_map at the point of instantiation
Louis Dionne
@ldionne
Nov 02 2015 23:16
@ricejasonf How would you even default-construct a map? According to the documentation, hana::map<…> is implementation-defined. Thus, you can’t even write hana::map<hana::pair<…>, han::pair<…>> map{}, because you don’t know what the template arguments of hana::map<…> can be.
Jason Rice
@ricejasonf
Nov 02 2015 23:17
something like decltype(hana::make_map(...))
i export it as a type that i pass as a parameter to a template where the class would have a member like MyMap mymap;
Louis Dionne
@ldionne
Nov 02 2015 23:21
I’ll think about this and the implications that it might have. Off the top of my head, I’d be tempted to say that your decltype(…) shouldn’t be allowed by the library. However, I don’t have a clear argument right now and I also know it would be much more convenient to have the right to say hana::map<hana::pair<…>, …>. I’ll follow up later in boostorg/hana#197, as I can’t look into it right now.
It would also be helpful if you could comment on that issue and provide a bit of context surrounding your issue.
Jason Rice
@ricejasonf
Nov 02 2015 23:23
i will.. i'll try to make an example use case
Louis Dionne
@ldionne
Nov 02 2015 23:23
Thanks a lot.