diff --git a/src/support/istring.h b/src/support/istring.h index a567eb82f12..bbb8028eb0f 100644 --- a/src/support/istring.h +++ b/src/support/istring.h @@ -69,7 +69,13 @@ struct IString { std::string_view view() const { return str.view(); } - IString() = default; + // Use an explicit constructor instead of `= default` because some older + // compilers (e.g. Apple Clang in older Xcode versions) delete the default + // constructor if there is a const member without an in-class initializer, + // even if that member's type has a default constructor. + // FIXME: Use `= default` once we bump the min clang/Xcode version that + // we support. + IString() : str({nullptr}) {} IString(View v) : str(v) {}