This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/16813] New: compiler error in DEBUG version of range insertion std::map::insert


Compiling the following test case
#define _GLIBCXX_DEBUG

#include <map>

int
main( int argc, char * argv[ ] ) {
  std::map< int, float > m1, m2;

  m1[ 3 ] = 3.0f;
  m1[ 11 ] = -67.0f;

  m2.insert( m1.begin( ), m1.end( ) );

  return 0;
}

Gives this error:
[tmp]$ /work/root.fsf/bin/g++ -c foo.cc
/Volumes/Data/work/root.fsf/bin/../lib/gcc/powerpc-apple-darwin7.4.0/3.5.0/../../../../include/
c++/3.5.0/debug/map.h: In member function `void __gnu_debug_def::map<_Key, _Tp, _Compare, 
_Allocator>::insert(_InputIterator, _InputIterator) [with _InputIterator = __gnu_debug::
_Safe_iterator<std::_Rb_tree_iterator<std::pair<const int, float> >, __gnu_debug_def::map<int, float, 
std::less<int>, std::allocator<std::pair<const int, float> > > >, _Key = int, _Tp = float, _Compare = 
std::less<int>, _Allocator = std::allocator<std::pair<const int, float> >]':
foo.cc:12:   instantiated from here
/Volumes/Data/work/root.fsf/bin/../lib/gcc/powerpc-apple-darwin7.4.0/3.5.0/../../../../include/
c++/3.5.0/debug/map.h:166: error: `__glibcxx_valid_range' was not declared in this scope

-- 
           Summary: compiler error in DEBUG version of range insertion
                    std::map::insert
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: austern at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.4.0/
  GCC host triplet: powerpc-apple-darwin7.4.0/
GCC target triplet: powerpc-apple-darwin7.4.0/


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16813


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]