mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 21:33:59 +08:00
libstdc++: Stop using std::unary_function in perf tests
This fixes some -Wdeprecated-declarations warnings. libstdc++-v3/ChangeLog: * testsuite/performance/ext/pb_ds/hash_int_erase_mem.cc: Replace std::unary_function with result_type and argument_type typedefs. * testsuite/util/performance/assoc/multimap_common_type.hpp: Likewise.
This commit is contained in:
parent
42def7cd8b
commit
8586e16154
@ -45,8 +45,11 @@
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
|
||||
struct int_hash : public std::unary_function<int, int>
|
||||
struct int_hash
|
||||
{
|
||||
typedef int result_type;
|
||||
typedef int argument_type;
|
||||
|
||||
inline int
|
||||
operator()(int i) const
|
||||
{ return i; }
|
||||
|
@ -46,8 +46,11 @@ namespace __gnu_pbds
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
struct int_hash : public std::unary_function<int, size_t>
|
||||
struct int_hash
|
||||
{
|
||||
typedef size_t result_type;
|
||||
typedef int argument_type;
|
||||
|
||||
inline size_t
|
||||
operator()(const int i) const
|
||||
{ return (static_cast<size_t>(i)); }
|
||||
|
Loading…
Reference in New Issue
Block a user