M
Mark Huppert
Dear Colleagues
re: 'using' and the ANSI C++ standard
According to the ANSI C++ standard, is this a valid
way (disregarding whether it is 'naughty') of converting a
public method in the base class into a private method in the child class?
My g++ compiler ignores this without comment.
class parent{
public:
double length(double num) {return num; }
};
class child: public parent {
public:
double hiding(double num) {return length(num);}
private:
using parent::length;
};
ie, equivalent to:
private:
double length(double num) {return parent::length(num); }
Mark Huppert
re: 'using' and the ANSI C++ standard
According to the ANSI C++ standard, is this a valid
way (disregarding whether it is 'naughty') of converting a
public method in the base class into a private method in the child class?
My g++ compiler ignores this without comment.
class parent{
public:
double length(double num) {return num; }
};
class child: public parent {
public:
double hiding(double num) {return length(num);}
private:
using parent::length;
};
ie, equivalent to:
private:
double length(double num) {return parent::length(num); }
Mark Huppert