c++14 - Counterpart to std::enable_if_t -
std::enable_if_t
gets type if value true. want thing gets type if expression well-formed. if type want void
, can decltype((void)(expr))
. should if want other void
? want succinct , elegant solution.
you can use this:
template<typename t> struct well_formed : std::true_type{};
and combine enable_if_t
Comments
Post a Comment