id summary reporter owner description type status milestone component version severity resolution keywords cc 1610 [MSVC/STLport] [tree/common.hpp] Standard library requirements violation(incomplete type as vector parameter) archimed7592+svc@… Joel de Guzman "'''boost/spirit/tree/common.hpp''' {{{ template struct tree_node { typedef T parse_node_t; #if !defined(BOOST_SPIRIT_USE_BOOST_ALLOCATOR_FOR_TREES) typedef std::allocator > allocator_type; #elif !defined(BOOST_SPIRIT_USE_LIST_FOR_TREES) typedef boost::pool_allocator > allocator_type; #else typedef boost::fast_pool_allocator > allocator_type; #endif #if !defined(BOOST_SPIRIT_USE_LIST_FOR_TREES) typedef std::vector, allocator_type> children_t; #else typedef std::list, allocator_type> children_t; #endif // BOOST_SPIRIT_USE_LIST_FOR_TREES typedef typename children_t::iterator tree_iterator; typedef typename children_t::const_iterator const_tree_iterator; }}} The problem: ''children_t::blablabla'' triggers implicit instantiation of ''children_t'', which have ''tree_node'' as its template parameter i.e. incomplete type. This code violates '''17.4.3.6/2''' {{{ In particular, the effects are undefined in the following cases: ... — if an incomplete type (3.9) is used as a template argument when instantiating a template component. }}} It works with almost all STL implementations, but not with STLport-5.1.5/MSVC-8.0-SP1.[[BR]] ---- '''Build log:''' {{{ instantiate_cpp_grammar.cpp STLport: Auto linking to stlportstld.5.1.lib E:\.my\projects\install\.msvc\STLport-5.1.5\stlport\stl/type_traits.h(249) : error C2139: 'boost::spirit::tree_node' : an undefined class is not allowed as an argument to compiler intrinsic type trait '__has_trivial_constructor' with [ T=boost::spirit::node_val_data,boost::spirit::nil_t> ] E:\.my\projects\install\.msvc\STLport-5.1.5\stlport\stl/_vector.h(137) : see reference to class template instantiation 'stlpd_std::__type_traits<_Tp>' being compiled with [ _Tp=boost::spirit::tree_node,boost::spirit::nil_t>> ] E:\.my\projects\install\.msvc\STLport-5.1.5\stlport\stl/debug/_iterator.h(381) : see reference to class template instantiation 'stlpd_std::priv::_NonDbg_vector<_Tp,_Alloc>' being compiled with [ _Tp=boost::spirit::tree_node,boost::spirit::nil_t>>, _Alloc=stlpd_std::allocator,boost::spirit::nil_t>>> ] E:\.my\projects\install\.msvc\STLport-5.1.5\stlport\stl/debug/_vector.h(106) : see reference to class template instantiation 'stlpd_std::priv::__construct_checker<_Container>' being compiled with [ _Container=stlpd_std::priv::_NonDbg_vector,boost::spirit::nil_t>>,stlpd_std::allocator,boost::spirit::nil_t>>>> ] .\boost/spirit/tree/common.hpp(69) : see reference to class template instantiation 'stlpd_std::vector<_Tp,_Alloc>' being compiled with [ _Tp=boost::spirit::tree_node,boost::spirit::nil_t>>, _Alloc=stlpd_std::allocator,boost::spirit::nil_t>>> ] .\boost/spirit/tree/common.hpp(542) : see reference to class template instantiation 'boost::spirit::tree_node' being compiled with [ T=boost::spirit::node_val_data,boost::spirit::nil_t> ] .\boost/spirit/tree/common.hpp(1454) : see reference to class template instantiation 'boost::spirit::tree_match' being compiled with [ IteratorT=boost::wave::cpplexer::lex_iterator, NodeFactoryT=boost::wave::grammars::cpp_grammar_gen::node_factory_type, T=boost::spirit::nil_t ] .\boost/wave/grammars/cpp_grammar.hpp(723) : see reference to class template instantiation 'boost::spirit::tree_parse_info' being compiled with [ IteratorT=boost::wave::cpplexer::lex_iterator, NodeFactoryT=boost::wave::grammars::cpp_grammar_gen::node_factory_type ] .\boost/wave/grammars/cpp_grammar.hpp(723) : while compiling class template member function 'boost::spirit::tree_parse_info boost::wave::grammars::cpp_grammar_gen::parse_cpp_grammar(const boost::wave::cpplexer::lex_iterator &,const boost::wave::cpplexer::lex_iterator &,const boost::wave::util::file_position &,bool &,boost::wave::cpplexer::lex_token<> &,stlpd_std::list<_Tp,_Alloc> &)' with [ IteratorT=boost::wave::cpplexer::lex_iterator, NodeFactoryT=boost::wave::grammars::cpp_grammar_gen::node_factory_type, LexIteratorT=lexer_type, TokenContainerT=token_sequence_type, TokenT=token_type, StringT=boost::wave::util::flex_string,stlpd_std::allocator,boost::wave::util::CowString>>, _Tp=token_type, _Alloc=boost::fast_pool_allocator ] libs\wave\src\instantiate_cpp_grammar.cpp(47) : see reference to class template instantiation 'boost::wave::grammars::cpp_grammar_gen' being compiled with [ LexIteratorT=lexer_type, TokenContainerT=token_sequence_type ] }}} " Bugs closed Boost 1.36.0 spirit Boost 1.34.1 Problem wontfix stlport