Implizite Art von Destruktor in C ++C++

Programme in C++. Entwicklerforum
Guest
 Implizite Art von Destruktor in C ++

Post by Guest »

Ich weiß, dass ein Destruktor in C ++ keinen Wert zurückgibt und sein Typ kann nicht explizit angegeben werden. ist gemäß dem C ++ - Standard korrekt.

Code: Select all

#include 
#include 

using namespace std;

class X
{
};

int main()
{
X *x = new X();
char *fullname;

using destructor_type = decltype(x->~X());
const type_info  &destructor_t = typeid(destructor_type);

fullname = abi::__cxa_demangle(destructor_t.name(), NULL, NULL, NULL);
cout

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post