using声明可以区分重载函数吗?

时间:2016-02-25 13:23:18

标签: c++

我想做点什么:

struct Base{
private:
  int x_;
public:
  Base& x(int x) { x_=x; return *this; }
  int x() const { return x_; } 
};

struct Derived : private Base {
public:
  using Base::x; //just the getter?
private:
  using Base::x; //the setter
};

0 个答案:

没有答案