MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
TestHelpers.h
Go to the documentation of this file.
1/** @noop License Comment
2 * @file
3 * @copyright
4 * This Source Code is subject to the terms of the Mozilla Public License, v2.0.
5 * If a copy of the MPL was not distributed with this file You can obtain one at
6 * https://mozilla.org/MPL/2.0/
7 *
8 * @author David Mórász
9 * @date 2025
10*/
11
12#pragma once
13
14#include "CoreMinimal.h"
15
16struct FCopyForbidden : FNoncopyable {};
17
19{
20 FORCEINLINE FCopyConstructCounter() {}
22 : CopyCount(other.CopyCount + 1)
23 {}
24 FORCEINLINE FCopyConstructCounter(FCopyConstructCounter&& other) noexcept
25 : MoveCount(other.MoveCount + 1)
26 {}
27
30
31 int32 CopyCount = 0;
32 int32 MoveCount = 0;
33 int32 CopyAssignCount = 0;
34 int32 MoveAssignCount = 0;
35};
auto operator=(FCopyConstructCounter const &other) -> FCopyConstructCounter &
auto operator=(FCopyConstructCounter &&other) noexcept -> FCopyConstructCounter &
FORCEINLINE FCopyConstructCounter()
Definition TestHelpers.h:20
FORCEINLINE FCopyConstructCounter(FCopyConstructCounter const &other)
Definition TestHelpers.h:21
FORCEINLINE FCopyConstructCounter(FCopyConstructCounter &&other) noexcept
Definition TestHelpers.h:24