For example, I want to write something like this in a class method.
if constexpr (boost::hana::contains(this->map_, "name"_s)){
std::cout << this->map_["name"_s] << std::endl;
}
Unfortunately, c++ prohibits the use of this in if constexpr. How am I supposed to use hana here? Sorry if this has already been asked, I couldn't find anything similar.
For example, I want to write something like this in a class method.
Unfortunately, c++ prohibits the use of
this
inif constexpr
. How am I supposed to use hana here? Sorry if this has already been asked, I couldn't find anything similar.Full example Stupid workaround