[asio] [regex] 1.76.0 beta 1 compilation failure
There appears to be a problem compiling a program that includes both asio and regex in 1.76.0 beta 1. The following program fails to compile: ``` #include <boost/asio.hpp> #include <boost/regex.hpp> int main(int argc, char** argv) { return 0; } ``` The error is: ``` /home/swd/projs/common/boost_1_76_0_b1/boost/regex/v5/match_flags.hpp:38:14: error: multiple definition of ‘enum boost::regex_constants::_match_flags’ 38 | typedef enum _match_flags | ^~~~~~~~~~~~ In file included from /home/swd/projs/common/boost_1_76_0_b1/boost/asio/detail/regex_fwd.hpp:21, from /home/swd/projs/common/boost_1_76_0_b1/boost/asio/read_until.hpp:23, from /home/swd/projs/common/boost_1_76_0_b1/boost/asio.hpp:146, from ../src/main.cpp:2: /home/swd/projs/common/boost_1_76_0_b1/boost/regex/v4/match_flags.hpp:38:14: note: previous definition here 38 | typedef enum _match_flags ```
Scott Determan wrote:
There appears to be a problem compiling a program that includes both asio and regex in 1.76.0 beta 1. The following program fails to compile:
``` #include <boost/asio.hpp> #include <boost/regex.hpp>
int main(int argc, char** argv) { return 0; } ```
ASIO has a commit on develop but not on master https://github.com/boostorg/asio/commit/c77f3b603bf2cd180945184a664c6a05d3be... that's probably the fix for this issue.
On Mar 18, 2021, at 8:13 AM, Peter Dimov via Boost <boost@lists.boost.org> wrote:
Scott Determan wrote:
There appears to be a problem compiling a program that includes both asio and regex in 1.76.0 beta 1. The following program fails to compile:
``` #include <boost/asio.hpp> #include <boost/regex.hpp>
int main(int argc, char** argv) { return 0; } ```
ASIO has a commit on develop but not on master
https://github.com/boostorg/asio/commit/c77f3b603bf2cd180945184a664c6a05d3be...
that's probably the fix for this issue.
It is certainly *intended* to be a fix for this issue :-) — Marshall
On 18/03/2021 15:37, Marshall Clow via Boost wrote:
On Mar 18, 2021, at 8:13 AM, Peter Dimov via Boost <boost@lists.boost.org> wrote:
Scott Determan wrote:
There appears to be a problem compiling a program that includes both asio and regex in 1.76.0 beta 1. The following program fails to compile:
``` #include <boost/asio.hpp> #include <boost/regex.hpp>
int main(int argc, char** argv) { return 0; } ``` ASIO has a commit on develop but not on master
https://github.com/boostorg/asio/commit/c77f3b603bf2cd180945184a664c6a05d3be...
that's probably the fix for this issue. It is certainly *intended* to be a fix for this issue :-)
Looks good to me. Should this be cherry picked for release? -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
On Mar 18, 2021, at 10:28 AM, John Maddock via Boost <boost@lists.boost.org> wrote:
On 18/03/2021 15:37, Marshall Clow via Boost wrote:
On Mar 18, 2021, at 8:13 AM, Peter Dimov via Boost <boost@lists.boost.org> wrote:
Scott Determan wrote:
There appears to be a problem compiling a program that includes both asio and regex in 1.76.0 beta 1. The following program fails to compile:
``` #include <boost/asio.hpp> #include <boost/regex.hpp>
int main(int argc, char** argv) { return 0; } ``` ASIO has a commit on develop but not on master
https://github.com/boostorg/asio/commit/c77f3b603bf2cd180945184a664c6a05d3be...
that's probably the fix for this issue. It is certainly *intended* to be a fix for this issue :-)
Looks good to me. Should this be cherry picked for release?
I expect that Chris will be asking for permission to merge it … soon. :-) — Marshall
participants (4)
-
John Maddock
-
Marshall Clow
-
Peter Dimov
-
Scott Determan