I've noticed an annoying message during a build of C++ console application in Visual Studio 2019, Windows 10. I have a template function which produces a message:
message : see reference to function template instantiation 'int run_loop<wchar_t>(int,const char_type *[])' being compiled
with
[
char_type=wchar_t
]
Similar code compiles fine with no the message on macOS and Ubuntu, but now I'm porting it to Windwos and see this. It is not error or warning, just an info message. I started to comment out code blocks inside of the funtion and found that when I commented out std::exception catching the message disappeared. What does this message mean and how should I deal with it? Leave it as is or should I redisign my code in some another way? Here is the simplified code snippet that produces the above message:
#include <exception>
template<class char_type>
int run_loop(int argc, const char_type* argv[])
{
try
{
}
catch (const std::exception& ex)
{
}
return 0;
}
int wmain(int argc, const wchar_t* argv[])
{
return run_loop(argc, argv);
}
My environment:
OS: Windows 10 Pro x64 Version 1909 OS build 18363.836
IDE: Visual Studio 2019 version 16.6.0
Win32 Console application template in C++ with default settings:
Windows SDK Version: 10.0
Platform Toolset: Visual Studio 2019 (v142)