brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 0870f60 Raw
78 lines · c
1#pragma clang system_header2 3namespace std {4 5template<class T, T v>6struct integral_constant {7    static constexpr T value = v;8    typedef T value_type;9    typedef integral_constant type;10    constexpr operator value_type() const noexcept { return value; }11};12 13template <bool B>14using bool_constant = integral_constant<bool, B>;15using true_type = bool_constant<true>;16using false_type = bool_constant<false>;17 18template<class T>19struct is_error_code_enum : false_type {};20 21template <class T>22void swap(T &a, T &b);23 24enum class io_errc {25  stream = 1,26};27 28template <class... Types>29class tuple;30 31template <typename T = void>32class less;33 34template <>35class less<void> {36public:37  template <typename T, typename U>38  bool operator()(T &&Lhs, U &&Rhs) const {39    return static_cast<T &&>(Lhs) < static_cast<U &&>(Rhs);40  }41  template <typename A, typename B = int>42  struct X {};43};44 45template <class Key>46struct hash;47 48template <class T>49class numeric_limits;50 51struct Outer {52  struct Inner {};53};54 55namespace detail {56struct X {};57} // namespace detail58 59} // namespace std60 61// Template specializations that are in a system-header file.62// The purpose is to test bugprone-std-namespace-modification (no warnings here).63namespace std {64template <>65void swap<short>(short &, short &){};66 67template <>68struct is_error_code_enum<short> : true_type {};69 70template <>71bool less<void>::operator()<short &&, short &&>(short &&, short &&) const {72  return false;73}74 75template <>76struct less<void>::X<short> {};77} // namespace std78