[cfe-dev] [libc++] incomplete type 'std::__1::ios_base'
Howard Hinnant
hhinnant at apple.com
Sat Sep 10 08:28:56 PDT 2011
Filed boost bug report:
https://svn.boost.org/trac/boost/ticket/5887
Thanks Ryuta and Marc!
Howard
On Sep 10, 2011, at 6:56 AM, Ryuta Suzuki wrote:
> 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
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list