use std::string_view

This commit is contained in:
Jinhao
2018-07-02 04:31:41 +08:00
parent d6590f88b0
commit 56a9647d56
6 changed files with 47 additions and 25 deletions

View File

@@ -4825,6 +4825,17 @@ namespace nana
}
//Behavior of Iterator's value_type
#ifdef _nana_std_has_string_view
bool item_proxy::operator==(std::string_view sv) const
{
return (text(0) == sv);
}
bool item_proxy::operator==(std::wstring_view sv) const
{
return (text(0) == to_utf8(sv));
}
#else
bool item_proxy::operator==(const char * s) const
{
return this->operator==(std::string(s));
@@ -4844,6 +4855,7 @@ namespace nana
{
return (text(0) == to_utf8(s));
}
#endif
item_proxy & item_proxy::operator=(const item_proxy& rhs)
{