TypeFromSize type alias template header.
More...
#include <type_traits>
#include <cstddef>
#include <cstdint>
Go to the source code of this file.
|
| estd |
| Collection of useful templates.
|
|
| estd::internal |
| Internals of estd namespace - should not be used directly!
|
|
|
#define | STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__) |
| Produces a static_assert() where the expression is also used as the message. More...
|
|
|
template<size_t size> |
using | estd::TypeFromSize = typename internal::TypeFromSize< size >::Type |
| Selects fixed width type from requested byte size. More...
|
|
|
| estd::STATIC_ASSERT (std::is_same< TypeFromSize< 0 >, uint8_t >::value==true) |
|
| estd::STATIC_ASSERT (std::is_same< TypeFromSize< 1 >, uint8_t >::value==true) |
|
| estd::STATIC_ASSERT (std::is_same< TypeFromSize< 2 >, uint16_t >::value==true) |
|
| estd::STATIC_ASSERT (std::is_same< TypeFromSize< 3 >, uint32_t >::value==true) |
|
| estd::STATIC_ASSERT (std::is_same< TypeFromSize< 4 >, uint32_t >::value==true) |
|
| estd::STATIC_ASSERT (std::is_same< TypeFromSize< 5 >, uint64_t >::value==true) |
|
| estd::STATIC_ASSERT (std::is_same< TypeFromSize< 6 >, uint64_t >::value==true) |
|
| estd::STATIC_ASSERT (std::is_same< TypeFromSize< 7 >, uint64_t >::value==true) |
|
| estd::STATIC_ASSERT (std::is_same< TypeFromSize< 8 >, uint64_t >::value==true) |
|
TypeFromSize type alias template header.
- Author
- Copyright (C) 2019 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
- License
- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
◆ STATIC_ASSERT
#define STATIC_ASSERT |
( |
|
... | ) |
static_assert(__VA_ARGS__, #__VA_ARGS__) |
Produces a static_assert()
where the expression is also used as the message.
- Parameters
-
[in] | <strong>VA_ARGS</strong> | is the expression that will be tested, which will also be used as the message |