diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-02-01 09:18:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-02-01 09:18:11 +0200 |
commit | 8b4979c9e987e2d0510d8761f015148eabc285ec (patch) | |
tree | 70dcf81d9fa1c4791577883f06cc08593e3e8f7c /tracer/types | |
parent | dfaf27b9ea913e3df21eb412bf371298af1f1570 (diff) |
Detect and ignore inner names in fq_*() functions
Diffstat (limited to 'tracer/types')
-rw-r--r-- | tracer/types/test.hxx | 35 |
1 files changed, 35 insertions, 0 deletions
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 |