Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
2449 Discussions

VS 2017 (v15.7.3) compiler warning - C4996 - TBB 2018.4

Ben_Held
Beginner
364 Views

Anyone solve this or find a way to actually hide it? All the typical approaches don't seem to work for C4996.

Severity Code Description Project Path File Line Source Suppression State
Warning C4996 'std::iterator<std::forward_iterator_tag,Value,ptrdiff_t,_Ty *,_Ty &>::iterator_category': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The <iterator> header is NOT deprecated.) The C++ Standard has never required user-defined iterators to derive from std::iterator. To fix this warning, stop deriving from std::iterator and start providing publicly accessible typedefs named iterator_category, value_type, difference_type, pointer, and reference. Note that value_type is required to be non-const, even for constant iterators. You can define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning. msmsh c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.14.26428\include c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.14.26428\include\xutility 623 Build
 
 
1>c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.14.26428\include\xutility(623): warning C4996: 'std::iterator<std::forward_iterator_tag,Value,ptrdiff_t,_Ty *,_Ty &>::iterator_category': warning STL4015: The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. (The <iterator> header is NOT deprecated.) The C++ Standard has never required user-defined iterators to derive from std::iterator. To fix this warning, stop deriving from std::iterator and start providing publicly accessible typedefs named iterator_category, value_type, difference_type, pointer, and reference. Note that value_type is required to be non-const, even for constant iterators. You can define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
1>        with
1>        [
1>            Value=int,
1>            _Ty=int
1>        ] (compiling source file msmsh_helper.cpp)
1>c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.14.26428\include\xutility(4348): note: see declaration of 'std::iterator<std::forward_iterator_tag,Value,ptrdiff_t,_Ty *,_Ty &>::iterator_category'
1>        with
1>        [
1>            Value=int,
1>            _Ty=int
1>        ] (compiling source file msmsh_helper.cpp)
1>c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.14.26428\include\xutility(652): note: see reference to class template instantiation 'std::_Iterator_traits_base<_Iter,void>' being compiled
1>        with
1>        [
1>            _Iter=tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<int,tbb::tbb_allocator<int>>,int>
1>        ] (compiling source file msmsh_helper.cpp)
1>c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.14.26428\include\xutility(1120): note: see reference to class template instantiation 'std::iterator_traits<_InIt>' being compiled
1>        with
1>        [
1>            _InIt=tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<int,tbb::tbb_allocator<int>>,int>
1>        ] (compiling source file msmsh_helper.cpp)
1>c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.14.26428\include\xtree(1386): note: see reference to function template instantiation 'void std::_Debug_range<_Iter>(_InIt,_InIt,std::_Dbfile_t,std::_Dbline_t)' being compiled
1>        with
1>        [
1>            _Iter=tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<int,tbb::tbb_allocator<int>>,int>,
1>            _InIt=tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<int,tbb::tbb_allocator<int>>,int>
1>        ] (compiling source file msmsh_helper.cpp)
1>c:\projectssvn\trunk\orion\src\dfem\dlib\utilities\sdgeometryprocessor.h(433): note: see reference to function template instantiation 'void std::_Tree<std::_Tset_traits<_Kty,_Pr,_Alloc,false>>::insert<tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<int,tbb::tbb_allocator<Key>>,int>>(_Iter,_Iter)' being compiled
1>        with
1>        [
1>            _Kty=int,
1>            _Pr=std::less<int>,
1>            _Alloc=tbb::scalable_allocator<int>,
1>            Key=int,
1>            _Iter=tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<int,tbb::tbb_allocator<int>>,int>
1>        ] (compiling source file msmsh_helper.cpp)
1>c:\projectssvn\trunk\orion\src\dfem\dlib\utilities\sdgeometryprocessor.h(433): note: see reference to function template instantiation 'void std::_Tree<std::_Tset_traits<_Kty,_Pr,_Alloc,false>>::insert<tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<int,tbb::tbb_allocator<Key>>,int>>(_Iter,_Iter)' being compiled
1>        with
1>        [
1>            _Kty=int,
1>            _Pr=std::less<int>,
1>            _Alloc=tbb::scalable_allocator<int>,
1>            Key=int,
1>            _Iter=tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<int,tbb::tbb_allocator<int>>,int>
1>        ] (compiling source file msmsh_helper.cpp)
1>c:\projectssvn\trunk\orion\src\common\nets.h(154): note: see reference to function template instantiation 'void SDGeometryProcessor::Group<std::vector<std::set<int,std::less<int>,std::allocator<int>>,std::allocator<_Ty>>,std::vector<int,std::allocator<int>>,std::set<int,std::less<int>,std::allocator<int>>,size_t>(const VE &,VG &,std::function<std::set<size_t,std::less<size_t>,tbb::scalable_allocator<size_t>> (const std::set<int,std::less<int>,std::allocator<int>> &)>)' being compiled
1>        with
1>        [
1>            _Ty=std::set<int,std::less<int>,std::allocator<int>>,
1>            VE=std::vector<std::set<int,std::less<int>,std::allocator<int>>,std::allocator<std::set<int,std::less<int>,std::allocator<int>>>>,
1>            VG=std::vector<int,std::allocator<int>>
1>        ] (compiling source file msmsh_helper.cpp)
0 Kudos
0 Replies
Reply