static if in plain c++?
问题 Problem in short: How could one implement static if functionality, proposed in c++11, in plain c++ ? History and original problem: Recently I came up with a problem like this. I need a class Sender with an interface like class Sender { void sendMessage( ... ); void sendRequest( ... ); void sendFile( ... ); // lots of different send methods, not important actually } In some cases I will need to create a DoubleSender , i.e. an instance of this class, which would call its methods twice, i.e.