forked from OSchip/llvm-project
Adding an STL-like type trait that is duplicated in multiple places in Clang.
This trait is used by several AST visitor classes to control whether the AST is visiting const nodes or non-const nodes. These uses cannot be easily replaced with the STL traits directly due to use of an unspecialized templated when a type is expected (due to the template template parameter involved). llvm-svn: 348729
This commit is contained in:
parent
7ca55323ce
commit
39af9ba544
|
@ -71,6 +71,9 @@ template <typename B1, typename... Bn>
|
|||
struct conjunction<B1, Bn...>
|
||||
: std::conditional<bool(B1::value), conjunction<Bn...>, B1>::type {};
|
||||
|
||||
template <typename T> struct make_const_ptr {
|
||||
using type = std::add_pointer_t<std::add_const_t<T>>;
|
||||
};
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Extra additions to <functional>
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
Loading…
Reference in New Issue