Closed shrinktofit closed 11 months ago
What program are you trying to compile?
I'm writing a program involving boost.beast, the boost.beast is referring to boost.system via:
and then the above error is given:
out\build\x64-debug\vcpkg_installed\x64-windows\include\boost\system\detail\error_code.hpp(150): error C3861: “make_error_code”: Could not find the identifier.
My IDE is Visual Studio 2022, C++ standard is configured as C++20 and I'm using C++ modules.
The make_error_code
overloads for boost::asio::error
are here: https://github.com/boostorg/asio/blob/28ff1e7c2b44f141eb809abaf2d76c95f38350ca/include/boost/asio/error.hpp#L334-L356
make_error_code(e)
should find them via argument-dependent lookup.
Thank you @pdimov . I must have encountered some language specific problem. Let me digit into it. :)
My compiler(Visual Studio 2022) said the
make_error_code
is undeclared here:https://github.com/boostorg/system/blob/b0ef682e3d94f98478c00513ea7819f384a36f83/include/boost/system/detail/error_code.hpp#L142-L151
I searched for this symbol, I saw it's defined in:
boost::system::errc
andboost::system::windows_error
etc. It certainly cannot be found withinboost::system
namespace(L150).