Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Добавить std::int128_t, std::uint128_t типы #572

Open
klappdev opened this issue Aug 24, 2023 · 1 comment
Open

Добавить std::int128_t, std::uint128_t типы #572

klappdev opened this issue Aug 24, 2023 · 1 comment

Comments

@klappdev
Copy link

В С++23 были добавленны вещественные типы фиксированого размера.

#include <stdfloat>

bfloat16_t bf16 = 10.0bf16;
float16_t f16 = 20.0f16;
float32_t f32 = 30.0f32;
float64_t f64 = 40.0f64;
float128_t f128 = 50.0f128;

https://en.cppreference.com/w/cpp/types/floating-point

В С++11 ранее были добавлены целочисленные типы фиксированного размера.

#include <cstdint>

std::int64_t i64 = 10;

https://en.cppreference.com/w/cpp/types/integer

Но типы std::int128_t, std::uint128_t не были добавлены.
Большенство компиляторов поддерживаю в виде расширения int128_t и uint128_t.
Также boost поддерживает работу с такими типами.

Предлагается добавить в std::int128_t и std::uint128_t типы для консистенстности к вещественным типам

@klappdev klappdev changed the title Добавить std::int128_t, std::uint128_t типі Добавить std::int128_t, std::uint128_t типы Aug 24, 2023
@apolukhin apolukhin mentioned this issue Feb 23, 2024
@apolukhin
Copy link
Member

В стандарт C добавили _BitInt. Надеюсь что в ближайшее время этот тип данных попадёт и в C++, вместе чо всеми нужными расширениями для стандартной библиотеки

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants