[Bug c++/42105] New: class with operator& failed to be stored in the STL map

2009-11-19 Thread evgeny at mainsoft dot com
:less, _Alloc =
std::allocator]'
/usr/local/gnu/gcc/4.1.2/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_set.h:321:
  instantiated from 'std::pair, _Compare, typename
_Alloc::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare,
_Alloc>::insert(const _Key&) [with _Key = test, _Compare = std::less,
_Alloc = std::allocator]'
xx.cpp:17:   instantiated from here
/usr/local/gnu/gcc/4.1.2/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_tree.h:369:
error: no matching function for call to 'std::allocator::construct(int**,
const test&)'
/usr/local/gnu/gcc/4.1.2/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../include/c++/4.1.2/ext/new_allocator.h:103:
note: candidates are: void __gnu_cxx::new_allocator<_Tp>::construct(_Tp*, const
_Tp&) [with _Tp = test]

--


-- 
   Summary: class with operator& failed to be stored in the STL map
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: evgeny at mainsoft dot com


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



[Bug c++/42105] class with operator& failed to be stored in the STL map

2009-11-19 Thread evgeny at mainsoft dot com


--- Comment #1 from evgeny at mainsoft dot com  2009-11-19 08:10 ---
Created an attachment (id=19044)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19044&action=view)
preprocessed source file


-- 


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



[Bug c++/42105] class with operator& failed to be stored in the STL map

2009-11-19 Thread evgeny at mainsoft dot com


--- Comment #2 from evgeny at mainsoft dot com  2009-11-19 08:12 ---
The source code published in bug description compiled successfully with gcc
(g++) 3.4.3.


-- 


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



[Bug c++/42105] class with operator& failed to be stored in the STL map

2009-11-22 Thread evgeny at mainsoft dot com


--- Comment #4 from evgeny at mainsoft dot com  2009-11-22 09:45 ---
(In reply to comment #3)
> This is by design for C++03 but for C++0x (really C++1x) it is not.
> 
> *** This bug has been marked as a duplicate of 41792 ***
> 

Thank you Andrew. I'll follow the bug 41792.


-- 


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