Boost logo

Boost Users :

From: Maik Beckmann (beckmann.maik_at_[hidden])
Date: 2008-05-17 16:06:54


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
<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%5ftree+gcc
  </link>
to get
  libs/property_tree/test/sandbox.cpp
compiled.


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