//===----------------------------------------------------------------------===// // // 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 multimap // { // public: // // types: // typedef Key key_type; // typedef T mapped_type; // typedef pair value_type; // typedef Compare key_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::multimap 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 __cplusplus >= 201103L { typedef std::multimap, 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 }