4 Jul
2016
4 Jul
'16
9:10 p.m.
Vicente J. Botet Escriba
Hi,
On the C++ standard meating in Oulu, we decided to make the std::overload function constexpr and conditionaly noexcept and ensure that the overloaded functions shall be constexpr if the stored finctions are.
I don't find in the reference documentation of Hana and Fit any reference of whether the overloaded functions preserve constexpr or not.
The usual rule that's valid across Hana is that whenever the inputs are constexpr, the outputs are constexpr too. Hence, when you use `hana::overload` with constexpr functions, the result will be constexpr. And if these functions can be called in a constant expression, then so does the resulting `hana::overload`. Regards, Louis