template<typename T>
const T& min(const T&, const T&);
void test_min() {
(void)min(1, 2l); }
template<typename R, typename T>
R *dyn_cast(const T&);
void test_dyn_cast(int* ptr) {
(void)dyn_cast(ptr); }
template<int I, typename T>
void get(const T&); template<template<class T> class, typename T>
void get(const T&);
void test_get(void *ptr) {
get<int>(ptr); }
template<typename T>
typename T::type get_type(const T&); template<typename T>
void get_type(T *, int[(int)sizeof(T) - 9] = 0);
void test_get_type(int *ptr) {
(void)get_type(ptr); }
struct X {
template<typename T>
const T& min(const T&, const T&); };
void test_X_min(X x) {
(void)x.min(1, 2l); }
namespace boost {
template<bool, typename = void> struct enable_if {};
template<typename T> struct enable_if<true, T> { typedef T type; };
}
template<typename T> typename boost::enable_if<sizeof(T) == 4, int>::type if_size_4(); int k = if_size_4<char>();
namespace llvm {
template<typename Cond, typename T = void> struct enable_if : boost::enable_if<Cond::value, T> {};
}
template<typename T> struct is_int { enum { value = false }; };
template<> struct is_int<int> { enum { value = true }; };
template<typename T> typename llvm::enable_if<is_int<T> >::type if_int(); void test_if_int() {
if_int<char>(); }
template<typename T> struct NonTemplateFunction {
typename boost::enable_if<sizeof(T) == 4, int>::type f(); };
NonTemplateFunction<char> NTFC;
namespace NS1 {
template <class A>
class array {};
}
namespace NS2 {
template <class A>
class array {};
}
template <class A>
void foo(NS2::array<A>);
void test() {
foo(NS1::array<int>()); }
namespace std {
template<bool, typename = void> struct enable_if {};
template<typename T> struct enable_if<true, T> { typedef T type; };
template<typename T, T V> struct integral_constant { static const T value = V; };
typedef integral_constant<bool, false> false_type;
typedef integral_constant<bool, true> true_type;
};
namespace PR15673 {
template<typename T>
struct a_trait : std::false_type {};
template<typename T,
typename Requires = typename std::enable_if<a_trait<T>::value>::type>
#if __cplusplus <= 199711L
#endif
void foo() {}
void bar() { foo<int>(); }
template<typename T>
struct some_trait : std::false_type {};
template<typename T>
struct a_pony : std::enable_if<some_trait<T>::value> {};
template<typename T,
typename Requires = typename a_pony<T>::type>
#if __cplusplus <= 199711L
#endif
void baz() { } void quux() { baz<int>(); }
template <typename T>
using unicorns = typename std::enable_if<some_trait<T>::value>::type;
#if __cplusplus <= 199711L
#endif
template<typename T,
typename Requires = unicorns<T> >
#if __cplusplus <= 199711L
#endif
void wibble() {}
void wobble() { wibble<int>(); }
template<typename T>
struct some_passing_trait : std::true_type {};
#if __cplusplus <= 199711L
#endif
template<typename T,
int n = 42,
typename std::enable_if<n == 43 || (some_passing_trait<T>::value && some_trait<T>::value), int>::type = 0>
void almost_rangesv3(); void test_almost_rangesv3() { almost_rangesv3<int>(); }
#define CONCEPT_REQUIRES_(...) \
int x = 42, \
typename std::enable_if<(x == 43) || (__VA_ARGS__)>::type = 0
#if __cplusplus <= 199711L
#endif
template<typename T,
CONCEPT_REQUIRES_(some_passing_trait<T>::value && some_trait<T>::value)>
void rangesv3(); void test_rangesv3() { rangesv3<int>(); } }