Workaround Clang bug regarding template template parameters

llvm-svn: 300411
This commit is contained in:
Eric Fiselier 2017-04-16 02:47:46 +00:00
parent 843d910103
commit b7576b892b
1 changed files with 11 additions and 5 deletions

View File

@ -46,17 +46,23 @@ using EnableIfNotSame = typename std::enable_if<
!std::is_same<typename std::decay<T>::type, typename std::decay<U>::type>::value
>::type;
template <template <int> class Templ, class Other>
struct is_specialization : std::false_type {};
template <class Templ, class Other>
struct is_specialization;
template <template <int> class Templ, int ID>
struct is_specialization<Templ, Templ<ID> > : std::true_type {};
template <template <int> class Templ, int ID1, class Other>
struct is_specialization<Templ<ID1>, Other> : std::false_type {};
template <template <int> class Templ, class Other>
template <template <int> class Templ, int ID1, int ID2>
struct is_specialization<Templ<ID1>, Templ<ID2> > : std::true_type {};
template <class Templ, class Other>
using EnableIfSpecialization = typename std::enable_if<
is_specialization<Templ, typename std::decay<Other>::type >::value
>::type;
template <int ID> struct TrackingDeleter;
template <int ID> struct ConstTrackingDeleter;
template <int ID>
struct TrackingDeleter {
TrackingDeleter() : arg_type(&makeArgumentID<>()) {}