summaryrefslogtreecommitdiff
path: root/odb/relational/source.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-01-23 14:17:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-01-23 14:17:22 +0200
commitfc03b894489f39c81f69cd789fd9a08aa5acf91b (patch)
tree764bd50403ceb177f144a93a664f123fd41b5b72 /odb/relational/source.hxx
parentd864e71f0f79ba31bb330b2493f7aaf80ae4d0f5 (diff)
Fix ability to handle C-style arrays as containers
Diffstat (limited to 'odb/relational/source.hxx')
-rw-r--r--odb/relational/source.hxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/odb/relational/source.hxx b/odb/relational/source.hxx
index 681323a..e986cd8 100644
--- a/odb/relational/source.hxx
+++ b/odb/relational/source.hxx
@@ -5327,9 +5327,14 @@ namespace relational
if (!ma.synthesized)
os << "// From " << location_string (ma.loc, true) << endl;
+ // Note that here we don't decay arrays.
+ //
+ const string& ref_type (
+ member_ref_type (m, call_ != load_call, "v", false /* decay */));
+
// VC++ cannot grok the constructor syntax.
//
- os << member_ref_type (m, call_ != load_call, "v") << " =" << endl
+ os << ref_type << " =" << endl
<< " ";
// If this member is const and we have a synthesized direct
@@ -5338,7 +5343,7 @@ namespace relational
//
bool cast (call_ == load_call && ma.direct () && const_member (m));
if (cast)
- os << "const_cast< " << member_ref_type (m, false) <<
+ os << "const_cast< " << member_ref_type (m, false, "", false) <<
" > (" << endl;
os << ma.translate (obj_prefix_);