Reputation: 23
In python I can do:
from long_and_painful import still_way_to_long as short
In C++ I am stuck with:
using long::and::painful::stillWayToLong;
... //Code and Stuff
stillWayToLong("Why must I type this so often?");
Am I missing something that would make this more pythonic?
Upvotes: 0
Views: 48
Reputation: 264571
How about
auto x = long::and::painful::stillWayToLong; // If this is an object/function
x("Why must I type this so often?");
using X = typename long::and::painful::stillWayToLong; // If this is a type.
X bob;
Upvotes: 1