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>
     bool 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 236-236 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 455-455 in toml/comments.hpp.

inline bool operator==(const discard_comments&, const discard_comments&) noexcept {return true;}

Synopsis

#include <toml/datetime.hpp>

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

Description

No description yet.

Source

Lines 145-149 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 248-252 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 322-326 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 444-448 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 595-599 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 73-76 in toml/string.hpp.

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

Synopsis

#include <toml/string.hpp>

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

Description

No description yet.

Source

Lines 98-99 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 111-112 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 124-125 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 137-138 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>
bool operator==(const basic_value< C, T, A > &lhs, const basic_value< C, T, A > &rhs)

Description

No description yet.

Source

Lines 1758-1810 in toml/value.hpp.

template<typename C, template<typename ...> class T, template<typename ...> class A>
inline bool
operator==(const basic_value<C, T, A>& lhs, const basic_value<C, T, A>& rhs)
{
    if(lhs.type()     != rhs.type())     {return false;}
    if(lhs.comments() != rhs.comments()) {return false;}

    switch(lhs.type())
    {
        case value_t::boolean  :
        {
            return lhs.as_boolean() == rhs.as_boolean();
        }
        case value_t::integer  :
        {
            return lhs.as_integer() == rhs.as_integer();
        }
        case value_t::floating :
        {
            return lhs.as_floating() == rhs.as_floating();
        }
        case value_t::string   :
        {
            return lhs.as_string() == rhs.as_string();
        }
        case value_t::offset_datetime:
        {
            return lhs.as_offset_datetime() == rhs.as_offset_datetime();
        }
        case value_t::local_datetime:
        {
            return lhs.as_local_datetime() == rhs.as_local_datetime();
        }
        case value_t::local_date:
        {
            return lhs.as_local_date() == rhs.as_local_date();
        }
        case value_t::local_time:
        {
            return lhs.as_local_time() == rhs.as_local_time();
        }
        case value_t::array    :
        {
            return lhs.as_array() == rhs.as_array();
        }
        case value_t::table    :
        {
            return lhs.as_table() == rhs.as_table();
        }
        case value_t::empty    : {return true; }
        default:                 {return false;}
    }
}





Add Discussion as Guest

Log in