Does C++ have a standard way which do the same things as std::__and_
and std::__or_
do? I always using them in my private project, but now I'm writing a public project, and these template helper seems not part of the C++ STL API, so is there a standard way? The worst case I can see is to copy the std::__and_
from the header to my project, but I think this is not very elegant.
An example:
// if a type is a pointer or a reference, do some thing.
template<typename T>
std::enable_if_t<std::__or_<std::is_pointer<T>, std::is_reference<T>>::type>
DoSomething(T t) {
// do something
}