aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/query.hxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/odb/query.hxx b/odb/query.hxx
index 82fb411..d89a4e6 100644
--- a/odb/query.hxx
+++ b/odb/query.hxx
@@ -23,6 +23,24 @@ namespace odb
template <typename T, const char* table>
struct pointer_query_columns;
+ // Object pointer syntax wrapper.
+ //
+ template <typename T>
+ struct query_pointer
+ {
+ query_pointer ()
+ {
+ // For some reason GCC needs this dummy c-tor if we make a static
+ // data member of this type const.
+ }
+
+ T*
+ operator-> () const
+ {
+ return 0; // All members in T are static.
+ }
+ };
+
//
//
template <typename T, class_kind kind = class_traits<T>::kind>