Function operator<

Summary

#include <toml/comments.hpp>

(1) bool operator<(const preserve_comments &lhs, const preserve_comments &rhs)

(2) bool operator<(const discard_comments &, const discard_comments &) noexcept

#include <toml/datetime.hpp>

(3) bool operator<(const local_date &lhs, const local_date &rhs)

(4) bool operator<(const local_time &lhs, const local_time &rhs)

(5) bool operator<(const time_offset &lhs, const time_offset &rhs)

(6) bool operator<(const local_datetime &lhs, const local_datetime &rhs)

(7) bool operator<(const offset_datetime &lhs, const offset_datetime &rhs)

#include <toml/string.hpp>

(8) bool operator<(const string &lhs, const string &rhs)

(9) bool operator<(const string &lhs, const std::string &rhs)

(10) bool operator<(const std::string &lhs, const string &rhs)

(11) bool operator<(const string &lhs, const char *rhs)

(12) bool operator<(const char *lhs, const string &rhs)

#include <toml/value.hpp>

(13) template <typename C, template< typename ... > class T, template< typename ... > class A>
     std::enable_if< detail::conjunction< detail::is_comparable< typename basic_value< C, T, A >::array_type >, detail::is_comparable< typename basic_value< C, T, A >::table_type > >::value, bool >::type operator<(const basic_value< C, T, A > &lhs, const basic_value< C, T, A > &rhs)

Function overload

Synopsis

#include <toml/comments.hpp>

bool operator<(const preserve_comments &lhs, const preserve_comments &rhs)

Description

No description yet.

Source

Lines 238-238 in toml/comments.hpp.

inline bool operator< (const preserve_comments& lhs, const preserve_comments& rhs) {return lhs.comments <  rhs.comments;}

Synopsis

#include <toml/comments.hpp>

bool operator<(const discard_comments &, const discard_comments &) noexcept

Description

No description yet.

Source

Lines 457-457 in toml/comments.hpp.

inline bool operator< (const discard_comments&, const discard_comments&) noexcept {return false;}

Synopsis

#include <toml/datetime.hpp>

bool operator<(const local_date &lhs, const local_date &rhs)

Description

No description yet.

Source

Lines 154-158 in toml/datetime.hpp.

inline bool operator< (const local_date& lhs, const local_date& rhs)
{
    return std::make_tuple(lhs.year, lhs.month, lhs.day) <
           std::make_tuple(rhs.year, rhs.month, rhs.day);
}

Synopsis

#include <toml/datetime.hpp>

bool operator<(const local_time &lhs, const local_time &rhs)

Description

No description yet.

Source

Lines 257-261 in toml/datetime.hpp.

inline bool operator< (const local_time& lhs, const local_time& rhs)
{
    return std::make_tuple(lhs.hour, lhs.minute, lhs.second, lhs.millisecond, lhs.microsecond, lhs.nanosecond) <
           std::make_tuple(rhs.hour, rhs.minute, rhs.second, rhs.millisecond, rhs.microsecond, rhs.nanosecond);
}

Synopsis

#include <toml/datetime.hpp>

bool operator<(const time_offset &lhs, const time_offset &rhs)

Description

No description yet.

Source

Lines 331-335 in toml/datetime.hpp.

inline bool operator< (const time_offset& lhs, const time_offset& rhs)
{
    return std::make_tuple(lhs.hour, lhs.minute) <
           std::make_tuple(rhs.hour, rhs.minute);
}

Synopsis

#include <toml/datetime.hpp>

bool operator<(const local_datetime &lhs, const local_datetime &rhs)

Description

No description yet.

Source

Lines 453-457 in toml/datetime.hpp.

inline bool operator< (const local_datetime& lhs, const local_datetime& rhs)
{
    return std::make_tuple(lhs.date, lhs.time) <
           std::make_tuple(rhs.date, rhs.time);
}

Synopsis

#include <toml/datetime.hpp>

bool operator<(const offset_datetime &lhs, const offset_datetime &rhs)

Description

No description yet.

Source

Lines 604-608 in toml/datetime.hpp.

inline bool operator< (const offset_datetime& lhs, const offset_datetime& rhs)
{
    return std::make_tuple(lhs.date, lhs.time, lhs.offset) <
           std::make_tuple(rhs.date, rhs.time, rhs.offset);
}

Synopsis

#include <toml/string.hpp>

bool operator<(const string &lhs, const string &rhs)

Description

No description yet.

Source

Lines 81-84 in toml/string.hpp.

inline bool operator<(const string& lhs, const string& rhs)
{
    return (lhs.kind == rhs.kind) ? (lhs.str < rhs.str) : (lhs.kind < rhs.kind);
}

