[cfe-dev] [libc++] incomplete type 'std::__1::ios_base'

Marc Glisse marc.glisse at inria.fr
Sat Sep 10 01:38:19 PDT 2011


On Sat, 10 Sep 2011, Ryuta Suzuki wrote:

> I've got the following compilation error while attempting to build
> boost-1.47.0 with 'clang++ -stdlib=libc++':
[...]
> In file included from ../boost/wave/wave_config.hpp:229:
> ../boost/wave/util/flex_string.hpp:2573:34: error: incomplete type
> 'std::__1::ios_base' named in nested name specifier
>                 is.setstate(std::ios_base::eofbit);
>                             ~~~~~^~~~~~~~~~
> /usr/include/c++/v1/iosfwd:95:7: note: forward declaration of
> 'std::__1::ios_base'
> class ios_base;
>       ^

> Is this a bug in libc++ or something wrong with boost itself?

With boost I'd say. It looks like:

#if defined(__PATHSCALE__)
   #include <ios>
#else
   #include <iosfwd>
#endif

but ios_base is in <ios> so that one should be included always.

-- 
Marc Glisse



More information about the cfe-dev mailing list