So ~T() works even for standard types (which are not classes/structs) I assumed operator=(const T &) also can be valid as the default method, but it's not:
#include <new>
template <class T> void foo(T el) {
alignas(T) unsigned char buf[sizeof(T)];
T *ptr = new (buf) T(el);
// error: request for member 'operator=' in '* ptr', which is of non-class type 'int'
// ptr->operator=(42);
ptr->~T();
}
int main() { foo(42); }
Is ~T() synthetic construction to standard types for compatibility?