build: don't use a space in user string literals
This fixes errors in clang-17
This commit is contained in:
parent
ff1fcfa977
commit
19095934b2
@ -189,7 +189,7 @@ namespace cruft::ascii {
|
|||||||
/// The supplied string must have a length that is a multiple of 2.
|
/// The supplied string must have a length that is a multiple of 2.
|
||||||
std::vector<std::uint8_t>
|
std::vector<std::uint8_t>
|
||||||
inline
|
inline
|
||||||
operator"" _hex2u08 (const char *str, size_t len)
|
operator""_hex2u08 (const char *str, size_t len)
|
||||||
{
|
{
|
||||||
CHECK_MOD (len, 2);
|
CHECK_MOD (len, 2);
|
||||||
std::vector<uint8_t> res (len/2);
|
std::vector<uint8_t> res (len/2);
|
||||||
@ -206,7 +206,7 @@ operator"" _hex2u08 (const char *str, size_t len)
|
|||||||
/// The supplied string must have a length that is a multiple of 2.
|
/// The supplied string must have a length that is a multiple of 2.
|
||||||
template <typename CharT, CharT ...StrV>
|
template <typename CharT, CharT ...StrV>
|
||||||
constexpr auto
|
constexpr auto
|
||||||
operator"" _hex2array (void)
|
operator""_hex2array (void)
|
||||||
{
|
{
|
||||||
static_assert (sizeof ...(StrV) % 2 == 0);
|
static_assert (sizeof ...(StrV) % 2 == 0);
|
||||||
|
|
||||||
|
@ -5,17 +5,6 @@
|
|||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
|
||||||
std::vector<uint8_t>
|
|
||||||
operator"" _u8s (const char *str, size_t len)
|
|
||||||
{
|
|
||||||
std::vector<uint8_t> res;
|
|
||||||
res.resize (len);
|
|
||||||
std::copy_n (str, len, std::begin (res));
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
std::vector<uint8_t>
|
std::vector<uint8_t>
|
||||||
operator"" _u8s (const char *str, size_t len)
|
operator""_u8s (const char *str, size_t len)
|
||||||
{
|
{
|
||||||
std::vector<uint8_t> res;
|
std::vector<uint8_t> res;
|
||||||
res.resize (len);
|
res.resize (len);
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
std::vector<uint8_t>
|
std::vector<uint8_t>
|
||||||
operator"" _u8s (const char *str, size_t len)
|
operator""_u8s (const char *str, size_t len)
|
||||||
{
|
{
|
||||||
std::vector<uint8_t> res;
|
std::vector<uint8_t> res;
|
||||||
res.resize (len);
|
res.resize (len);
|
||||||
|
2
utf8.cpp
2
utf8.cpp
@ -37,7 +37,7 @@ struct test {
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
static constexpr test<uint32_t>
|
static constexpr test<uint32_t>
|
||||||
operator"" _test (const char *str, size_t len)
|
operator""_test (const char *str, size_t len)
|
||||||
{
|
{
|
||||||
uint32_t mask = 0;
|
uint32_t mask = 0;
|
||||||
uint32_t bits = 0;
|
uint32_t bits = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user