memgraph/src/utils/pass_key.hpp
Marko Budiselic e7f5bd4c21 antlr integration, *.hpp and *.cpp inside src dir, cleanup
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
2017-02-17 16:20:31 +01:00

23 lines
571 B
C++

//
// Copyright 2017 Memgraph
// Created by Marko Budiselic
//
// SOURCES:
// http://arne-mertz.de/2016/10/passkey-idiom/
// http://stackoverflow.com/questions/3217390/clean-c-granular-friend-equivalent-answer-attorney-client-idiom
#pragma once
template<typename T>
class PassKey {
friend T;
private:
// default constructor has to be manually defined otherwise = default
// would allow aggregate initialization to bypass default constructor
// both, default and copy constructors have to be user-defined
// otherwise are public by default
PassKey() {}
};