LWG Issue 2162: mark allocator_traits::maxsize as noexcept
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189399 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
// template <class Alloc>
|
||||
// struct allocator_traits
|
||||
// {
|
||||
// static size_type max_size(const allocator_type& a);
|
||||
// static size_type max_size(const allocator_type& a) noexcept;
|
||||
// ...
|
||||
// };
|
||||
|
||||
@@ -61,4 +61,10 @@ int main()
|
||||
const B<int> b = {};
|
||||
assert(std::allocator_traits<B<int> >::max_size(b) == 100);
|
||||
}
|
||||
#if __cplusplus >= 201103
|
||||
{
|
||||
std::allocator<int> a;
|
||||
static_assert(noexcept(std::allocator_traits<std::allocator<int>>::max_size(a)) == true, "");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user