IceShard
1
A personal game engine project, with development focused on 2D/2.5D games.
Toggle main menu visibility
Loading...
Searching...
No Matches
collections
public
ice
container
container_logic.hxx
Go to the documentation of this file.
1
3
4
#pragma once
5
#include <
ice/base.hxx
>
6
7
namespace
ice
8
{
9
12
enum class
ContainerLogic
:
ice::u8
13
{
16
Trivial
,
17
19
Complex
,
20
};
21
22
24
template
<
typename
Type>
25
concept
TrivialContainerLogicAllowed
= std::is_trivially_copyable_v<Type> && std::is_trivially_destructible_v<Type> && std::is_default_constructible_v<Type>;
26
30
template
<
typename
Type>
31
static
constexpr
ice::ContainerLogic
Constant_DefaultContainerLogic
= (std::is_pod_v<Type> || std::is_enum_v<Type>)
32
?
ContainerLogic::Trivial
33
:
ContainerLogic
::
Complex
;
34
35
36
}
// namespace ice
base.hxx
ice::TrivialContainerLogicAllowed
A concept that ensures only types that can be trivially copyable can be 'forced' to use trifial Logic...
Definition
container_logic.hxx:25
ice
SPDX-License-Identifier: MIT.
Definition
array.hxx:12
ice::ContainerLogic
ContainerLogic
The logic implemented by a collectiont type when working with data. (Copying, Moving,...
Definition
container_logic.hxx:13
ice::ContainerLogic::Complex
@ Complex
The collection handles complex data types and properly implements copy and move semantics.
Definition
container_logic.hxx:19
ice::ContainerLogic::Trivial
@ Trivial
The collection only handles plain old data and is allowed to memcopy values.
Definition
container_logic.hxx:16
ice::Constant_DefaultContainerLogic
static constexpr ice::ContainerLogic Constant_DefaultContainerLogic
A helper used to pick the desired logic when it comes to handling data in collections.
Definition
container_logic.hxx:31
ice::u8
std::uint8_t u8
Definition
types.hxx:24
Generated by
1.18.0