//===----------------------------------------------------------------------===// // // 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 forward_list // { // public: // typedef T value_type; // typedef Allocator allocator_type; // // typedef value_type& reference; // typedef const value_type& const_reference; // typedef typename allocator_traits::pointer pointer; // typedef typename allocator_traits::const_pointer const_pointer; // typedef typename allocator_traits::size_type size_type; // typedef typename allocator_traits::difference_type difference_type; // ... // }; #include #include #include "min_allocator.h" int main() { { typedef std::forward_list 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), ""); } #if __cplusplus >= 201103L { typedef std::forward_list> 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), ""); // 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 }