Plutonium framework API
0.3
Simple UI framework for libnx and SDL2
Main Page
Namespaces
Classes
Files
File List
File Members
pu_Macros.hpp
Go to the documentation of this file.
1
2
#pragma once
3
4
#include <memory>
5
#include <switch.h>
6
7
// Defines a static function (::New(...)) as a constructor for smart ptrs, also defines a custom type (::Ref) to simplify it
8
#define PU_SMART_CTOR(type) \
9
using Ref = std::shared_ptr<type>; \
10
template<typename ...Args> \
11
static Ref New(Args &&...CtorArgs) \
12
{ \
13
return std::move(std::make_shared<type>(std::forward<Args>(CtorArgs)...)); \
14
}
15
16
// For convenience
17
using
i32
= s32;
i32
s32 i32
Definition:
pu_Macros.hpp:17
Plutonium
Include
pu
pu_Macros.hpp
Generated by
1.8.11