Opened 11 years ago

Closed 10 years ago

Last modified 7 years ago

#6071 closed Bugs (fixed)

Boost Test (Boost 1.46.0) GCC 4.6.1 error: ambiguous overload for ‘operator[]’

Reported by: lshlyapnikov@… Owned by: Gennadiy Rozental
Milestone: Boost 1.59.0 Component: test
Version: Boost 1.46.0 Severity: Problem
Keywords: Cc:

Description

Compiling my project unit tests and getting the following error (used to compile with older GCC (4.4?)):

/usr/include/boost/test/impl/debug.ipp: In function ‘std::string boost::debug::set_debugger(boost::unit_test::const_string, boost::debug::dbg_starter)’:
/usr/include/boost/test/impl/debug.ipp:737:46: error: ambiguous overload for ‘operator[]’ in ‘boost::debug::{anonymous}::s_info.boost::debug::{anonymous}::info_t::m_dbg_starter_reg[boost::debug::{anonymous}::s_info.boost::debug::{anonymous}::info_t::p_dbg]’
compilation terminated due to -Wfatal-errors.

Here is my machine info:

$ cat /etc/redhat-release 
Fedora release 15 (Lovelock)

$ g++ --version
g++ (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9)

$ yum list installed | fgrep boost
boost.x86_64                    1.46.0-3.fc15       @updates                    
boost-build.noarch              1.46.0-3.fc15       @updates                    
boost-date-time.x86_64          1.46.0-3.fc15       @updates                    
boost-devel.x86_64              1.46.0-3.fc15       @updates                    
boost-doc.noarch                1.46.0-3.fc15       @updates                    
boost-filesystem.x86_64         1.46.0-3.fc15       @updates                    
boost-graph.x86_64              1.46.0-3.fc15       @updates                    
boost-graph-mpich2.x86_64       1.46.0-3.fc15       @updates                    
boost-iostreams.x86_64          1.46.0-3.fc15       @updates                    
boost-jam.x86_64                1.46.0-3.fc15       @updates                    
boost-mpich2.x86_64             1.46.0-3.fc15       @updates                    
boost-program-options.x86_64    1.46.0-3.fc15       @updates                    
boost-python.x86_64             1.46.0-3.fc15       @updates                    
boost-random.x86_64             1.46.0-3.fc15       @updates                    
boost-regex.x86_64              1.46.0-3.fc15       @updates                    
boost-serialization.x86_64      1.46.0-3.fc15       @updates                    
boost-signals.x86_64            1.46.0-3.fc15       @updates                    
boost-static.x86_64             1.46.0-3.fc15       @updates                    
boost-system.x86_64             1.46.0-3.fc15       @updates                    
boost-test.x86_64               1.46.0-3.fc15       @updates                    
boost-thread.x86_64             1.46.0-3.fc15       @updates                    
boost-wave.x86_64               1.46.0-3.fc15       @updates

Change History (3)

comment:1 by anonymous, 11 years ago

BTW, I am using c++0x settings.

Here are all my g++ flags: -fmessage-length=0 -pedantic-errors -Wall -Wextra -Wconversion -Wcast-qual -Wcast-align -Wwrite-strings -Wlogical-op -Wfatal-errors -std=c++0x -g

comment:2 by Gennadiy Rozental, 10 years ago

Resolution: fixed
Status: newclosed

(In [81179]) making operator unambiguous; Fixes #6071

comment:3 by Raffi Enficiaud, 7 years ago

Milestone: To Be DeterminedBoost 1.59.0
Note: See TracTickets for help on using tickets.