STL containers and incomplete types

Hello, Does boost got something to do this struct node { std::vector<node> children; // node is incomplete }; in a way which conform with the standard which disallows STL containers of incomplete types? thx, -- Maik

Am Samstag 17 Mai 2008 00:26:36 schrieb Noah Roberts:
It works with gcc and msvc and lost likely with many other STL implementation. However, the standard doesn't allow this and one can force the gcc STL implementation to do concept checks by defining _GLIBCXX_CONCEPT_CHECKS. These checks bring up that the code above isn't correct. -- Maik

Am Freitag 16 Mai 2008 21:32:56 schrieb Maik Beckmann:
This issue strikes boost.property_tree <boost/ptree.hpp> ... template<class C, class K, class P, class D, class X> class basic_ptree { ... typedef basic_ptree<C, K, P, D, X> self_type; ... typedef std::pair<key_type, self_type> value_type; // ..self_type is incomplete! ... typedef std::list<value_type> container_type; ... container_type m_container; <boost/ptree.hpp> -- Maik PS: I had to apply this <link> http://article.gmane.org/gmane.comp.lib.boost.devel/164866/match=property%5f... </link> to get libs/property_tree/test/sandbox.cpp compiled.

Hi all, Are there some libraries in boost (probably not yet reviewed/accepted) that could help me to implement the subj.? In the developers list archive I encountered references to something called Boost.Database - what's its status? Did someone try make custom Boost.Serialization Archive for this purpose? I'll appreciate any hint/idea. Thanks! _________________________________________________________________ Connect to the next generation of MSN Messenger http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
participants (3)
-
Igor R.
-
Maik Beckmann
-
Noah Roberts