diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-03-23 19:16:46 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-03-23 19:16:46 +0100 |
| commit | c7208194515e93f85441c76d78d11a47d79b36e1 (patch) | |
| tree | 107d08a12be06e98bf77c21802a30646a7d14ae5 /src/language_tag.cc | |
| parent | 1deb04653db2074891ca7be9e2165e7ffc776bf6 (diff) | |
Add operator!= and operator< for LanguageTag
Diffstat (limited to 'src/language_tag.cc')
| -rw-r--r-- | src/language_tag.cc | 14 |
1 files changed, 14 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) { |
