27 Kasım 2017 Pazartesi

std::byte Enum

C++17 ile geliyor. Açıklaması şöyle.
Like char and unsigned char, it can be used to access raw memory occupied by other objects (object representation), but unlike those types, it is not a character type and is not an arithmetic type. A byte is only a collection of bits, and only bitwise logic operators are defined for it.
Şöyle yaparız
Result decode(std::span<const std::byte> buffer);

Hiç yorum yok:

Yorum Gönder