These are chat archives for boostorg/hana

1st
Sep 2016
hia3
@hia3
Sep 01 2016 20:14
Hello guys! Serious question this time - http://melpon.org/wandbox/permlink/bzHJ1SzTI9L3cAlL
It does not compile if operators & and *are defined (see that #if 1). Do you think it is a hana bug or gcc bug? Because cang does compile this. :-)
*clang
hia3
@hia3
Sep 01 2016 20:43
I'm iterating over hana::types, how and why it finds what's inside?
Louis Dionne
@ldionne
Sep 01 2016 23:26
I would say it’s a GCC bug. Hana uses &f on the function, but it appears that GCC incorrectly uses the operator& and operator* that you’ve defined.
Basically it’s substituting your lambda with the result of calling your operators, and obviously that’s not callable.
That’s my understanding. So I would say this is both a bug in GCC and a very bad usage of operator* with a fully unconstrained template parameter.