Go to the source code of this file.
|
template<class iterator_t > |
void | qx::destruct (iterator_t itStart, iterator_t itEnd) |
| Call destructors. More...
|
|
template<size_t N, class T > |
constexpr auto | qx::make_array (T init_val=T()) |
| Fill array with value in constructor. More...
|
|
template<class T , std::size_t LeftLength, std::size_t RightLength> |
constexpr std::array< T, LeftLength+RightLength > | qx::join_arrays (std::array< T, LeftLength > rhs, std::array< T, RightLength > lhs) |
| Join arrays at compile-time. More...
|
|
template<class result_container_t , class container_t > |
result_container_t | qx::make_container (const container_t &from) |
| Create a container by constructing each element from the corresponding element of the original container. More...
|
|
template<class container_t > |
constexpr size_t | qx::bytes_size (const container_t &container) |
| Get the size of memory allocated for container elements. More...
|
|
- Author
- Khrapov
- Date
- 1.10.2023
- Copyright
- © Nick Khrapov, 2023. All right reserved.
Definition in file utils.inl.
◆ bytes_size()
template<class container_t >
constexpr size_t qx::bytes_size |
( |
const container_t & |
container | ) |
|
|
constexpr |
Get the size of memory allocated for container elements.
- Template Parameters
-
container_t | - container type |
- Parameters
-
container | - container const ref |
- Return values
-
- | the size of memory allocated for container elements |
Definition at line 55 of file utils.inl.
◆ destruct()
template<class iterator_t >
void qx::destruct |
( |
iterator_t |
itStart, |
|
|
iterator_t |
itEnd |
|
) |
| |
|
inline |
Call destructors.
- Template Parameters
-
iterator_t | - iterator type |
- Parameters
-
itStart | - start iterator |
itEnd | - end iterator |
Definition at line 14 of file utils.inl.
◆ join_arrays()
template<class T , std::size_t LeftLength, std::size_t RightLength>
constexpr std::array< T, LeftLength+RightLength > qx::join_arrays |
( |
std::array< T, LeftLength > |
rhs, |
|
|
std::array< T, RightLength > |
lhs |
|
) |
| |
|
constexpr |
Join arrays at compile-time.
- Template Parameters
-
T | - array value_type |
LeftLength | - left array length |
RightLength | - right array length |
- Parameters
-
rhs | - left array |
lhs | - right array |
- Return values
-
- | new array where elements from the right array placed after elements from the left array |
Definition at line 33 of file utils.inl.
◆ make_array()
template<size_t N, class T >
constexpr auto qx::make_array |
( |
T |
init_val = T() | ) |
|
|
constexpr |
Fill array with value in constructor.
- Template Parameters
-
N | - number of elements in array |
T | - array value type |
- Parameters
-
- Return values
-
Definition at line 25 of file utils.inl.
◆ make_container()
template<class result_container_t , class container_t >
result_container_t qx::make_container |
( |
const container_t & |
from | ) |
|
Create a container by constructing each element from the corresponding element of the original container.
- Template Parameters
-
result_container_t | - target container type, must support value_type and push_back |
container_t | - original container type, must support forward iteration |
- Parameters
-
- Return values
-
Definition at line 44 of file utils.inl.