Skip to content

Commit ff3b5ca

Browse files
authored
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; ```
1 parent 2ad24f8 commit ff3b5ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Firestore/core/src/firebase/firestore/model/field_path.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ namespace model {
3535
*/
3636
class FieldPath : public impl::BasePath<FieldPath> {
3737
public:
38-
FieldPath() = default;
38+
// Note: Xcode 8.2 requires explicit specification of the constructor.
39+
FieldPath() : impl::BasePath<FieldPath>() {
40+
}
41+
3942
/** Constructs the path from segments. */
4043
template <typename IterT>
4144
FieldPath(const IterT begin, const IterT end) : BasePath{begin, end} {

0 commit comments

Comments
 (0)