[Bug c++/50450] New: /usr/include/c++/4.6/bits/stl_set.h ifdef __GXX_EXPERIMENTAL_CXX0X__
luc.castermans at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Sep 18 15:28:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50450
Bug #: 50450
Summary: /usr/include/c++/4.6/bits/stl_set.h ifdef
__GXX_EXPERIMENTAL_CXX0X__
Classification: Unclassified
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: luc.castermans@gmail.com
in file: /usr/include/c++/4.6/bits/stl_set.h
The function insert() at line 407 will be included twice due to
the same function at line 416.
The first insert() at line 407 should be made part
of the conditional compile as well. Below my suggestion to fix it.
414 #ifndef __GXX_EXPERIMENTAL_CXX0X__
406 std::pair<iterator, bool>
407 insert(const value_type& __x)
408 {
409 std::pair<typename _Rep_type::iterator, bool> __p =
410 _M_t._M_insert_unique(__x);
411 return std::pair<iterator, bool>(__p.first, __p.second);
412 }
413
414 #else
415 std::pair<iterator, bool>
416 insert(value_type&& __x)
417 {
418 std::pair<typename _Rep_type::iterator, bool> __p =
419 _M_t._M_insert_unique(std::move(__x));
420 return std::pair<iterator, bool>(__p.first, __p.second);
421 }
422 #endif
More information about the Gcc-bugs
mailing list