diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h --- a/llvm/include/llvm/ADT/STLExtras.h +++ b/llvm/include/llvm/ADT/STLExtras.h @@ -79,13 +79,6 @@ typename std::add_const::type>::type; }; -/// Utilities for detecting if a given trait holds for some set of arguments -/// 'Args'. For example, the given trait could be used to detect if a given type -/// has a copy assignment operator: -/// template -/// using has_copy_assign_t = decltype(std::declval() -/// = std::declval()); -/// bool fooHasCopyAssign = is_detected::value; namespace detail { template using void_t = void; template class Op, class... Args> struct detector { @@ -97,16 +90,23 @@ }; } // end namespace detail +/// Utilities for detecting if a given trait holds for some set of arguments +/// 'Args'. For example, the given trait could be used to detect if a given type +/// has a copy assignment operator: +/// template +/// using has_copy_assign_t = decltype(std::declval() +/// = std::declval()); +/// bool fooHasCopyAssign = is_detected::value; template