1 #pragma once // Source encoding: UTF-8 with BOM (π is a lowercase Greek "pi"). 10 #include <string_view> 14 CPPX_USE_STD( basic_string, basic_string_view, bitset, char_traits, size );
16 template<
class Collection >
17 constexpr
auto n_items_of(
const Collection& c ) noexcept
24 {
return bits.count(); }
26 template<
class Char >
29 {
return char_traits<Char>::length( s ); }
31 template<
class Char >
32 inline auto length_of(
const basic_string<Char>& s ) noexcept
34 {
return s.length(); }
36 template<
class Char >
37 inline auto length_of(
const basic_string_view<Char>& sv ) noexcept
39 {
return sv.length(); }
Some_type * P_
Creates a raw pointer type.
constexpr auto n_items_of(const Collection &c) noexcept -> Size
CPPX_USE_STD(basic_string, basic_string_view, bitset, char_traits, size)
Simple type builders Type_, P_, R_, Raw_array_ and Raw_array_of_.
Signed_< size_t > Size
A Signed_ equivalent of size_t.
Macros for generating more concise and clear using statements, primarily $use_cppx and $use_std,...
auto length_of(const P_< const Char > s) noexcept -> Size
Static size checkers: bits_per_, array_size_of (raw array, array and bitset) and length_of_literal (a...