Function operator<

Summary

#include <src/entt/core/hashed_string.hpp>

(1) template <typename Char>
    constexpr bool operator<(const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs)

#include <src/entt/core/type_info.hpp>

(2) constexpr bool operator<(const type_info &lhs, const type_info &rhs)

Function overload

Synopsis

#include <src/entt/core/hashed_string.hpp>

template <typename Char>
constexpr bool operator<(const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs)

Description

Compares two hashed strings.

Template Parameters

Char - Character type.

Parameters

lhs - A valid hashed string.

rhs - A valid hashed string.

Returns
True if the first element is less than the second, false otherwise.

Source

Lines 240-243 in src/entt/core/hashed_string.hpp.

template<typename Char>
[[nodiscard]] constexpr bool operator<(const basic_hashed_string<Char> &lhs, const basic_hashed_string<Char> &rhs) ENTT_NOEXCEPT {
    return lhs.value() < rhs.value();
}

Synopsis

#include <src/entt/core/type_info.hpp>

constexpr bool operator<(const type_info &lhs, const type_info &rhs)

Description

Compares two type info objects.

Parameters

lhs - A valid type info object.

rhs - A valid type info object.

Returns
True if the first element is less than the second, false otherwise.

Source

Lines 208-210 in src/entt/core/type_info.hpp.

[[nodiscard]] constexpr bool operator<(const type_info &lhs, const type_info &rhs) ENTT_NOEXCEPT {
    return lhs.index() < rhs.index();
}





Add Discussion

Log in to comment