The APFloat might heap-allocate some memory, so we need to call its
destructor.
Differential Revision: https://reviews.llvm.org/D154928
}
static BlockDtorFn getDtorPrim(PrimType Type) {
+ // Floating types are special. They are primitives, but need their
+ // destructor called, since they might allocate memory.
+ if (Type == PT_Float)
+ return dtorTy<PrimConv<PT_Float>::T>;
+
COMPOSITE_TYPE_SWITCH(Type, return dtorTy<T>, return nullptr);
}
constexpr A<double> b{12};
static_assert(a.f == 0.0, "");
};
+
+namespace LongDouble {
+ constexpr long double ld = 3.1425926539;
+}