Boost logo

Boost Users :

From: Edward Diener (eldiener_at_[hidden])
Date: 2019-09-10 16:17:41

On 9/9/2019 8:58 PM, Roy Musselman via Boost-users wrote:
> Greetings,
> While attempting to build boost 1.70.0 for IBM Power9 using the IBM XL
> compilers using the SPACK tool, the following errors occur repeatedly
> for every header file that eventually includes
> boost/thread/lockable_traits.hpp
> In file included from ./boost/thread/lock_types.hpp:14:
> *./boost/thread/lockable_traits.hpp*:157:11: error: use of undeclared
> identifier 'decltype'
> decltype(void(boost::declval<T&>().lock()))
> ^
> ./boost/thread/lockable_traits.hpp:165:11: error: use of undeclared
> identifier 'decltype'
> decltype(void(boost::declval<T&>().unlock()))
> ^
> ./boost/thread/lockable_traits.hpp:173:11: error: use of undeclared
> identifier 'decltype'
> decltype(bool(boost::declval<T&>().try_lock()))
> ^
> These errors could be resolved if the *-std=c++11*compiler option is
> used. Attempting to use SPACK options *cxxflags=-std=c++11*or
> *cxxstd=11*failed as if they were ignored. I was able to work-around
> this pervasive error by adding the following line to the file
> *tools/build/src/tools/xlcpp.jam*
> flags xlcpp.compile.c++ OPTIONS <cxxstd>11 : -std=c++11 ;
> Can you update the xlcpp.jam file to support the cxxstd=11 option,
> similar to what is implemented in pgi.jam?

I do not know why cxxflags=-std=c++11 did not work. Maybe it needed to
be surrounded by quotes for whatever OS script you are using.

Do you have a list of all the possible -std= choices for the compiler ?
If we include one for c++11 we should probably include one for each
possible choice.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at