Boost logo

Boost :

From: Scott Determan (scott.determan_at_[hidden])
Date: 2021-03-18 14:58:55


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
```


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk