Fixed dangling reference in MemberProxy and ElementProxy (fixes #1120)

This commit is contained in:
Benoit Blanchon
2019-10-30 19:09:21 +01:00
parent ef63757b1a
commit 6da6f921cd
9 changed files with 88 additions and 33 deletions

View File

@@ -31,17 +31,16 @@ class ObjectShortcuts {
// operator[](const std::string&) const
// operator[](const String&) const
template <typename TString>
FORCE_INLINE
typename enable_if<IsString<TString>::value,
MemberProxy<const TObject &, const TString &> >::type
operator[](const TString &key) const;
FORCE_INLINE typename enable_if<IsString<TString>::value,
MemberProxy<TObject, TString> >::type
operator[](const TString &key) const;
// operator[](char*) const
// operator[](const char*) const
// operator[](const __FlashStringHelper*) const
template <typename TChar>
FORCE_INLINE typename enable_if<IsString<TChar *>::value,
MemberProxy<const TObject &, TChar *> >::type
MemberProxy<TObject, TChar *> >::type
operator[](TChar *key) const;
// createNestedArray(const std::string&) const