aboutsummaryrefslogtreecommitdiff
path: root/odb/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-01-17 12:49:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-01-17 12:54:43 +0200
commit67d06f9697793f987afa08bc1c82a9d2670c9917 (patch)
treeb342933dffa5ab18ce58ddee63977216b09dd76e /odb/context.cxx
parent7731e3ec8a95cd43eed82c869319e0ec55a8356e (diff)
Handle query column exporting for composite value types
A composite value is represented in query_columns as a nested struct. Even though the query_columns template instantiation is exported, VC++ for some reason doesn't appear to also export the nested structs. To work around this, nested structs have to have the export macro in the declaration. But that's not it: we also have to declare the nested structs extern, just like the outer template instantiation itself.
Diffstat (limited to 'odb/context.cxx')
-rw-r--r--odb/context.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/odb/context.cxx b/odb/context.cxx
index 352cb51..ef6ef9c 100644
--- a/odb/context.cxx
+++ b/odb/context.cxx
@@ -2345,14 +2345,14 @@ strlit (string const& str)
}
void context::
-inst_header (bool decl)
+inst_header (bool decl, bool omit_exp)
{
if (decl && !ext.empty ())
os << ext << " ";
os << "template struct";
- if (!exp.empty ())
+ if (!omit_exp && !exp.empty ())
{
// If we are generating an explicit instantiation directive rather
// than the extern template declaration, then omit the export symbol