- string[meta header]
- std[meta namespace]
- function template[meta id-type]
namespace std {
template <class CharT, class Traits, class Allocator>
bool operator>=(const basic_string<CharT, Traits, Allocator>& a,
const basic_string<CharT, Traits, Allocator>& b); // (1) C++03
template <class CharT, class Traits, class Allocator>
bool operator>=(const basic_string<CharT, Traits, Allocator>& a,
const basic_string<CharT, Traits, Allocator>& b) noexcept; // (1) C++14
template <class CharT, class Traits, class Allocator>
bool operator>=(const CharT* a,
const basic_string<CharT, Traits, Allocator>& b); // (2)
template <class CharT, class Traits, class Allocator>
bool operator>=(const basic_string<CharT, Traits, Allocator>& a,
const CharT* rhs) noexcept; // (3)
}
basic_string
において、左辺が右辺以上かの判定を行う。
#include <iostream>
#include <string>
int main()
{
std::string a = "bbb";
std::string b = "aaa";
std::cout << std::boolalpha;
std::cout << (a >= b) << std::endl;
}
true