The miscompile doesn't reproduce for me anymore with GCC 7.3. I'll watch
the buildbots closely.
Having different versions of Optional is an ABI violation when linking
GCC- and clang-built code together.
llvm-svn: 342637
}
};
-#if !defined(__GNUC__) || defined(__clang__) // GCC up to GCC7 miscompiles this.
/// Storage for trivially copyable types only.
template <typename T> struct OptionalStorage<T, true> {
AlignedCharArrayUnion<T> storage;
void reset() { hasVal = false; }
};
-#endif
} // namespace optional_detail
template <typename T> class Optional {