typedef typename allocator_traits<__begin_node_allocator>::pointer
__begin_node_pointer;
- static_assert((!is_same<allocator_type, __node_allocator>::value),
- "internal allocator type must differ from user-specified "
- "type; otherwise overload resolution breaks");
-
- static_assert(is_same<allocator_type, __rebind_alloc<__node_traits, value_type> >::value,
- "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
- "original allocator");
-
__compressed_pair<__begin_node, __node_allocator> __before_begin_;
_LIBCPP_INLINE_VISIBILITY
typedef _Tp value_type;
typedef _Alloc allocator_type;
- static_assert((is_same<typename allocator_type::value_type, value_type>::value),
+ static_assert(is_same<value_type, typename allocator_type::value_type>::value,
"Allocator::value_type must be same type as value_type");
+ static_assert(is_same<allocator_type, __rebind_alloc<allocator_traits<allocator_type>, value_type> >::value,
+ "[allocator.requirements] states that rebinding an allocator to the same type should result in the "
+ "original allocator");
+
+ static_assert((!is_same<allocator_type, __node_allocator>::value),
+ "internal allocator type must differ from user-specified "
+ "type; otherwise overload resolution breaks");
+
typedef value_type& reference;
typedef const value_type& const_reference;
typedef typename allocator_traits<allocator_type>::pointer pointer;
typedef _Tp value_type;
typedef _Alloc allocator_type;
static_assert((is_same<value_type, typename allocator_type::value_type>::value),
- "Invalid allocator::value_type");
+ "Allocator::value_type must be same type as value_type");
typedef value_type& reference;
typedef const value_type& const_reference;
typedef typename base::pointer pointer;
typedef value_type& reference;
typedef const value_type& const_reference;
static_assert((is_same<value_type, typename allocator_type::value_type>::value),
- "Invalid allocator::value_type");
+ "Allocator::value_type must be same type as value_type");
private:
typedef __hash_value_type<key_type, mapped_type> __value_type;
typedef value_type& reference;
typedef const value_type& const_reference;
static_assert((is_same<value_type, typename allocator_type::value_type>::value),
- "Invalid allocator::value_type");
+ "Allocator::value_type must be same type as value_type");
private:
typedef __hash_value_type<key_type, mapped_type> __value_type;
typedef value_type& reference;
typedef const value_type& const_reference;
static_assert((is_same<value_type, typename allocator_type::value_type>::value),
- "Invalid allocator::value_type");
+ "Allocator::value_type must be same type as value_type");
static_assert(is_same<allocator_type, __rebind_alloc<allocator_traits<allocator_type>, value_type> >::value,
"[allocator.requirements] states that rebinding an allocator to the same type should result in the "
typedef value_type& reference;
typedef const value_type& const_reference;
static_assert((is_same<value_type, typename allocator_type::value_type>::value),
- "Invalid allocator::value_type");
+ "Allocator::value_type must be same type as value_type");
private:
typedef __hash_table<value_type, hasher, key_equal, allocator_type> __table;
#include <map>
-int main(int, char**)
-{
- std::map<int, int, std::less<int>, std::allocator<long> > m;
-
- return 0;
-}
+std::map<int, int, std::less<int>, std::allocator<long> > m;
+ // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}Allocator::value_type must be same type as value_type}}
#include <map>
-int main(int, char**)
-{
- std::multimap<int, int, std::less<int>, std::allocator<long> > m;
-
- return 0;
-}
+std::multimap<int, int, std::less<int>, std::allocator<long> > m;
+ // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}Allocator::value_type must be same type as value_type}}
#include <set>
-int main(int, char**)
-{
- std::set<int, std::less<int>, std::allocator<long> > s;
-
- return 0;
-}
+std::multiset<int, std::less<int>, std::allocator<long> > m;
+ // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}Allocator::value_type must be same type as value_type}}
#include <set>
-int main(int, char**)
-{
- std::multiset<int, std::less<int>, std::allocator<long> > ms;
-
- return 0;
-}
+std::set<int, std::less<int>, std::allocator<long> > m;
+ // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}Allocator::value_type must be same type as value_type}}
static_assert(std::ranges::bidirectional_range<range const>);
static_assert(!std::ranges::random_access_range<range const>);
static_assert(std::ranges::common_range<range const>);
-static_assert(std::ranges::input_range<range>);
+static_assert(std::ranges::input_range<range const>);
static_assert(!std::ranges::view<range const>);
static_assert(std::ranges::sized_range<range const>);
static_assert(!std::ranges::borrowed_range<range const>);
#include <deque>
-int main(int, char**)
-{
- std::deque<int, std::allocator<long> > d;
-
- return 0;
-}
+std::deque<int, std::allocator<long> > d;
+ // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}Allocator::value_type must be same type as value_type}}
#include <forward_list>
-int main(int, char**)
-{
- std::forward_list<int, std::allocator<long> > fl;
-
- return 0;
-}
+std::forward_list<int, std::allocator<long> > fl;
+ // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}Allocator::value_type must be same type as value_type}}
#include <list>
-int main(int, char**)
-{
- std::list<int, std::allocator<long> > l;
-
- return 0;
-}
+std::list<int, std::allocator<long> > l;
+ // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}Allocator::value_type must be same type as value_type}}
#include <vector>
-int main(int, char**)
-{
- std::vector<int, std::allocator<long> > v;
-
- return 0;
-}
+std::vector<int, std::allocator<long> > v;
+ // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}Allocator::value_type must be same type as value_type}}
#include <unordered_map>
-int main(int, char**)
-{
- std::unordered_map<int, int, std::hash<int>, std::less<int>, std::allocator<long> > m;
-
- return 0;
-}
+std::unordered_map<int, int, std::hash<int>, std::less<int>, std::allocator<long> > m;
+ // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}Allocator::value_type must be same type as value_type}}
#include <unordered_map>
-int main(int, char**)
-{
- std::unordered_multimap<int, int, std::hash<int>, std::less<int>, std::allocator<long> > m;
-
- return 0;
-}
+std::unordered_multimap<int, int, std::hash<int>, std::less<int>, std::allocator<long> > m;
+ // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}Allocator::value_type must be same type as value_type}}
#include <unordered_set>
-int main(int, char**)
-{
- std::unordered_set<int, std::hash<int>, std::less<int>, std::allocator<long> > v;
-
- return 0;
-}
+std::unordered_multiset<int, std::hash<int>, std::less<int>, std::allocator<long> > v;
+ // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}Allocator::value_type must be same type as value_type}}
#include <unordered_set>
-int main(int, char**)
-{
- std::unordered_multiset<int, std::hash<int>, std::less<int>, std::allocator<long> > v;
-
- return 0;
-}
+std::unordered_set<int, std::hash<int>, std::less<int>, std::allocator<long> > v;
+ // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}Allocator::value_type must be same type as value_type}}