Код: Выделить всё
#include
class A {
protected:
~A() = default;
friend void std::destroy_at(A*); // libstdc++ ok, but libc++ failed.
public:
void f() {
std::destroy_at(this);
}
};
int main() {
}
Код: Выделить всё
template = 0>
void destroy_at(T*) { ... }
Код: Выделить всё
template
void destroy_at(T*) { ... }
Подробнее здесь: https://stackoverflow.com/questions/796 ... -templates
Мобильная версия