In the following function:
namespace hana = boost::hana;
template<typename T>
constexpr auto f(const T& obj){
constexpr int size = hana::length(obj);
}
When called e.g. with f(hana::make_tuple())
, it produces an error:
constexpr variable 'size' must be initialized by a constant expression.
Passing by value doesn't have issues.
Does anyone know the reason and how to work around it?