Boost logo

Boost Users :

From: Kim Barrett (kab_at_[hidden])
Date: 2006-03-15 22:50:58


At 1:21 PM +0100 3/15/06, Max Schoebinger wrote:
>I also tried using the & operator, but this also results in a compiler
>error:
>
>/opt/toolkits/linux32/gcc-3.3/boost-1-33-1/include/boost-1_33_1/boost/archive/detail/oserializer.hpp:108:
>error: incomplete type
>'boost::serialization::extended_type_info_null<std::list<int,
>std::allocator<int> > >' cannot be used to name a scope

At 8:11 AM -0800 3/15/06, Robert Ramey wrote:
>Hmmm I just compiled on my system with gcc 3.3, vc 7.1, and comeau
>all without problems. I'm using the current cvs HEAD but I wouldn't
>think that would make a difference:

The error encountered by Max is the same error I recently reported on
the boost developers list, where there is an include order problem
involving nvp.hpp. This may be another occurrence of that problem. Robert
replied to my message that he believed it to be fixed post 1.33.1 in CVS;
I've been too busy to actually verify that for my encounter with this
problem yet, and just worked around the problem by tweaking the include
order. Specifically, I found that nvp.hpp must be included after including
the archive header.

I note that nvp is being included indirectly through the chain

   <boost/serialization/list.hpp>
     <boost/serialization/collections_save_imp.hpp>
       <boost/serialization/nvp.hpp>
     <boost/serialization/collections_load_imp.hpp>
       <boost/serialization/nvp.hpp>

There may be additional nested includes of nvp.hpp from list.hpp that
I didn't bother to track down.

Anyway, I suggest retrying with the program changed to include
text_archive.hpp before including list.hpp, and report back. I'm without
access to my Linux machine at the moment or I'd try it myself, since it
looks like I'm using something close to the same toolchain and boost
version as Max.


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