//===----------------------------------------------------------------------===// // // 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. // //===----------------------------------------------------------------------===// // // insert_iterator // Test nested types and data members: // template // class insert_iterator { // protected: // Cont* container; // Cont::iterator iter; // public: // typedef Cont container_type; // typedef void value_type; // typedef void difference_type; // typedef insert_iterator& reference; // typedef void pointer; // }; #include #include #include template struct find_members : private std::insert_iterator { explicit find_members(C& c) : std::insert_iterator(c, c.begin()) {} void test() { this->container = 0; (void)(this->iter == this->iter); } }; template void test() { typedef std::insert_iterator R; C c; find_members q(c); q.test(); 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), ""); } int main() { test >(); }