cpp: Fix "make check" by defining a comparator for "Empty"
authorDavid Reiss <dreiss@apache.org>
Tue, 10 Feb 2009 21:38:44 +0000 (21:38 +0000)
committerDavid Reiss <dreiss@apache.org>
Tue, 10 Feb 2009 21:38:44 +0000 (21:38 +0000)
The TCompactProtocol revision added a "set<Empty>" in DebugProtoTest.
C++ needs a comparator in order to link this.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@743111 13f79535-47bb-0310-9956-ffa450edef68

test/DebugProtoTest_extras.cpp [new file with mode: 0644]
test/Makefile.am

diff --git a/test/DebugProtoTest_extras.cpp b/test/DebugProtoTest_extras.cpp
new file mode 100644 (file)
index 0000000..b1178a3
--- /dev/null
@@ -0,0 +1,13 @@
+// Extra functions required for DebugProtoTest_types to work
+
+#include "gen-cpp/DebugProtoTest_types.h"
+
+
+namespace thrift { namespace test { namespace debug {
+
+bool Empty::operator<(Empty const& other) const {
+  // It is empty, so all are equal.
+  return false;
+}
+
+}}}
index 5f2ce8d..cc92ce0 100644 (file)
@@ -19,7 +19,8 @@ libtestgencpp_la_SOURCES = \
        gen-cpp/ThriftTest_constants.cpp \
        gen-cpp/ThriftTest.cpp \
        gen-cpp/ThriftTest_types.cpp \
-       ThriftTest_extras.cpp
+       ThriftTest_extras.cpp \
+       DebugProtoTest_extras.cpp
 
 libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la