Skip to content

Commit

Permalink
Fix the fix for std::result_of (#4496)
Browse files Browse the repository at this point in the history
Newer compilers, such as Apple Clang 15.0, have removed `std::result_of`
as part of C++20. The build instructions provided a fix for this (by
adding a preprocessor definition), but the fix was broken.

This fixes the fix by:
* Adding the `conf` prefix for tool configurations (which had been
  forgotten).
* Passing `extra_b2_flags` to `boost` package to fix its build.
  * Define `BOOST_ASIO_HAS_STD_INVOKE_RESULT` in order to build boost
    1.77 with a newer compiler.
  • Loading branch information
thejohnfreeman authored Apr 12, 2023
1 parent 4f95b9d commit e75cd49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,11 @@ part of C++20, e.g. Apple Clang 15.0,
then you might need to add a preprocessor definition to your bulid:

```
conan profile update 'options.boost:extra_b2_flags="define=BOOST_ASIO_HAS_STD_INVOKE_RESULT"' default
conan profile update 'env.CFLAGS="-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"' default
conan profile update 'env.CXXFLAGS="-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"' default
conan profile update 'tools.build:cflags+=["-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"]' default
conan profile update 'tools.build:cxxflags+=["-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"]' default
conan profile update 'conf.tools.build:cflags+=["-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"]' default
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"]' default
```


Expand Down

0 comments on commit e75cd49

Please sign in to comment.