Last active
August 29, 2015 14:21
-
-
Save david50407/413f564ebc75a282b28f to your computer and use it in GitHub Desktop.
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
int main() { return 0; } | |
template <class T> | |
struct Interface | |
{ | |
public: | |
// static T testing() {}; | |
private: | |
static T (*__testing_checker)(); | |
}; | |
template <class T> | |
T (*Interface<T>::__testing_checker)() = T::testing(); | |
class Impl : public Interface<Impl> | |
{ | |
public: | |
Impl() {} | |
static Impl testing() { return Impl(); }; | |
}; | |
void test() | |
{ | |
Impl::testing(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment