public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile
@ 2012-04-12  0:34 cmaloney at tagged dot com
  2012-04-12  1:18 ` [Bug c++/52942] " paolo.carlini at oracle dot com
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: cmaloney at tagged dot com @ 2012-04-12  0:34 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52942
           Summary: [4.7 Regression] using std::ref with a
                    std::unordered_map fails to compile
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: cmaloney@tagged.com


The following C++ I believe to be valid C++1 , but produces error messages (At
bottom).

$g++ -std=c++11 -c foo.cc

#include <functional>
#include <string>
#include <unordered_map>


struct TFoo {};

namespace std {
  template <>
  struct hash<TFoo> {
    size_t operator()(const TFoo &) const {
      return 0;
    }
  };
}


void f1(std::unordered_map<TFoo, int> &) {}

void f2() {
  std::unordered_map<TFoo, int> map1;
  std::bind(f1, std::ref(map1));
}

In file included from
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional:50:0,
                 from foo.cc:1:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional:
In instantiation of 'constexpr const bool
std::__has_argument_type_helper<std::unordered_map<TFoo, int> >::value':
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional:305:1:
  required from 'struct std::__has_argument_type<std::unordered_map<TFoo, int>
>'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional:316:12:
  required from 'struct std::_Reference_wrapper_base<std::unordered_map<TFoo,
int> >'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional:432:11:
  required from 'class std::reference_wrapper<std::unordered_map<TFoo, int> >'
foo.cc:22:30:   required from here
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_function.h:105:21:
error: 'typedef struct std::pair<const TFoo, int>
std::unary_function<std::pair<const TFoo, int>, const TFoo>::argument_type' is
inaccessible
In file included from foo.cc:1:0:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional:305:3:
error: within this context
In file included from
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional:50:0,
                 from foo.cc:1:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional:
In instantiation of 'struct std::_Reference_wrapper_base_impl<true, false,
std::unordered_map<TFoo, int> >':
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional:316:12:
  required from 'struct std::_Reference_wrapper_base<std::unordered_map<TFoo,
int> >'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional:432:11:
  required from 'class std::reference_wrapper<std::unordered_map<TFoo, int> >'
foo.cc:22:30:   required from here
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_function.h:105:21:
error: 'typedef struct std::pair<const TFoo, int>
std::unary_function<std::pair<const TFoo, int>, const TFoo>::argument_type' is
inaccessible
In file included from foo.cc:1:0:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional:283:43:
error: within this context


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/52942] [4.7 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
@ 2012-04-12  1:18 ` paolo.carlini at oracle dot com
  2012-04-12  1:39 ` paolo.carlini at oracle dot com
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-04-12  1:18 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-04-12
                 CC|                            |jwakely.gcc at gmail dot
                   |                            |com
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-12 01:17:46 UTC ---
Your specialization of std::hash doesn't provide the two nested types
result_type and argument_type, which are mandatory, per 20.8.12.

But another hash function meeting the Hash requirements, which do not mention
the nested types should be Ok, and looks like isn't. At the moment I completely
fail to see where we are incorrectly assuming the nested types (and, grrrr, the
error message doesn't help us much)

Jon can you see anything?


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c++/52942] [4.7 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
  2012-04-12  1:18 ` [Bug c++/52942] " paolo.carlini at oracle dot com
@ 2012-04-12  1:39 ` paolo.carlini at oracle dot com
  2012-04-12  8:40 ` [Bug libstdc++/52942] " redi at gcc dot gnu.org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-04-12  1:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-12 01:38:50 UTC ---
Bah, the more I look into it, the more seems indeed a front-end issue, I see
only public typedefs around. Then we would badly need a small reproducer.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
  2012-04-12  1:18 ` [Bug c++/52942] " paolo.carlini at oracle dot com
  2012-04-12  1:39 ` paolo.carlini at oracle dot com
@ 2012-04-12  8:40 ` redi at gcc dot gnu.org
  2012-04-12  8:47 ` redi at gcc dot gnu.org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: redi at gcc dot gnu.org @ 2012-04-12  8:40 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |libstdc++
           Severity|major                       |normal

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-12 08:40:06 UTC ---
unordered_map derives privately from its template _ExtractKey parameter which
is _Select1st and provides argument_type.

If G++ checked access control in SFINAE situations I believe the code would
work, as __has_argument_type would not report an access failure, unfortunately
that isn't implemented in G++


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (2 preceding siblings ...)
  2012-04-12  8:40 ` [Bug libstdc++/52942] " redi at gcc dot gnu.org
@ 2012-04-12  8:47 ` redi at gcc dot gnu.org
  2012-04-12  9:04 ` paolo.carlini at oracle dot com
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: redi at gcc dot gnu.org @ 2012-04-12  8:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-12 08:46:04 UTC ---
The solution would be to follow the same pattern as the other containers:

template<typename A, typename B>
struct Cont
{
    struct Impl : B
   { 
       A* data;
   };
   Impl impl;
};

instead the hash tables are more like:

template<typename A, typename B>
struct Impl : A, B
{ };

template<typename A, typename B>
struct Cont : Impl<A, B>
{ };

which means Cont inherits all the members of A and B (including typedefs and
potentially virtual functions)


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (3 preceding siblings ...)
  2012-04-12  8:47 ` redi at gcc dot gnu.org
@ 2012-04-12  9:04 ` paolo.carlini at oracle dot com
  2012-04-12  9:07 ` redi at gcc dot gnu.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-04-12  9:04 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bkoz at redhat dot com,
                   |                            |fdumont at gcc dot gnu.org

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-12 09:03:45 UTC ---
I see, thanks. Then, short term shall we just change the derivation to public
(with a comment)? Then, in mainline either somebody will do the sfinae bits
(even me ;) I mean to seriously look into it), or something else can be
changed. Seems a good way forward.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (4 preceding siblings ...)
  2012-04-12  9:04 ` paolo.carlini at oracle dot com
@ 2012-04-12  9:07 ` redi at gcc dot gnu.org
  2012-04-12  9:09 ` redi at gcc dot gnu.org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: redi at gcc dot gnu.org @ 2012-04-12  9:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-12 09:06:59 UTC ---
Or for the hash tables, which have lots of template parameters, it would be
even better to use std::tuple to get the EBO benefits


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (5 preceding siblings ...)
  2012-04-12  9:07 ` redi at gcc dot gnu.org
@ 2012-04-12  9:09 ` redi at gcc dot gnu.org
  2012-04-12  9:26 ` [Bug libstdc++/52942] [4.7/4.8 " rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: redi at gcc dot gnu.org @ 2012-04-12  9:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-12 09:08:33 UTC ---
(In reply to comment #5)
> I see, thanks. Then, short term shall we just change the derivation to public

Hmm, that might be ok ... it would be the least invasive change, certainly


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7/4.8 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (6 preceding siblings ...)
  2012-04-12  9:09 ` redi at gcc dot gnu.org
@ 2012-04-12  9:26 ` rguenth at gcc dot gnu.org
  2012-04-12  9:33 ` paolo.carlini at oracle dot com
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-12  9:26 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.1
            Summary|[4.7 Regression] using      |[4.7/4.8 Regression] using
                   |std::ref with a             |std::ref with a
                   |std::unordered_map fails to |std::unordered_map fails to
                   |compile                     |compile


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7/4.8 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (7 preceding siblings ...)
  2012-04-12  9:26 ` [Bug libstdc++/52942] [4.7/4.8 " rguenth at gcc dot gnu.org
@ 2012-04-12  9:33 ` paolo.carlini at oracle dot com
  2012-04-12  9:57 ` paolo.carlini at oracle dot com
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-04-12  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-12 09:33:14 UTC ---
Uhm, short term, I like even better just not using _Select1st *at all*, have an
implementation detail in the hashtable header itself not deriving from
unary_function. Isn't that a bit redundant but cleaner?


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7/4.8 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (8 preceding siblings ...)
  2012-04-12  9:33 ` paolo.carlini at oracle dot com
@ 2012-04-12  9:57 ` paolo.carlini at oracle dot com
  2012-04-12 10:05 ` redi at gcc dot gnu.org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-04-12  9:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-12 09:56:54 UTC ---
... or ;) in C++11 mode, have _Select1st and _Identity not deriving from
unary_function. Should work, very, very simple patch, and in any case the
latter is deprecated in C++11, we really want to see it around as little as
possible.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7/4.8 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (9 preceding siblings ...)
  2012-04-12  9:57 ` paolo.carlini at oracle dot com
@ 2012-04-12 10:05 ` redi at gcc dot gnu.org
  2012-04-12 10:14 ` paolo.carlini at oracle dot com
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: redi at gcc dot gnu.org @ 2012-04-12 10:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-12 10:04:51 UTC ---
where else is _Select1st used?  Does it need argument_type and result_type
defined?  It doesn't matter if they come from unary_function, but it might
matter that they're defined, and if they need to be there then the bug will
still exist


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7/4.8 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (10 preceding siblings ...)
  2012-04-12 10:05 ` redi at gcc dot gnu.org
@ 2012-04-12 10:14 ` paolo.carlini at oracle dot com
  2012-04-12 10:27 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-04-12 10:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-12 10:14:15 UTC ---
Only in a few places in the associative, to instantiate _Rb_tree, but the
nested types are not used at all, afaics. And, well, if (in the near future) we
figure out some sort of nested types can be useful to have for such extensions,
we can still have with a different name.

So far the obvious patch appears to work pretty well. I'm completing
regtesting.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7/4.8 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (11 preceding siblings ...)
  2012-04-12 10:14 ` paolo.carlini at oracle dot com
@ 2012-04-12 10:27 ` paolo.carlini at oracle dot com
  2012-04-12 12:18 ` paolo at gcc dot gnu.org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-04-12 10:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-12 10:27:16 UTC ---
Created attachment 27139
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27139
Draft I'm testing


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7/4.8 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (12 preceding siblings ...)
  2012-04-12 10:27 ` paolo.carlini at oracle dot com
@ 2012-04-12 12:18 ` paolo at gcc dot gnu.org
  2012-04-12 12:19 ` paolo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: paolo at gcc dot gnu.org @ 2012-04-12 12:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-04-12 12:18:15 UTC ---
Author: paolo
Date: Thu Apr 12 12:18:06 2012
New Revision: 186375

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186375
Log:
2012-04-12  Paolo Carlini  <paolo.carlini@oracle.com>

    PR libstdc++/52942
    * include/bits/stl_function.h (_Identity, _Select1st, _Select2nd):
    In C++11 mode do not derive from std::unary_function.
    * include/ext/functional (identity, select1st, select2nd): Adjust.
    * testsuite/23_containers/unordered_map/requirements/52942.cc: New.
    * testsuite/23_containers/unordered_set/requirements/52942.cc: Likewise.

Added:
   
trunk/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/52942.cc
   
trunk/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/52942.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/stl_function.h
    trunk/libstdc++-v3/include/ext/functional


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7/4.8 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (13 preceding siblings ...)
  2012-04-12 12:18 ` paolo at gcc dot gnu.org
@ 2012-04-12 12:19 ` paolo at gcc dot gnu.org
  2012-04-12 12:20 ` paolo.carlini at oracle dot com
  2012-04-22  8:08 ` paolo.carlini at oracle dot com
  16 siblings, 0 replies; 18+ messages in thread
From: paolo at gcc dot gnu.org @ 2012-04-12 12:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-04-12 12:18:33 UTC ---
Author: paolo
Date: Thu Apr 12 12:18:23 2012
New Revision: 186376

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186376
Log:
2012-04-12  Paolo Carlini  <paolo.carlini@oracle.com>

    PR libstdc++/52942
    * include/bits/stl_function.h (_Identity, _Select1st, _Select2nd):
    In C++11 mode do not derive from std::unary_function.
    * include/ext/functional (identity, select1st, select2nd): Adjust.
    * testsuite/23_containers/unordered_map/requirements/52942.cc: New.
    * testsuite/23_containers/unordered_set/requirements/52942.cc: Likewise.

Added:
   
branches/gcc-4_7-branch/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/52942.cc
   
branches/gcc-4_7-branch/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/52942.cc
Modified:
    branches/gcc-4_7-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_7-branch/libstdc++-v3/include/bits/stl_function.h
    branches/gcc-4_7-branch/libstdc++-v3/include/ext/functional


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7/4.8 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (14 preceding siblings ...)
  2012-04-12 12:19 ` paolo at gcc dot gnu.org
@ 2012-04-12 12:20 ` paolo.carlini at oracle dot com
  2012-04-22  8:08 ` paolo.carlini at oracle dot com
  16 siblings, 0 replies; 18+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-04-12 12:20 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #15 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-12 12:19:31 UTC ---
Done.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libstdc++/52942] [4.7/4.8 Regression] using std::ref with a std::unordered_map fails to compile
  2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
                   ` (15 preceding siblings ...)
  2012-04-12 12:20 ` paolo.carlini at oracle dot com
@ 2012-04-22  8:08 ` paolo.carlini at oracle dot com
  16 siblings, 0 replies; 18+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-04-22  8:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-22 08:08:05 UTC ---
*** Bug 53067 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-04-22  8:08 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12  0:34 [Bug c++/52942] New: [4.7 Regression] using std::ref with a std::unordered_map fails to compile cmaloney at tagged dot com
2012-04-12  1:18 ` [Bug c++/52942] " paolo.carlini at oracle dot com
2012-04-12  1:39 ` paolo.carlini at oracle dot com
2012-04-12  8:40 ` [Bug libstdc++/52942] " redi at gcc dot gnu.org
2012-04-12  8:47 ` redi at gcc dot gnu.org
2012-04-12  9:04 ` paolo.carlini at oracle dot com
2012-04-12  9:07 ` redi at gcc dot gnu.org
2012-04-12  9:09 ` redi at gcc dot gnu.org
2012-04-12  9:26 ` [Bug libstdc++/52942] [4.7/4.8 " rguenth at gcc dot gnu.org
2012-04-12  9:33 ` paolo.carlini at oracle dot com
2012-04-12  9:57 ` paolo.carlini at oracle dot com
2012-04-12 10:05 ` redi at gcc dot gnu.org
2012-04-12 10:14 ` paolo.carlini at oracle dot com
2012-04-12 10:27 ` paolo.carlini at oracle dot com
2012-04-12 12:18 ` paolo at gcc dot gnu.org
2012-04-12 12:19 ` paolo at gcc dot gnu.org
2012-04-12 12:20 ` paolo.carlini at oracle dot com
2012-04-22  8:08 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).