mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-17 19:22:25 +01:00
Fixed const_reverse_iterator compile error with Oracle Solaris Studio 12.1
Building Catch with Oracle Solaris Studio 12.1 generates an error because it is unable to convert from a std::vector<>::reverse_iterator to a std::vector<>::const_reverse_iterator. This is easily avoided by using a constant reference to the type before obtaining the iterator.
This commit is contained in:
parent
88732e85b2
commit
71b969dec9
@ -327,8 +327,9 @@ namespace Catch {
|
|||||||
void handleUnfinishedSections() {
|
void handleUnfinishedSections() {
|
||||||
// If sections ended prematurely due to an exception we stored their
|
// If sections ended prematurely due to an exception we stored their
|
||||||
// infos here so we can tear them down outside the unwind process.
|
// infos here so we can tear them down outside the unwind process.
|
||||||
for( std::vector<SectionEndInfo>::const_reverse_iterator it = m_unfinishedSections.rbegin(),
|
std::vector<SectionEndInfo> const& constUnfinishedSections = m_unfinishedSections;
|
||||||
itEnd = m_unfinishedSections.rend();
|
for( std::vector<SectionEndInfo>::const_reverse_iterator it = constUnfinishedSections.rbegin(),
|
||||||
|
itEnd = constUnfinishedSections.rend();
|
||||||
it != itEnd;
|
it != itEnd;
|
||||||
++it )
|
++it )
|
||||||
sectionEnded( *it );
|
sectionEnded( *it );
|
||||||
|
Loading…
Reference in New Issue
Block a user