0

I'm using VS2019 (16.11.3) and Spdlog 1.9.2.

This is the code I'm using:

auto logger = std::make_shared<spdlog::logger>("CORE", std::begin(sinks), std::end(sinks));

logger->log(spdlog::level::info, "This works");

std::string test = "testtest";
logger->log(spdlog::level::info, "This does not {}", test);

The code compiles and works correctly, however the Intellisense of VS2019 gives this error couldn't match type fmt::format_string<Args...> against const char[17]: error screenshot

I already deleted my .vs folder and restarted Visual Studio but to no avail.

What else can I do? Is there something obvious that I'm missing?

Thanks in advance.

aghidini
  • 2,855
  • 5
  • 29
  • 32

1 Answers1

0

The reason for the error is that the function parameters do not match. The matching parameter types of the function have been shown in the picture you gave. You can refer to and modify your parameter list.

Yujian Yao - MSFT
  • 945
  • 1
  • 3
  • 9
  • I don't understand: the code above compiles fine, it's an intellisense problem, how do you suggest to change the code? – aghidini Oct 12 '21 at 08:59
  • I find a warning in your program, could you please provide the reason for the warning? For the modification of intelligence error, you can refer to this [link](https://stackoverflow.com/questions/31943634/visual-studio-2015-or-2017-shows-intellisense-errors-but-solution-compiles). – Yujian Yao - MSFT Oct 13 '21 at 08:33