diff options
Diffstat (limited to 'tracer')
-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 |