Opened 6 years ago
Closed 6 years ago
#12543 closed Bugs (worksforme)
boost::async compile error for -std=c++03 and c++98
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | thread |
Version: | Boost 1.62.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Following code results in compile error on GCC and Clang with -std=c++03 or -std=c++98 flags.
#include <boost/thread.hpp> struct Calc { typedef int result_type; result_type operator()() const { return result_type(); } }; int main() { Calc x; boost::async(x); }
LIVE DEMO: coliru.stacked-crooked.com/a/532c22d37e951a28
Change History (8)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Owner: | changed from | to
---|
comment:4 by , 6 years ago
There is no error with this definition (on both GCC and Clang): coliru.stacked-crooked.com/a/a459a8fbce3c009a
comment:5 by , 6 years ago
Thanks for the report.
I don't know what to do. BOOST_THREAD_VERSION 2 contains a lot of limitation that were solved by BOOST_THREAD_VERSION 3 and 4.
follow-up: 7 comment:6 by , 6 years ago
Perhaps newer BOOST_THREAD_VERSION should be set by default?
comment:7 by , 6 years ago
Replying to evgeny.panasyuk@…:
Perhaps newer BOOST_THREAD_VERSION should be set by default?
No. This will introduce breaking changes.
comment:8 by , 6 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Have you tried defining BOOST_THREAD_VERSION 4?