Using the using-directive I'm able to select a certain set of methods from the base class to put into a different access scope. Is this also possible for individual overloads of the method? Something like this:
#include <iostream>
class base {
public:
auto print() -> void {
std::cout << "Hello World" << std::endl;
}
auto something_else(int) -> void {
std::cout << "Hello int stuff" << std::endl;
}
auto something_else(bool) -> void {
std::cout << "Hello bool stuff" << std::endl;
}
};
class derived : public base {
public:
using base::something_else(bool);
private:
using base::something_else(int);
};
int main() {
derived d;
d.print();
d.something_else(2);
d.something_else(true);
}