Boost C++ Libraries: Ticket #12523: configuration issue in foreach.hpp for Oracle Developer Studio compiler https://svn.boost.org/trac10/ticket/12523 <p> Compiling rvalue_const.cpp with Oracle Developer Studio 12.5, we see the following error: </p> <blockquote> <p> CC -compat=5 -library=stlport4 -xO4 -mt -erroff=%none -m32 -KPIC -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I".." -c -o ./rvalue_const.o ../libs/foreach/test/rvalue_const.cpp </p> </blockquote> <p> "../libs/foreach/test/rvalue_const.cpp", line 18: Error: #error Expected failure : const rvalues disallowed. </p> <p> Solution: <br /> The following change to boost/foreach.hpp resolves the issue <br /> $ diff foreach.hpp foreach.hpp_orig <br /> 59a60 <br /> </p> <blockquote class="citation"> <blockquote> <table class="wiki"> <tr><td> BOOST_WORKAROUND(<span class="underline">SUNPRO_CC, &gt;= 0x5100) </span></td></tr></table> </blockquote> </blockquote> <p> $ </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12523 Trac 1.4.3