Searched defs:pu8_traits (Results 1 – 2 of 2) sorted by relevance
242 struct pu8_traits struct244 using mem_t = char;245 using code_t = char;246 using string_type = std::string;247 static std::size_t len(const string_type &p) noexcept { return p.size(); } in len()248 static std::size_t codelen(const mem_t *p) noexcept { plib::unused_var(p); return 1; } in codelen()249 static std::size_t codelen(code_t c) noexcept { plib::unused_var(c); return 1; } in codelen()250 static code_t code(const mem_t *p) noexcept { return *p; } in code()251 static void encode(const code_t c, string_type &s) { s += static_cast<mem_t>(c); } in encode()252 static const mem_t *nthcode(const mem_t *p, std::size_t n) noexcept { return &(p[n]); } in nthcode()