|
Boost Users : |
Subject: Re: [Boost-users] [Boost.Serialization][Boost.Iterators] Problem with Boost 1.59.0 in Solaris with SunCC
From: Piotr Kowalski (koval.gnu_at_[hidden])
Date: 2015-12-29 18:22:34
What options are you using to compile your sample code?
I tried CC -I<boost-path> -library=stlport4 -mt -c fail.cpp and it works
fine for Sun Studio 11 (CC 5.8), Sun Studio 12 (CC 5.9), Solaris Studio
12.2 (CC 5.11) and 12.3 (CC 5.12). All of them compile this without errors,
both with and without -mt option (single/multi-threaded version).
Unfortunately I have no Sun Studio 12.1 so this may be a bug specific to
this version or even patch set.
Tried with Boost 1.59.0 and 1.60.0.
If you are using the same options, is there a possibility you have patched
Boost or your system/stlport headers in any way? Maybe your
boost/config/user.hpp contains some customizations which might affect the
code?
If feel the error does not come from any manipulations on compiler/Boost
headers, would you mind attaching the output file created by CC when you
replace -c with -P?
2015-12-29 10:14 GMT+01:00 <dariomt_at_[hidden]>:
> Hi all,
>
> I have found a problem compiling Boost,
> in libs/serialization/src/basic_text_oprimitive.cpp the usage
> of boost::iterator::iterator_facade is problematic.
>
> I have reduced it to a two line minimal case:
>
> #include <boost/archive/iterators/ostream_iterator.hpp>
> boost::archive::iterators::ostream_iterator<char> it;
>
> Trying to compile this with SunCC 5.10 (Sun Studio 12.1) in Solaris I get
> the following error:
>
> "boost/iterator/iterator_facade.hpp", line 779: Error: value is not a
> member of
> boost::iterators::detail::is_traversal_at_least<std::output_iterator_tag,
> boost::iterators::bidirectional_traversal_tag>.
> "boost/archive/iterators/ostream_iterator.hpp", line 40: Where: While
> specializing
> "boost::iterators::iterator_facade<boost::archive::iterators::ostream_iterator<char>,
> char, std::output_iterator_tag,
> boost::archive::iterators::ostream_iterator<char>&, int>".
> "boost/archive/iterators/ostream_iterator.hpp", line 40: Where:
> Specialized in boost::archive::iterators::ostream_iterator<char>.
> "fail.cpp", line 2: Where: Specialized in non-template code.
>
> I guess it must be some bug in the compiler, because if I try to
> instantiate directly the template mentioned in the error message it works
> fine. (i.e. value is indeed a member).
>
> #include <boost/iterator/iterator_facade.hpp>
> const bool value =
> boost::iterators::detail::is_traversal_at_least<
> std::output_iterator_tag,
> boost::iterators::bidirectional_traversal_tag
> >::value;
>
> For reference, this problem was *not* present in Boost 1.55.0.
>
> Thanks!
>
> PS: I have mentioned both libraries in the subject because I don't know if
> this is a problem with Boost.Iterator code, or with the usage of that
> library from Boost.Serialization.
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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