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

Ryuta Suzuki ryuuta at gmail.com
Sat Sep 10 03:56:29 PDT 2011


Hi Marc,

Just as you pointed out, it was boost's fault. Patching flex_string.hpp like

--- ./boost/wave/util/flex_string.hpp.orig    2011-09-10 18:15:29.916482429
+
0900
+++ ./boost/wave/util/flex_string.hpp    2011-09-10 18:18:58.687781264 +0900
@@ -103,7 +103,7 @@
 #include <limits>
 #include <stdexcept>

-#if defined(__PATHSCALE__)
+#if defined(__PATHSCALE__) || defined(__clang__)
   #include <ios>
 #else
   #include <iosfwd>

fixed the problem, though I still have other boost issues.
Anyway, thanks for the tip! I appreciate it.

Regards,

Ryuta

On Sat, Sep 10, 2011 at 5:38 PM, Marc Glisse <marc.glisse at inria.fr> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110910/700498c9/attachment.html>


More information about the cfe-dev mailing list