Quantcast
Channel: Intel® C++-Compiler
Viewing all articles
Browse latest Browse all 1665

(c++11) failed to compile class with private explicitly-defaulted destructor

$
0
0

Hi, trying to compile following code:

class Foo{
private:
    //explicitly-defaulted destructor
    ~Foo() = default;
public:
    int x;
    void release(){
        delete this;
    }
};

void PrivateDestructor(){
    auto foo = new Foo();
    foo->release();
}

I get this error: (8): error : assertion failed at: "shared/cfe/edgcpfe/symbol_tbl.c", line 10293

I'm using Intel® C++ Composer XE 2015 for Visual Studio 2013 Update1


Viewing all articles
Browse latest Browse all 1665

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>