diff options
author | Gil <mcg@google.com> | 2018-02-08 08:30:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-08 08:30:09 -0800 |
commit | ff3b5ca1219e748ce31d6bc68bf06a338cd06478 (patch) | |
tree | 9ff171f5d2d15c1ad13376597416fa2e597d509a | |
parent | 2ad24f850582bf41927c231617509b177bb720d8 (diff) |
Explicitly specify the default constructor to FieldPath (#773)
Xcode prior to 8.3 does not accept an explicitly defaulted constructor
(`= default`) for the purposes of default initializing a const object.
This fixes a build failure under Xcode 8.2:
```
Firestore/core/src/firebase/firestore/model/field_path.cc:144:26: error: default initialization of an object of const type 'const firebase::firestore::model::FieldPath' without a user-provided default constructor
static const FieldPath empty_path;
```
-rw-r--r-- | Firestore/core/src/firebase/firestore/model/field_path.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Firestore/core/src/firebase/firestore/model/field_path.h b/Firestore/core/src/firebase/firestore/model/field_path.h index a8b147e..00b658a 100644 --- a/Firestore/core/src/firebase/firestore/model/field_path.h +++ b/Firestore/core/src/firebase/firestore/model/field_path.h @@ -35,7 +35,10 @@ namespace model { */ class FieldPath : public impl::BasePath<FieldPath> { public: - FieldPath() = default; + // Note: Xcode 8.2 requires explicit specification of the constructor. + FieldPath() : impl::BasePath<FieldPath>() { + } + /** Constructs the path from segments. */ template <typename IterT> FieldPath(const IterT begin, const IterT end) : BasePath{begin, end} { |