1

All, I'm trying to track down the cause, and any answer that will get these compiler notes from mucking up my build. I'm using VS2015, warning level 3. Since these are 'notes', i'm not sure what i can do to hide them. As soon as i even include the they will start appearing, but i'm sure it's not limited to signals.

I'd appreciate any help in figuring out what this is all about.

1>  c:\software\simulators\packages\boost.1.65.1.0\lib\native\include\boost\signals2\connection.hpp(55): note: see reference to class template instantiation 'boost::signals2::detail::garbage_collecting_lock<Mutex>' being compiled
1>  c:\software\sims\packages\boost.1.65.1.0\lib\native\include\boost\bind\placeholders.hpp(54): note: see reference to class template instantiation 'boost::arg<9>' being compiled
1>  c:\software\sims\packages\boost.1.65.1.0\lib\native\include\boost\bind\placeholders.hpp(53): note: see reference to class template instantiation 'boost::arg<8>' being compiled
1>  c:\software\sims\packages\boost.1.65.1.0\lib\native\include\boost\bind\placeholders.hpp(52): note: see reference to class template instantiation 'boost::arg<7>' being compiled
1>  c:\software\sims\packages\boost.1.65.1.0\lib\native\include\boost\bind\placeholders.hpp(51): note: see reference to class template instantiation 'boost::arg<6>' being compiled
1>  c:\software\sims\packages\boost.1.65.1.0\lib\native\include\boost\bind\placeholders.hpp(50): note: see reference to class template instantiation 'boost::arg<5>' being compiled
1>  c:\software\sims\packages\boost.1.65.1.0\lib\native\include\boost\bind\placeholders.hpp(49): note: see reference to class template instantiation 'boost::arg<4>' being compiled
1>  c:\software\sims\packages\boost.1.65.1.0\lib\native\include\boost\bind\placeholders.hpp(48): note: see reference to class template instantiation 'boost::arg<3>' being compiled
1>  c:\software\sims\packages\boost.1.65.1.0\lib\native\include\boost\bind\placeholders.hpp(47): note: see reference to class template instantiation 'boost::arg<2>' being compiled
1>  c:\software\sims\packages\boost.1.65.1.0\lib\native\include\boost\bind\placeholders.hpp(46): note: see reference to class template instantiation 'boost::arg<1>' being compiled

c:\program files (x86)\microsoft visual studio 14.0\vc\include\xmemory(102): warning C4996: 'std::uninitialized_copy::_Unchecked_iterators::_Deprecate': Call to 'std::uninitialized_copy' with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
Jason
  • 2,147
  • 6
  • 32
  • 40
  • 2
    You did not include the actual error. This is just the traceback for the error. Or is it really outputting purely notes? – Max Langhof Apr 30 '18 at 13:26
  • It's primarily notes. I updated the post with a 4996 warning that pops up even though i have tried the #pragma disable, the _SCL_SECURE_NO_WARNINGS (unless i did it wrong). I found that the pragma only had a somewhat positiive effect if i put it in the stdafx header. I also updated project settings to Disable specific warnings (4996) without success – Jason Apr 30 '18 at 13:32
  • You need to find the 1st non-note error/warning report before all the note reports. The note reports are caused by a previously reported error/warning and the notes are MSVC best attempt to report the nested template expansions. – Richard Critten Apr 30 '18 at 13:35
  • 1
    Boost just has code in it that trigger warnings. Most of them are known, just not addressed. – AndyG Apr 30 '18 at 13:37
  • 1
    If you add `_SCL_SECURE_NO_WARNINGS` to the defines for your projects, where DEBUG/NDEBUG,WIN32, etc. are defined then this issue will go away. You should be aware that also turns off several other warnings about "security issues". – Retired Ninja Apr 30 '18 at 13:39
  • I added a #define _SCL_SECURE_NO_WARNINGS in the stdafx.h. I'm not a huge fan of putting it there, but it's the only place that caught every instance. – Jason Apr 30 '18 at 13:50
  • 1
    @Jason I wanted to avoid using `_SCL_SECURE_NO_WARNINGS` to silence this warning, so I created my own header for boost.signals2 that I'll include in any project's precompiled header that needs signals2. This "special" header disables 4996, then includes signals2.hpp (and wraps that with a push/pop of the warning state). Include this header at the top of your StdAfx.h. The key is to ensure the "special" header gets included *before* any STL headers. – Bret Kuhns Apr 30 '18 at 13:59
  • 1
    @BretKuhns - that's a slick idea. I'm gonna use that! – Jason Apr 30 '18 at 15:36
  • 1
    It's worth noting here, because I find it frustrating, that other parts of boost add workarounds for this warning, but the people responsible for signals2 have said in their issue tracker that they will *not* address this warning because there's nothing wrong with their code. So, users of signals2 in MSVC are stuck dealing with the consequences of their ideology. – Bret Kuhns Apr 30 '18 at 16:28

0 Answers0