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 c++/17374] New: std::set::erase(const_iterator) doesn't output error on compilation


The following instructions compile without any warning; tested using g++ 2.95,
3.3 and 3.4.1:

	std::set<int> vs;
	const std::set<int>::const_iterator i = vs.begin();
	vs.erase(i);

it should stop compilation with an error, such as:
" error: invalid conversion from `const int* const' to `int*' "

-- 
           Summary: std::set::erase(const_iterator) doesn't output error on
                    compilation
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: romainbehar at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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