diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/language_tag.cc | 14 | ||||
| -rw-r--r-- | src/language_tag.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/language_tag.cc b/src/language_tag.cc index 6c7e6da9..5e2c5a8b 100644 --- a/src/language_tag.cc +++ b/src/language_tag.cc @@ -366,6 +366,20 @@ dcp::operator== (dcp::LanguageTag const& a, dcp::LanguageTag const& b) } +bool +dcp::operator!= (dcp::LanguageTag const& a, dcp::LanguageTag const& b) +{ + return a.to_string() != b.to_string(); +} + + +bool +dcp::operator< (dcp::LanguageTag const& a, dcp::LanguageTag const& b) +{ + return a.to_string() < b.to_string(); +} + + ostream& dcp::operator<< (ostream& os, dcp::LanguageTag const& tag) { diff --git a/src/language_tag.h b/src/language_tag.h index 1716a8db..d18572e4 100644 --- a/src/language_tag.h +++ b/src/language_tag.h @@ -240,6 +240,8 @@ private: extern bool operator==(dcp::LanguageTag const& a, dcp::LanguageTag const& b); +extern bool operator!=(dcp::LanguageTag const& a, dcp::LanguageTag const& b); +extern bool operator<(dcp::LanguageTag const& a, dcp::LanguageTag const& b); extern std::ostream& operator<<(std::ostream& os, dcp::LanguageTag const& tag); |
