Can static/dynamic/const/reinterpret_cast be used in unevaluated context?
I tried to provide structures for checking is A is (choose cast)-castable to B . All four casts would have exact same implementation, expect their names (local-macro-able definitions would be possible, but not necessary). I wrote many check-for operators structures, for example: #include <iostream> #include <type_traits> #include <string> template<class, class, class, class = void> struct is_valid_ternary_operator : std::false_type { }; template<class T, class S, class R> struct is_valid_ternary_operator <T, S, R, std::void_t<decltype(std::declval<T>() ? std::declval<S>() : std::declval<R>())>