[Boost-bugs] [Boost C++ Libraries] #12634: optional_config.hpp: needs update for Oracle Developer Studio compiler

Subject: [Boost-bugs] [Boost C++ Libraries] #12634: optional_config.hpp: needs update for Oracle Developer Studio compiler
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-11-29 19:29:27


#12634: optional_config.hpp: needs update for Oracle Developer Studio compiler
-------------------------------------------+-----------------------
 Reporter: Aparna Kumta <aparna.kumta@…> | Owner: fcacciola
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: optional
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------------+-----------------------
 Test libs/bimap/test/../example/bimap_and_boost/xpressive.cpp fails with
 Oracle Developer Studio compiler in -std=c++11 mode as follows:

     "CC" -std=c++11 -temp=/tmp/bn -xO4 -mt -erroff=%none -m32 -KPIC
 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I".." -c -o "/export/home/sstrunk-
 tester/boost_regression/boost_regression_develop/boost_sparc-
 S2_cpp11/results/boost/bin.v2/libs/bimap/test/xpressive.test/sun-12.5_next_cpp11/release
 /threading-multi/xpressive.o"
 "../libs/bimap/test/../example/bimap_and_boost/xpressive.cpp"

 "../boost/proto/detail/preprocessed/expr_variadic.hpp", line 687: Warning:
 A class with a reference member lacks a user-defined constructor, which
 can lead to errors.

 ...

 "../boost/xpressive/match_results.hpp", line 747: Error: Overloading
 ambiguity between "boost::optional<__gnu_cxx::__normal_iterator<const
 char*, std::string>>::operator=<__gnu_cxx::__normal_iterator<const char*,
 std::string>&>(__gnu_cxx::__normal_iterator<const char*, std::string>&)"
 and "boost::optional<__gnu_cxx::__normal_iterator<const char*,
 std::string>>::operator=<__gnu_cxx::__normal_iterator<const char*,
 std::string>&>(__gnu_cxx::__normal_iterator<const char*, std::string>&)".

 ...

 See
 http://www.boost.org/development/tests/develop/developer/output/oracle-
 sparc-S2-12-5_next-cpp11-boost-bin-v2-libs-bimap-test-xpressive-test-
 sun-12-5_next_cpp11-release-threading-multi.html

 for details.

 The following diff resolves the issue:
 % !diff
 diff ./optional_config.hpp optional_config.hpp_orig
 47c47
 < #if (defined(__GNUC__) || defined(__SUNPROC_CC)) &&
 !defined(__INTEL_COMPILER)
 ---
> #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
 99c99
 < #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) &&
 !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800)
 && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
 ---
> #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) &&
 !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800)
 && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) && !defined(__SUNPRO_CC)
 100a101
> // I also disable SUNPRO, as it seems not to support type_traits
 correctly
 105c106
 < #if (defined _MSC_FULL_VER) && (_MSC_FULL_VER < 190023026)
 ---
> #if defined __SUNPRO_CC
 106a108,109
> #elif (defined _MSC_FULL_VER) && (_MSC_FULL_VER < 190023026)
> # define BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
 $

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12634>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC