[ Web Proxy ]
URL:
Viewing: http://ja.cppreference.com/cpp/string/basic_string/operator_cmp [Back]  [Original]

operator==,!=,<,<=,>,>=,<=>(std::basic_string) - cppreference.com
cppreference.com

operator==,!=,<,<=,>,>=,<=>(std::basic_string)

: cppreference.com
 
C++
(C++20)
(C++20)
(C++17)
(C++11)
(C++11)
(C++11)
 
 
std::basic_string
 
<tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody> <tbody class="t-dcl-rev t-dcl-rev-num "> </tbody><tbody> </tbody>
2 basic_string
(1)
template< class CharT, class Traits, class Alloc > bool operator==( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs );
(C++14)
template< class CharT, class Traits, class Alloc > bool operator==( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs ) noexcept;
(C++14)
(C++20)
template< class CharT, class Traits, class Alloc > constexpr bool operator==( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs ) noexcept;
(C++20)
(2)
template< class CharT, class Traits, class Alloc > bool operator!=( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs );
(C++14)
template< class CharT, class Traits, class Alloc > bool operator!=( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs ) noexcept;
(C++14)
(C++20)
(3)
template< class CharT, class Traits, class Alloc > bool operator<( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs );
(C++14)
template< class CharT, class Traits, class Alloc > bool operator<( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs ) noexcept;
(C++14)
(C++20)
(4)
template< class CharT, class Traits, class Alloc > bool operator>=( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs );
(C++14)
template< class CharT, class Traits, class Alloc > bool operator>=( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs ) noexcept;
(C++14)
(C++20)
(5)
template< class CharT, class Traits, class Alloc > bool operator>( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs );
(C++14)
template< class CharT, class Traits, class Alloc > bool operator>( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs ) noexcept;
(C++14)
(C++20)
(6)
template< class CharT, class Traits, class Alloc > bool operator>=( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs );
(C++14)
template< class CharT, class Traits, class Alloc > bool operator>=( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs ) noexcept;
(C++14)
(C++20)
template< class CharT, class Traits, class Alloc > constexpr /*comp-cat*/ operator<=>( const std::basic_string<CharT,Traits,Alloc>& lhs, const std::basic_string<CharT,Traits,Alloc>& rhs ) noexcept;
(7) (C++20)
basic_string T NULL
(8)
template< class CharT, class Traits, class Alloc > bool operator==( const std::basic_string<CharT,Traits,Alloc>& lhs, const CharT* rhs );
(C++20)
template< class CharT, class Traits, class Alloc > constexpr bool operator==( const std::basic_string<CharT,Traits,Alloc>& lhs, const CharT* rhs );
(C++20)
template< class CharT, class Traits, class Alloc > bool operator==( const CharT* lhs, const std::basic_string<CharT,Traits,Alloc>& rhs );
(C++20)
(9)
template< class CharT, class Traits, class Alloc > bool operator!=( const std::basic_string<CharT,Traits,Alloc>& lhs, const CharT* rhs );
(C++20)
template< class CharT, class Traits, class Alloc > bool operator!=( const CharT* lhs, const std::basic_string<CharT,Traits,Alloc>& rhs );
(C++20)
(10)
template< class CharT, class Traits, class Alloc > bool operator<( const std::basic_string<CharT,Traits,Alloc>& lhs, const CharT* rhs );
(C++20)
template< class CharT, class Traits, class Alloc > bool operator<( const CharT* lhs, const std::basic_string<CharT,Traits,Alloc>& rhs );
(C++20)
(11)
template< class CharT, class Traits, class Alloc > bool operator<=( const std::basic_string<CharT,Traits,Alloc>& lhs, const CharT* rhs );
(C++20)
template< class CharT, class Traits, class Alloc > bool operator<=( const CharT* lhs, const std::basic_string<CharT,Traits,Alloc>& rhs );
(C++20)
(12)
template< class CharT, class Traits, class Alloc > bool operator>( const std::basic_string<CharT,Traits,Alloc>& lhs, const CharT* rhs );
(C++20)
template< class CharT, class Traits, class Alloc > bool operator>( const CharT* lhs, const std::basic_string<CharT,Traits,Alloc>& rhs );
(C++20)
(13)
template< class CharT, class Traits, class Alloc > bool operator>=( const std::basic_string<CharT,Traits,Alloc>& lhs, const CharT* rhs );
(C++20)
template< class CharT, class Traits, class Alloc > bool operator>=( const CharT* lhs, const std::basic_string<CharT,Traits,Alloc>& rhs );
(C++20)
template< class CharT, class Traits, class Alloc > constexpr /*comp-cat*/ operator<=>( const std::basic_string<CharT,Traits,Alloc>& lhs, const CharT* rhs );
(14) (C++20)

CharT

compare() (compare() Traits::compare() )

  • lhs rhs lhs rhs 2

(/*comp-cat*/) Traits::comparison_category std::weak_ordering

(C++20)
1-7) 2 basic_string
8-14) basic_string CharT

lhs, rhs -

1-6,8-13) true false
7,14) static_cast</*comp-cat*/>(lhs.compare(rhs) <=> 0)

1 std::string std::wstring std::u8string std::u16string std::u32string operator<=> std::strong_ordering

(C++20)

Web Proxy Viewer  |  New URL  |  Original Page