1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2024-11-12 21:09:01 +00:00
Sprout/sprout/weed/parser/numeric/hex.hpp

41 lines
1.4 KiB
C++
Raw Normal View History

2011-11-13 08:54:38 +00:00
#ifndef SPROUT_WEED_PARSER_NUMERIC_HEX_HPP
#define SPROUT_WEED_PARSER_NUMERIC_HEX_HPP
2011-11-14 04:22:04 +00:00
#include <cstdint>
2011-11-13 08:54:38 +00:00
#include <sprout/config.hpp>
2011-11-14 04:22:04 +00:00
#include <sprout/integer/integer_digits.hpp>
#include <sprout/weed/parser/numeric/uint_p.hpp>
2011-11-13 08:54:38 +00:00
namespace sprout {
namespace weed {
//
2011-11-14 04:22:04 +00:00
// hex
2011-11-13 08:54:38 +00:00
//
2011-11-14 04:22:04 +00:00
SPROUT_STATIC_CONSTEXPR auto hex = sprout::weed::uint_p<std::uintmax_t, 16, -1>();
2011-11-13 08:54:38 +00:00
//
// hex8
// hex16
// hex32
// hex64
//
2011-11-14 04:22:04 +00:00
SPROUT_STATIC_CONSTEXPR auto hex8 = sprout::weed::uint_p<std::uint8_t, 16>();
SPROUT_STATIC_CONSTEXPR auto hex16 = sprout::weed::uint_p<std::uint16_t, 16>();
SPROUT_STATIC_CONSTEXPR auto hex32 = sprout::weed::uint_p<std::uint32_t, 16>();
SPROUT_STATIC_CONSTEXPR auto hex64 = sprout::weed::uint_p<std::uint64_t, 16>();
2011-11-13 08:54:38 +00:00
//
// hex8f
// hex16f
// hex32f
// hex64f
//
2011-11-14 04:22:04 +00:00
SPROUT_STATIC_CONSTEXPR auto hex8f = sprout::weed::uint_p<std::uint8_t, 16, sprout::integer_digits<std::uint8_t, 16>::value>();
SPROUT_STATIC_CONSTEXPR auto hex16f = sprout::weed::uint_p<std::uint16_t, 16, sprout::integer_digits<std::uint16_t, 16>::value>();
SPROUT_STATIC_CONSTEXPR auto hex32f = sprout::weed::uint_p<std::uint32_t, 16, sprout::integer_digits<std::uint32_t, 16>::value>();
SPROUT_STATIC_CONSTEXPR auto hex64f = sprout::weed::uint_p<std::uint64_t, 16, sprout::integer_digits<std::uint64_t, 16>::value>();
2011-11-13 08:54:38 +00:00
} // namespace weed
} // namespace sprout
#endif // #ifndef SPROUT_WEED_PARSER_NUMERIC_HEX_HPP