memgraph/utils/crtp.hpp
2015-12-07 21:51:55 +01:00

14 lines
256 B
C++

#pragma once
// a helper class for implementing static casting to a derived class using the
// curiously recurring template pattern
template <class Derived>
struct Crtp
{
Derived& derived()
{
return *static_cast<Derived*>(this);
}
};