Created
October 18, 2019 08:02
-
-
Save lvpidadiao/206ff84883716484a320f8cb9faa5cf5 to your computer and use it in GitHub Desktop.
simple selector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class connbase { | |
public: | |
virtual void Send() = 0; | |
}; | |
typedef enum { | |
WithEnc, | |
WithoutEnc | |
}enc; | |
template <enc T> | |
class connector : public connbase{ | |
public: | |
void Send() override { | |
std::cout << "without encrypt " << std::endl; | |
}; | |
}; | |
template <> | |
void connector<enc::WithoutEnc>::Send() { | |
std::cout << "fuck you encrypt " << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment