class by_code_point (4 specializations)


template <
    typename CodeUnit
>
class by_code_point

Specialization 1

template <>
class by_code_point<char>

Public Aliases

using iterator = const_iterator

Public Member Functions

by_code_point ()
noexcept = default
explicit
by_code_point (
    std::string_view string_to_iterate
)
noexcept

Constructs a by_code_point from the given string.

Parameters:
  • string_to_iterate:

    The string to iterate over by code point.

by_code_point (
    const by_code_point& other
)
= default

Copy-constructs a by_code_point from an existing one.

Parameters:
  • other:

    The by_code_point to copy from.

by_code_point&
operator = (
    const by_code_point& other
)
= default

Copy-assigns a by_code_point into this one.

Parameters:
  • other:

    The by_code_point to copy from.

by_code_point (
    by_code_point&& other
)
noexcept = default

Move-constructs a by_code_point from an existing one.

Parameters:
  • other:

    The by_code_point to move from.

by_code_point&
operator = (
    by_code_point&& other
)
noexcept = default

Move-assigns a by_code_point into this one.

Parameters:
  • other:

    The by_code_point to move from.

const_iterator
begin ()
const noexcept

Returns a constant iterator to the beginning.

const_iterator
end ()
const noexcept

Returns a constant iterator to the end.

const_iterator
cbegin ()
const noexcept

Returns a constant iterator to the beginning.

const_iterator
cend ()
const noexcept

Returns a constant iterator to the end.

const_reverse_iterator
crbegin ()
const noexcept

Returns a constant reverse iterator to the beginning.

const_reverse_iterator
crend ()
const noexcept

Returns a constant reverse iterator to the end.


Specialization 2

template <>
class by_code_point<char8_t>

Public Aliases

using iterator = const_iterator

Public Member Functions

by_code_point ()
noexcept = default
explicit
by_code_point (
    std::u8string_view string_to_iterate
)
noexcept

Constructs a by_code_point from the given string.

Parameters:
  • string_to_iterate:

    The string to iterate over by code point.

by_code_point (
    const by_code_point& other
)
= default

Copy-constructs a by_code_point from an existing one.

Parameters:
  • other:

    The by_code_point to copy from.

by_code_point&
operator = (
    const by_code_point& other
)
= default

Copy-assigns a by_code_point into this one.

Parameters:
  • other:

    The by_code_point to copy from.

by_code_point (
    by_code_point&& other
)
noexcept = default

Move-constructs a by_code_point from an existing one.

Parameters:
  • other:

    The by_code_point to move from.

by_code_point&
operator = (
    by_code_point&& other
)
noexcept = default

Move-assigns a by_code_point into this one.

Parameters:
  • other:

    The by_code_point to move from.

const_iterator
begin ()
const noexcept

Returns a constant iterator to the beginning.

const_iterator
end ()
const noexcept

Returns a constant iterator to the end.

const_iterator
cbegin ()
const noexcept

Returns a constant iterator to the beginning.

const_iterator
cend ()
const noexcept

Returns a constant iterator to the end.

const_reverse_iterator
crbegin ()
const noexcept

Returns a constant reverse iterator to the beginning.

const_reverse_iterator
crend ()
const noexcept

Returns a constant reverse iterator to the end.


Specialization 3

template <>
class by_code_point<char16_t>

Public Aliases

using iterator = const_iterator

Public Member Functions

by_code_point ()
noexcept = default
explicit
by_code_point (
    std::u16string_view string_to_iterate
)
noexcept

Constructs a by_code_point from the given string.

Parameters:
  • string_to_iterate:

    The string to iterate over by code point.

by_code_point (
    const by_code_point& other
)
= default

Copy-constructs a by_code_point from an existing one.

Parameters:
  • other:

    The by_code_point to copy from.

by_code_point&
operator = (
    const by_code_point& other
)
= default

Copy-assigns a by_code_point into this one.

Parameters:
  • other:

    The by_code_point to copy from.

by_code_point (
    by_code_point&& other
)
noexcept = default

Move-constructs a by_code_point from an existing one.

Parameters:
  • other:

    The by_code_point to move from.

by_code_point&
operator = (
    by_code_point&& other
)
noexcept = default

Move-assigns a by_code_point into this one.

Parameters:
  • other:

    The by_code_point to move from.

const_iterator
begin ()
const noexcept

Returns a constant iterator to the beginning.

const_iterator
end ()
const noexcept

Returns a constant iterator to the end.

const_iterator
cbegin ()
const noexcept

Returns a constant iterator to the beginning.

const_iterator
cend ()
const noexcept

Returns a constant iterator to the end.

const_reverse_iterator
crbegin ()
const noexcept

Returns a constant reverse iterator to the beginning.

const_reverse_iterator
crend ()
const noexcept

Returns a constant reverse iterator to the end.


Specialization 4

template <>
class by_code_point<char32_t>

Public Aliases

using iterator = const_iterator

Public Member Functions

by_code_point ()
noexcept = default
explicit
by_code_point (
    std::u32string_view string_to_iterate
)
noexcept

Constructs a by_code_point from the given string.

Parameters:
  • string_to_iterate:

    The string to iterate over by code point.

by_code_point (
    const by_code_point& other
)
= default

Copy-constructs a by_code_point from an existing one.

Parameters:
  • other:

    The by_code_point to copy from.

by_code_point&
operator = (
    const by_code_point& other
)
= default

Copy-assigns a by_code_point into this one.

Parameters:
  • other:

    The by_code_point to copy from.

by_code_point (
    by_code_point&& other
)
noexcept = default

Move-constructs a by_code_point from an existing one.

Parameters:
  • other:

    The by_code_point to move from.

by_code_point&
operator = (
    by_code_point&& other
)
noexcept = default

Move-assigns a by_code_point into this one.

Parameters:
  • other:

    The by_code_point to move from.

const_iterator
begin ()
const noexcept

Returns a constant iterator to the beginning.

const_iterator
end ()
const noexcept

Returns a constant iterator to the end.

const_iterator
cbegin ()
const noexcept

Returns a constant iterator to the beginning.

const_iterator
cend ()
const noexcept

Returns a constant iterator to the end.

const_reverse_iterator
crbegin ()
const noexcept

Returns a constant reverse iterator to the beginning.

const_reverse_iterator
crend ()
const noexcept

Returns a constant reverse iterator to the end.



Copyright © 2022-2025 Daniel T. McGinnis

CCL was first published in 2022, and is still actively maintained.

This website was first published in 2022, and is still actively maintained.

This specific web page was first published in 2022.