0

I linked boost to my project and using namespaces from boost/asio. Everything is compiled, but vscode cannot find the next namespaces:

using boost::asio::awaitable;
using boost::asio::co_spawn;
using boost::asio::use_awaitable;
namespace this_coro = boost::asio::this_coro;

So there are a red lines and Intellisense doesn't work for these namespaces.

Code works!

Nikita
  • 21
  • 3
  • 1
    Generate `compile_commands.json`, VSC should pick it up and use automatically. How to do so depends on your build system. If it doesn't help, replace the stock C++ extension with Clangd (install it from [MSYS2](https://stackoverflow.com/q/30069830/2752075), not the official binaries) - I found it to be more reliable. – HolyBlackCat Dec 26 '22 at 17:04

1 Answers1

0

I have solved this problem by changing cppStandard from gnu++17 to gnu++20 in c_cpp_properties.json

Thx!

Nikita
  • 21
  • 3