mirror of
https://github.com/libretro/cpp-cheat.git
synced 2025-04-15 17:49:59 +00:00
21 lines
540 B
C++
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
|
|
}
|