Boost logo

Boost Users :

From: Maik Beckmann (beckmann.maik_at_[hidden])
Date: 2008-05-16 18:50:21


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net