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

Maik Beckmann wrote:
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?
Is that not allowed? VC++ compiles it. I don't know of any rule that would disallow it...

Am Samstag 17 Mai 2008 00:26:36 schrieb Noah Roberts:
Maik Beckmann wrote:
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?
Is that not allowed? VC++ compiles it. I don't know of any rule that would disallow it...
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:
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
This issue strikes boost.property_tree

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