Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#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:


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:

  1. First build a C++11-enabled Boost using the --without-context option
  2. 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)

log.txt (11.5 KB) - added by anonymous 3 years ago.

Download all attachments as: .zip

Change History (10)

Changed 3 years ago by anonymous

Attachment: log.txt added

comment:1 Changed 3 years ago by olli

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.

comment:2 Changed 3 years ago by olli

Component: contextconfig
Owner: changed from olli to Beman Dawes

comment:3 Changed 3 years ago by olli

please re-assign if macro is available

comment:4 Changed 3 years ago by olli

I've added a pull-request for boost.config ( - 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 Changed 3 years ago by olli

Component: configcontext

comment:6 Changed 3 years ago by olli

Owner: changed from Beman Dawes to olli

comment:7 Changed 3 years ago by olli

Resolution: fixed
Status: newclosed

test of

defined(__cpp_lib_integer_sequence) && (__cpp_lib_integer_sequence < 201304)
Last edited 3 years ago by olli (previous) (diff)

comment:8 Changed 3 years ago by Emile Cormier

Has this fix been pushed to GitHub? yet?

comment:9 Changed 3 years ago by Emile Cormier

Nevermind, I found your latest Boost.Config PR:

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?

Note: See TracTickets for help on using tickets.