arg_router  1.4.0
C++ command line argument parsing and routing
arg_router::utility::utf8::code_point::range Class Reference

#include <arg_router/utility/utf8/code_point.hpp>

Public Member Functions

constexpr range (type first, type last, std::uint8_t meta=0) noexcept
 
constexpr type first () const noexcept
 
constexpr type last () const noexcept
 
constexpr std::uint8_t meta () const noexcept
 
constexpr bool operator< (range other) const noexcept
 
constexpr bool operator< (type cp) const noexcept
 

Detailed Description

Defines an inclusive contiguous range of code points, plus some meta data specific to the table type it comes from.

Definition at line 21 of file code_point.hpp.

Constructor & Destructor Documentation

◆ range()

constexpr arg_router::utility::utf8::code_point::range::range ( type  first,
type  last,
std::uint8_t  meta = 0 
)
inlineconstexprnoexcept

Constructor.

Note
Only the first 21 bits of a code point are valid Unicode data, and so that is all that is stored in here
Parameters
firstFirst code point in range
lastInclusive last code point in range
metaMetadata, only the first 6 bits are used. Zero will be set if unused

Definition at line 32 of file code_point.hpp.

Member Function Documentation

◆ first()

constexpr type arg_router::utility::utf8::code_point::range::first ( ) const
inlineconstexprnoexcept

First code point in range.

Returns
Code point

Definition at line 62 of file code_point.hpp.

◆ last()

constexpr type arg_router::utility::utf8::code_point::range::last ( ) const
inlineconstexprnoexcept

Inclusive last code point in range.

Returns
Code point

Definition at line 77 of file code_point.hpp.

◆ meta()

constexpr std::uint8_t arg_router::utility::utf8::code_point::range::meta ( ) const
inlineconstexprnoexcept

Meta data.

Returns
Meta data, zero if unset

Definition at line 93 of file code_point.hpp.

◆ operator<() [1/2]

constexpr bool arg_router::utility::utf8::code_point::range::operator< ( range  other) const
inlineconstexprnoexcept

Less than operator.

Parameters
otherInstance to compare against
Returns
True if this is less than other

Definition at line 104 of file code_point.hpp.

◆ operator<() [2/2]

constexpr bool arg_router::utility::utf8::code_point::range::operator< ( type  cp) const
inlineconstexprnoexcept

Less than operator for a single code point.

Parameters
cpInstance to compare against
Returns
True if the start of this range is less than cp

Definition at line 117 of file code_point.hpp.


The documentation for this class was generated from the following file: