Add tests for missing typedefs in flat containers

This commit is contained in:
Christian Mazakas
2022-10-24 09:54:57 -07:00
parent 01053738eb
commit 375d7157b6
3 changed files with 14 additions and 0 deletions

View File

@ -75,6 +75,9 @@ namespace boost {
using allocator_type = Allocator;
using reference = value_type&;
using const_reference = value_type const&;
using pointer = typename boost::allocator_pointer<allocator_type>::type;
using const_pointer =
typename boost::allocator_const_pointer<allocator_type>::type;
using iterator = typename table_type::iterator;
using const_iterator = typename table_type::const_iterator;

View File

@ -57,6 +57,9 @@ namespace boost {
using allocator_type = Allocator;
using reference = value_type&;
using const_reference = value_type const&;
using pointer = typename boost::allocator_pointer<allocator_type>::type;
using const_pointer =
typename boost::allocator_const_pointer<allocator_type>::type;
using iterator = typename table_type::iterator;
using const_iterator = typename table_type::const_iterator;

View File

@ -75,6 +75,14 @@ template <class X, class T> void container_test(X& r, T const&)
#endif
typedef typename X::allocator_type allocator_type;
typedef typename X::pointer pointer;
typedef typename X::const_pointer const_pointer;
BOOST_STATIC_ASSERT((boost::is_same<pointer,
typename boost::allocator_pointer<allocator_type>::type>::value));
BOOST_STATIC_ASSERT((boost::is_same<const_pointer,
typename boost::allocator_const_pointer<allocator_type>::type>::value));
// value_type