cpp-cheat/cpp/crtp.cpp
2015-06-18 16:54:01 +02:00

21 lines
540 B
C++

/*
# CRTP
Curiously recurring template pattern.
http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern#Static_polymorphism
# Static interfaces
It is possible to assert that interfaces are implemented without dynamic vtable overhead via CRTP:
- http://stackoverflow.com/questions/2587541/does-c-have-a-static-polymorphism-implementation-of-interface-that-does-not-us
- http://en.wikipedia.org/wiki/Template_metaprogramming#Static_polymorphism
*/
#include "common.hpp"
int main() {
// TODO example
}