MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
Mcro::Badge::TBadge< T > Class Template Reference

#include <Badge.h>

Detailed Description

template<class T>
class Mcro::Badge::TBadge< T >

Use this template to give exclusive access to functions to specific classes, like so: class A; class B; class C;

class A { static void CallFromB(TBadge<B> badge) {...} };

class B { void Foobar() { // OK A::CallFromB({}); } };

class C { void Foobar() { // compile error: // badge template instance declared in A::CallFromB is only friends with class B, // therefore the private default constructor is inaccessible from class C A::CallFromB({}); } };

Definition at line 48 of file Badge.h.


The documentation for this class was generated from the following file: