#11223 closed Bugs (fixed)
Context does not properly check support for std::integer_sequence
Reported by: | Emile Cormier | Owned by: | olli |
---|---|---|---|
Milestone: | To Be Determined | Component: | context |
Version: | Boost 1.58.0 | Severity: | Problem |
Keywords: | Cc: |
Description
When I build Boost 1.58 with C++11 support on GCC 4.8.2, it fails to build the context library. This is due to the library attempting to use std::index_sequence:
In file included from libs/context/src/execution_context.cpp:11:0: ./boost/context/execution_context.hpp:202:52: error: ‘std::index_sequence’ has not been declared
std::index_sequence is a feature only available in C++14.
A workaround would be:
- First build a C++11-enabled Boost using the --without-context option
- Build the missing context library using --with-context, making sure that -std=c++11 is NOT added to the cxxflags
My platform is GCC 4.8.2, x86_64-linux-gnu, Linux Mint 17 (based on Ubuntu 14.04)
Attachments (1)
Change History (10)
by , 8 years ago
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Component: | context → config |
---|---|
Owner: | changed from | to
comment:4 by , 8 years ago
I've added a pull-request for boost.config (https://github.com/boostorg/config/pull/57) - which solves the problem for GCC and CLANG. Unfortunately I'm not familiar with the other compiler (maybe defining BOOST_NO_CXX14_INTEGER_SEQUENCE per default at first).
comment:5 by , 8 years ago
Component: | config → context |
---|
comment:6 by , 8 years ago
Owner: | changed from | to
---|
comment:7 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
test of
defined(__cpp_lib_integer_sequence) && (__cpp_lib_integer_sequence < 201304)
comment:9 by , 7 years ago
Nevermind, I found your latest Boost.Config PR: https://github.com/boostorg/config/pull/58
Thank you for fixing this! :-)
While I wait for the next Boost release, can I simply add -DBOOST_NO_CXX14_INTEGER_SEQUENCE while building Boost to avoid the compiler errors I originally reported?
Class execution_context can only be compiled with C++-14 - the code uses test macros for several C++11/C++14 features in order to enable building class execution_context. Unfortunately, boost is missing a test macro for 'std::index_sequence'. I already requested for supporting the required macro.