e7f5bd4c21
Summary: antlr integration, *.hpp and *.cpp inside src dir, cleanup Test Plan: manual Reviewers: mislav.bradac, dgleich, florijan Reviewed By: florijan Subscribers: pullbot, buda Differential Revision: https://phabricator.memgraph.io/D49
19 lines
355 B
C++
19 lines
355 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);
|
|
}
|
|
|
|
const Derived& derived() const
|
|
{
|
|
return *static_cast<const Derived*>(this);
|
|
}
|
|
};
|