From 8b4979c9e987e2d0510d8761f015148eabc285ec Mon Sep 17 00:00:00 2001
From: Boris Kolpackov <boris@codesynthesis.com>
Date: Tue, 1 Feb 2011 09:18:11 +0200
Subject: Detect and ignore inner names in fq_*() functions

---
 tracer/types/test.hxx | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/tracer/types/test.hxx b/tracer/types/test.hxx
index 79a8f81..c37692b 100644
--- a/tracer/types/test.hxx
+++ b/tracer/types/test.hxx
@@ -6,6 +6,8 @@
 #ifndef TEST_HXX
 #define TEST_HXX
 
+#include <iosfwd>
+
 #ifdef ODB_COMPILER
 typedef int int_t;
 typedef short num_t;
@@ -31,4 +33,37 @@ struct object2
   num_type num_;
 };
 
+// Template-id with "inner" name (compilation test).
+//
+template <typename X>
+struct num_wrap
+{
+#ifdef ODB_COMPILER
+  typedef num_wrap this_type;
+#endif
+
+  X v_;
+};
+
+template <typename X>
+std::ostream&
+operator<< (std::ostream& os, const num_wrap<X>& x)
+{
+  return os << x.v_;
+}
+
+template <typename X>
+bool
+operator== (const num_wrap<X>& x, const num_wrap<X>& y)
+{
+  return x.v_ == y.v_;
+}
+
+#pragma db object
+struct object3
+{
+  #pragma db id
+  num_wrap<int> num_;
+};
+
 #endif // TEST_HXX
-- 
cgit v1.1