summaryrefslogtreecommitdiff
path: root/odb/context.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/context.hxx
parentd864e71f0f79ba31bb330b2493f7aaf80ae4d0f5 (diff)
Fix ability to handle C-style arrays as containers
Diffstat (limited to 'odb/context.hxx')
-rw-r--r--odb/context.hxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/odb/context.hxx b/odb/context.hxx
index f9203ae..4366fb7 100644
--- a/odb/context.hxx
+++ b/odb/context.hxx
@@ -714,21 +714,25 @@ public:
// make_const is true, then add top-level const qualifier, unless
// it is already there. If it is false, then strip it if it is
// already there. If var is not empty, then embed the variable
- // name into the type (e.g., char (*v)[3]).
+ // name into the type (e.g., char (*v)[3]). If decay_array is
+ // false then don't decay the (top-level) array to a pointer.
//
static string
member_ref_type (semantics::data_member& m,
bool make_const,
- string const& var = "")
+ string const& var = "",
+ bool decay_array = true)
{
- return type_ref_type (m.type (), m.belongs ().hint (), make_const, var);
+ return type_ref_type (
+ m.type (), m.belongs ().hint (), make_const, var, decay_array);
}
static string
type_ref_type (semantics::type&,
semantics::names* hint,
bool make_const,
- string const& var = "");
+ string const& var = "",
+ bool decay_array = true);
// Form a value type for a not mapped, actual member type. If make_const
// is true, then add top-level const qualifier, unless it is already