diff options
author | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-06-11 18:59:38 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-06-14 14:40:30 -0300 |
commit | f516832ae986a42e7b01f2bcf01b1f1c76259718 (patch) | |
tree | fa3ed83eb631638c0bce2cddc095eac9a40d36ce /tests | |
parent | e750294ed669ec541a6d297ab4f8906e66204794 (diff) |
MSVC complains about the missing operator< in Str when we use it on a std::list.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libsample/str.cpp | 5 | ||||
-rw-r--r-- | tests/libsample/str.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/libsample/str.cpp b/tests/libsample/str.cpp index 476bfa409..461b936df 100644 --- a/tests/libsample/str.cpp +++ b/tests/libsample/str.cpp @@ -163,6 +163,11 @@ Str operator+(int number, const Str& str) return in.str().c_str(); } +bool Str::operator<(const Str& other) const +{ + return m_str < other.m_str; +} + unsigned int strHash(const Str& str) { unsigned int result = 0; diff --git a/tests/libsample/str.h b/tests/libsample/str.h index 9135d78a7..7d5f0e63d 100644 --- a/tests/libsample/str.h +++ b/tests/libsample/str.h @@ -64,6 +64,7 @@ public: // nonsense operator just to test reverse operators Str operator+(int number) const; bool operator==(const Str& other) const; + bool operator<(const Str& other) const; private: void init(const char* cstr); |