These are chat archives for boostorg/hana

2nd
Sep 2016
hia3
@hia3
Sep 02 2016 09:37
But why it does not use std::addressof or std::forward? detail::on_each<decltype(std::addressof(f))>{std::addressof(f)})
Louis Dionne
@ldionne
Sep 02 2016 15:38
It does not use std::addressof because I never thought someone would be crazy enough to have such an overload, and I try to minimize the number of function templates that are instantiated to keep the compile-times down. As to why I’m not using a reference, I left this comment in the code:
// We use a pointer instead of a reference to avoid a Clang ICE.
But still, I claim that GCC is incorrectly compiling this
s/compiling/failing at compiling
It should only fail if you were putting the overload in the global scope, but then I’m no sure I’d have any pitty.
Anyway, if this is a problem for you please file a bug report with your minimal example and I’ll see what can be done. I can probably fix that precise failure quite easily by using std::addressof, but I hope it won’t fail elsewhere where fixing it would be really bad for compile-times.