//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template , // class Allocator = allocator> // class set // { // public: // // types: // typedef Key key_type; // typedef key_type value_type; // typedef Compare key_compare; // typedef key_compare value_compare; // typedef Allocator allocator_type; // typedef typename allocator_type::reference reference; // typedef typename allocator_type::const_reference const_reference; // typedef typename allocator_type::pointer pointer; // typedef typename allocator_type::const_pointer const_pointer; // typedef typename allocator_type::size_type size_type; // typedef typename allocator_type::difference_type difference_type; // ... // }; #include #include #include "../../min_allocator.h" int main() { { static_assert((std::is_same::key_type, int>::value), ""); static_assert((std::is_same::value_type, int>::value), ""); static_assert((std::is_same::key_compare, std::less >::value), ""); static_assert((std::is_same::value_compare, std::less >::value), ""); static_assert((std::is_same::allocator_type, std::allocator >::value), ""); static_assert((std::is_same::reference, int&>::value), ""); static_assert((std::is_same::const_reference, const int&>::value), ""); static_assert((std::is_same::pointer, int*>::value), ""); static_assert((std::is_same::const_pointer, const int*>::value), ""); static_assert((std::is_same::size_type, std::size_t>::value), ""); static_assert((std::is_same::difference_type, std::ptrdiff_t>::value), ""); } #if __cplusplus >= 201103L { static_assert((std::is_same, min_allocator>::key_type, int>::value), ""); static_assert((std::is_same, min_allocator>::value_type, int>::value), ""); static_assert((std::is_same, min_allocator>::key_compare, std::less >::value), ""); static_assert((std::is_same, min_allocator>::value_compare, std::less >::value), ""); static_assert((std::is_same, min_allocator>::allocator_type, min_allocator >::value), ""); static_assert((std::is_same, min_allocator>::reference, int&>::value), ""); static_assert((std::is_same, min_allocator>::const_reference, const int&>::value), ""); static_assert((std::is_same, min_allocator>::pointer, min_pointer>::value), ""); static_assert((std::is_same, min_allocator>::const_pointer, min_pointer>::value), ""); static_assert((std::is_same, min_allocator>::size_type, std::size_t>::value), ""); static_assert((std::is_same, min_allocator>::difference_type, std::ptrdiff_t>::value), ""); } #endif }