From 8b4979c9e987e2d0510d8761f015148eabc285ec Mon Sep 17 00:00:00 2001 From: Boris Kolpackov 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(+) (limited to 'tracer/types') 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 + #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 +struct num_wrap +{ +#ifdef ODB_COMPILER + typedef num_wrap this_type; +#endif + + X v_; +}; + +template +std::ostream& +operator<< (std::ostream& os, const num_wrap& x) +{ + return os << x.v_; +} + +template +bool +operator== (const num_wrap& x, const num_wrap& y) +{ + return x.v_ == y.v_; +} + +#pragma db object +struct object3 +{ + #pragma db id + num_wrap num_; +}; + #endif // TEST_HXX -- cgit v1.1