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

Use this template to give exclusive access to functions to specific classes. More...

#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({});
}
};
Use this template to give exclusive access to functions to specific classes.
Definition Badge.h:54

Definition at line 53 of file Badge.h.


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