ipaddress 1.1.0
Loading...
Searching...
No Matches
fixed-string.hpp File Reference

Provides a template for a fixed-length string suitable for use in non-type template parameters. More...

#include "config.hpp"
#include "unicode.hpp"

Go to the source code of this file.

Classes

struct  fixed_string< N >
 Fixed size string class. More...
 

Namespaces

namespace  ipaddress
 Namespace dedicated to IP addresses and networks operations.
 

Functions

template<size_t N1, size_t N2>
constexpr inline bool operator== (const fixed_string< N1 > &lhs, const fixed_string< N2 > &rhs) noexcept
 Compares the contents of two fixed strings for equality.
 
template<size_t N1, size_t N2>
constexpr inline bool operator!= (const fixed_string< N1 > &lhs, const fixed_string< N2 > &rhs) noexcept
 Compares the contents of two fixed strings for inequality.
 
template<size_t N1, size_t N2>
constexpr inline bool operator< (const fixed_string< N1 > &lhs, const fixed_string< N2 > &rhs) noexcept
 Compares the contents of two fixed strings lexicographically.
 
template<size_t N1, size_t N2>
constexpr inline bool operator> (const fixed_string< N1 > &lhs, const fixed_string< N2 > &rhs) noexcept
 Compares the contents of two fixed strings for greater than relation.
 
template<size_t N1, size_t N2>
constexpr inline bool operator<= (const fixed_string< N1 > &lhs, const fixed_string< N2 > &rhs) noexcept
 Compares the contents of two fixed strings for less than or equal relation.
 
template<size_t N1, size_t N2>
constexpr inline bool operator>= (const fixed_string< N1 > &lhs, const fixed_string< N2 > &rhs) noexcept
 Compares the contents of two fixed strings for greater than or equal relation.
 
template<typename T , size_t N>
constexpr inline fixed_string< N - 1 > make_fixed_string (const T(&data)[N]) noexcept(noexcept(fixed_string< N - 1 >(data)))
 Creates a fixed-length string from a character array.
 
template<typename T , size_t N>
constexpr inline fixed_string< N - 1 > make_fixed_string (const T(&data)[N], error_code &code) noexcept
 Creates a fixed-length string from a character array.
 

Detailed Description

Provides a template for a fixed-length string suitable for use in non-type template parameters.

Author
Vladimir Shaleev

This header defines fixed_string, a template class designed to store a string of fixed size. It is particularly useful in contexts where a constant string is required at compile-time, such as in template metaprogramming or when specifying non-type template parameters.