Ticket #88 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17.

Reported by: jasper Owned by: jasper
Priority: minor Milestone: Maintenance of Phase II
Component: Client Header Files Version: 1.2.0.8
Keywords: Cc:

Description

warning C4996: 'std::iterator<std::random_access_iterator_tag,CollectionItem,ptrdiff_t,CollectionItem *,CollectionItem &>': 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.
8> with
8> [
8> CollectionItem?=CAPEOPEN_TEST_SUITE::CapeTest?
8> ]
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xutility(5911,1): message : see declaration of 'std::iterator'
8>D:\werk\CO\certtestsuite\CapeOpenTestSuite?\TestEngine?\TestEngine?.cpp(73): message : see reference to class template instantiation 'COBIA::BasicCapeCollection?<CAPEOPEN_TEST_SUITE::CapeTest,CAPEOPEN_1_2::ICapeCollection>::CapeCollectionIterator?' being compiled

Change History

comment:1 Changed 3 years ago by jasper

  • Status changed from new to closed
  • Resolution set to fixed

There are also other warnings when compiling against the C++17 standard.

Fixed in revision 206.

Note: See TracTickets for help on using tickets.