mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-04 05:59:32 +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:
		@@ -327,8 +327,9 @@ namespace Catch {
 | 
			
		||||
        void handleUnfinishedSections() {
 | 
			
		||||
            // If sections ended prematurely due to an exception we stored their
 | 
			
		||||
            // infos here so we can tear them down outside the unwind process.
 | 
			
		||||
            for( std::vector<SectionEndInfo>::const_reverse_iterator it = m_unfinishedSections.rbegin(),
 | 
			
		||||
                        itEnd = m_unfinishedSections.rend();
 | 
			
		||||
            std::vector<SectionEndInfo> const& constUnfinishedSections = m_unfinishedSections;
 | 
			
		||||
            for( std::vector<SectionEndInfo>::const_reverse_iterator it = constUnfinishedSections.rbegin(),
 | 
			
		||||
                        itEnd = constUnfinishedSections.rend();
 | 
			
		||||
                    it != itEnd;
 | 
			
		||||
                    ++it )
 | 
			
		||||
                sectionEnded( *it );
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user