mirror of
https://github.com/boostorg/charconv.git
synced 2026-02-09 23:12:24 +00:00
Add static_assert for sizeof uchar_values array
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <type_traits>
|
||||
#include <limits>
|
||||
#include <array>
|
||||
#include <cstdlib>
|
||||
#include <cerrno>
|
||||
#include <cstddef>
|
||||
@@ -63,6 +62,8 @@ static constexpr unsigned char uchar_values[] =
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
||||
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255};
|
||||
|
||||
static_assert(sizeof(uchar_values) == 256, "uchar_values should represent all 256 values of unsigned char");
|
||||
|
||||
// Convert characters for 0-9, A-Z, a-z to 0-35. Anything else is 255
|
||||
constexpr unsigned char digit_from_char(char val) noexcept
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user