Noticed that std::allocator<const T> was missing the definition for is_always_equal. Fixed this, and added a test for it.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@241190 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
// typedef typename add_lvalue_reference<T>::type reference;
|
||||
// typedef typename add_lvalue_reference<const T>::type const_reference;
|
||||
// typedef T value_type;
|
||||
// typedef true_type is_always_equal;
|
||||
//
|
||||
// template <class U> struct rebind {typedef allocator<U> other;};
|
||||
// ...
|
||||
@@ -42,6 +43,10 @@ int main()
|
||||
static_assert((std::is_same<std::allocator<char>::const_reference, const char&>::value), "");
|
||||
static_assert((std::is_same<std::allocator<char>::rebind<int>::other,
|
||||
std::allocator<int> >::value), "");
|
||||
|
||||
static_assert((std::is_same<std::allocator< char>::is_always_equal, std::true_type>::value), "");
|
||||
static_assert((std::is_same<std::allocator<const char>::is_always_equal, std::true_type>::value), "");
|
||||
|
||||
std::allocator<char> a;
|
||||
std::allocator<char> a2 = a;
|
||||
a2 = a;
|
||||
|
Reference in New Issue
Block a user