aboutsummaryrefslogtreecommitdiff
path: root/odb/pragma.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-07-03 20:08:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-07-03 20:08:05 +0200
commita7e3df85fd7180aa0daf0947e50b08d51b7e2380 (patch)
treeaef640985c21d7b2d9aaadcc3b0b376b5db83b6f /odb/pragma.cxx
parent80b868be1e7c249daa714b0c7a5f87694edb8664 (diff)
Add support for defining views as class template instantiations
Diffstat (limited to 'odb/pragma.cxx')
-rw-r--r--odb/pragma.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/odb/pragma.cxx b/odb/pragma.cxx
index 046140e..11e1d4e 100644
--- a/odb/pragma.cxx
+++ b/odb/pragma.cxx
@@ -4335,8 +4335,8 @@ register_odb_pragmas (void*, void*)
void
post_process_pragmas ()
{
- // Make sure object and composite class template instantiations are fully
- // instantiated.
+ // Make sure object, view, and composite class template instantiations
+ // are fully instantiated.
//
for (decl_pragmas::iterator i (decl_pragmas_.begin ()),
e (decl_pragmas_.end ()); i != e; ++i)
@@ -4349,7 +4349,7 @@ post_process_pragmas ()
if (!(CLASS_TYPE_P (type) && CLASSTYPE_TEMPLATE_INSTANTIATION (type)))
continue;
- // Check whether this is an object or composite value type.
+ // Check whether this is an object, view, or composite value type.
//
pragma const* p (0);
string diag_name;
@@ -4365,10 +4365,17 @@ post_process_pragmas ()
diag_name = "persistent object";
break;
}
+ else if (name == "view")
+ {
+ p = &*j;
+ diag_name = "view";
+ break;
+ }
else if (name == "value")
{
p = &*j;
diag_name = "composite value";
+ break;
}
// We don't want to instantiate simple values since they may be
// incomplete.