Synopsis

#include <toml/string.hpp>

bool operator<(const string &lhs, const std::string &rhs)

Description

No description yet.

Source

Lines 102-103 in toml/string.hpp.

inline bool
operator< (const string& lhs, const std::string& rhs) {return lhs.str <  rhs;}

Synopsis

#include <toml/string.hpp>

bool operator<(const std::string &lhs, const string &rhs)

Description

No description yet.

Source

Lines 115-116 in toml/string.hpp.

inline bool
operator< (const std::string& lhs, const string& rhs) {return lhs <  rhs.str;}

Synopsis

#include <toml/string.hpp>

bool operator<(const string &lhs, const char *rhs)

Description

No description yet.

Source

Lines 128-129 in toml/string.hpp.

inline bool
operator< (const string& lhs, const char* rhs) {return lhs.str <  std::string(rhs);}

Synopsis

#include <toml/string.hpp>

bool operator<(const char *lhs, const string &rhs)

Description

No description yet.

Source

Lines 141-142 in toml/string.hpp.

inline bool
operator< (const char* lhs, const string& rhs) {return std::string(lhs) <  rhs.str;}

Synopsis

#include <toml/value.hpp>

template <typename C, template< typename ... > class T, template< typename ... > class A>
std::enable_if< detail::conjunction< detail::is_comparable< typename basic_value< C, T, A >::array_type >, detail::is_comparable< typename basic_value< C, T, A >::table_type > >::value, bool >::type operator<(const basic_value< C, T, A > &lhs, const basic_value< C, T, A > &rhs)

Description

No description yet.

Source

Lines 1818-1897 in toml/value.hpp.

template<typename C, template<typename ...> class T, template<typename ...> class A>
typename std::enable_if<detail::conjunction<
    detail::is_comparable<typename basic_value<C, T, A>::array_type>,
    detail::is_comparable<typename basic_value<C, T, A>::table_type>
    >::value, bool>::type
operator<(const basic_value<C, T, A>& lhs, const basic_value<C, T, A>& rhs)
{
    if(lhs.type() != rhs.type()){return (lhs.type() < rhs.type());}
    switch(lhs.type())
    {
        case value_t::boolean  :
        {
            return lhs.as_boolean() <  rhs.as_boolean() ||
                  (lhs.as_boolean() == rhs.as_boolean() &&
                   lhs.comments() < rhs.comments());
        }
        case value_t::integer  :
        {
            return lhs.as_integer() <  rhs.as_integer() ||
                  (lhs.as_integer() == rhs.as_integer() &&
                   lhs.comments() < rhs.comments());
        }
        case value_t::floating :
        {
            return lhs.as_floating() <  rhs.as_floating() ||
                  (lhs.as_floating() == rhs.as_floating() &&
                   lhs.comments() < rhs.comments());
        }
        case value_t::string   :
        {
            return lhs.as_string() <  rhs.as_string() ||
                  (lhs.as_string() == rhs.as_string() &&
                   lhs.comments() < rhs.comments());
        }
        case value_t::offset_datetime:
        {
            return lhs.as_offset_datetime() <  rhs.as_offset_datetime() ||
                  (lhs.as_offset_datetime() == rhs.as_offset_datetime() &&
                   lhs.comments() < rhs.comments());
        }
        case value_t::local_datetime:
        {
            return lhs.as_local_datetime() <  rhs.as_local_datetime() ||
                  (lhs.as_local_datetime() == rhs.as_local_datetime() &&
                   lhs.comments() < rhs.comments());
        }
        case value_t::local_date:
        {
            return lhs.as_local_date() <  rhs.as_local_date() ||
                  (lhs.as_local_date() == rhs.as_local_date() &&
                   lhs.comments() < rhs.comments());
        }
        case value_t::local_time:
        {
            return lhs.as_local_time() <  rhs.as_local_time() ||
                  (lhs.as_local_time() == rhs.as_local_time() &&
                   lhs.comments() < rhs.comments());
        }
        case value_t::array    :
        {
            return lhs.as_array() <  rhs.as_array() ||
                  (lhs.as_array() == rhs.as_array() &&
                   lhs.comments() < rhs.comments());
        }
        case value_t::table    :
        {
            return lhs.as_table() <  rhs.as_table() ||
                  (lhs.as_table() == rhs.as_table() &&
                   lhs.comments() < rhs.comments());
        }
        case value_t::empty    :
        {
            return lhs.comments() < rhs.comments();
        }
        default:
        {
            return lhs.comments() < rhs.comments();
        }
    }
}





Add Discussion as Guest

Log in