boost::future_errc not usable

Open
#323 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
backend

Research direction

Reproduce the provided C++17 snippet with GCC 9.3.0 or Clang 9.0.1, then inspect boost/thread/futures/future_error_code.hpp and the reported Boost.System error_code.hpp location. Done means the future_errc comparison compiles successfully with Boost 1.73 without the make_error_code lookup error.

Written by the indexing model from the issue text.

Description

Compiler: gcc 9.3.0, clang++ 9.0.1 / c++17 mode
Boost: 1.73

#include <boost/thread.hpp>
auto future_errc_compile_error(const boost::future_error& e)
{
	return e.code() == boost::future_errc::broken_promise;
}
...

This fails with

/usr/include/boost/system/error_code.hpp:595:32: error: 'make_error_code' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
/usr/include/boost/thread/futures/future_error_code.hpp:47:5: note: 'boost::system::error_code boost::system::make_error_code(boost::future_errc)' declared here, later in the translation unit
47 | make_error_code(future_errc e) BOOST_NOEXCEPT

Dominant language
C++
Stars
213
Forks
171
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/thread

All issues in boostorg/thread

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.