You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here: operator() ... expands to:
using ManyParentsWithOperator<CustomerHash, CustomerEq>::operator();
using ManyParentsWithOperator<CustomerHash, CustomerEq>::operator();
I would expect it to expand to
using CustomerHash::operator();
using CustomerEq::operator();
The text was updated successfully, but these errors were encountered:
…a using.
For example:
```
struct X {
int f(int);
int f(double);
protected:
int x;
};
struct Y: X {
using X::f;
using X::x;
};
```
Will make the functions `f(int)` and `f(double)` available in `Y` as
well as it moves `X::x` from `protected` to `public` in `Y`. All these
functions or members are shown as comments only.
Fixed#184 which points out the invalid prefix from a using decl.
…a using.
For example:
```
struct X {
int f(int);
int f(double);
protected:
int x;
};
struct Y: X {
using X::f;
using X::x;
};
```
Will make the functions `f(int)` and `f(double)` available in `Y` as
well as it moves `X::x` from `protected` to `public` in `Y`. All these
functions or members are shown as comments only.
Fixed#184 which points out the invalid prefix from a using decl.
#include
#include <unordered_set>
class Customer{
std::string name;
public:
Customer(const std::string &n) : name(n){}
std::string getName()const{return name;}
};
struct CustomerEq{
bool operator()(const Customer&c0,const Customer&c1)const{
return c0.getName() == c1.getName();
}
};
struct CustomerHash{
std::size_t operator()(const Customer& c) const{
return std::hashstd::string()(c.getName());
}
};
template<typename ... Bases>
struct ManyParentsWithOperator : Bases...{
using Bases::operator()...;//C++17
};
int main()
{
std::unordered_set<Customer, CustomerHash, CustomerEq> set1;
std::unordered_set<Customer, ManyParentsWithOperator<CustomerHash, CustomerEq>, ManyParentsWithOperator<CustomerHash, CustomerEq>> set2;
std::unordered_set<Customer, ManyParentsWithOperator<CustomerEq, CustomerHash>, ManyParentsWithOperator<CustomerEq, CustomerHash>> set3;
}
Here: operator() ... expands to:
using ManyParentsWithOperator<CustomerHash, CustomerEq>::operator();
using ManyParentsWithOperator<CustomerHash, CustomerEq>::operator();
I would expect it to expand to
using CustomerHash::operator();
using CustomerEq::operator();
The text was updated successfully, but these errors were encountered: