Opened 6 years ago
#12634 new Bugs
optional_config.hpp: needs update for Oracle Developer Studio compiler
Reported by: | Owned by: | Fernando Cacciola | |
---|---|---|---|
Milestone: | To Be Determined | Component: | optional |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
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>&)".
...
for details.
The following diff resolves the issue: % !diff diff ./optional_config.hpp optional_config.hpp_orig 47c47
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
$