IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
container_logic.hxx
Go to the documentation of this file.
1
3
4#pragma once
5#include <ice/base.hxx>
6
7namespace ice
8{
9
13 {
17
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>)
34
35
36} // namespace ice
A concept that ensures only types that can be trivially copyable can be 'forced' to use trifial Logic...
Definition container_logic.hxx:25
SPDX-License-Identifier: MIT.
Definition array.hxx:12
ContainerLogic
The logic implemented by a collectiont type when working with data. (Copying, Moving,...
Definition container_logic.hxx:13
@ Complex
The collection handles complex data types and properly implements copy and move semantics.
Definition container_logic.hxx:19
@ Trivial
The collection only handles plain old data and is allowed to memcopy values.
Definition container_logic.hxx:16
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
std::uint8_t u8
Definition types.hxx:24