//===----------------------------------------------------------------------===// // // 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() { { typedef std::set C; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same >::value), ""); static_assert((std::is_same >::value), ""); static_assert((std::is_same >::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); } #if TEST_STD_VER >= 11 { typedef std::set, min_allocator> C; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same >::value), ""); static_assert((std::is_same >::value), ""); static_assert((std::is_same >::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same>::value), ""); static_assert((std::is_same>::value), ""); // min_allocator doesn't have a size_type, so one gets synthesized static_assert((std::is_same::type>::value), ""); static_assert((std::is_same::value), ""); } #endif }