Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Raffael_C_
Beginner
206 Views

Default destructor doesn't have noexcept flag

Hi,

I think here is another bug in the Intel Compiler XE 2014, SP1 Update 1 on Windows. Consider the following piece of code:

[cpp]

struct X

{

    ~X() { };

};

int main()

{

    X x;

    static_assert(noexcept(x.~X()), "Ouch!");

}

[/cpp]

This doesn't compile with Intel on Windows but it compiles fine using gcc 4.8.2 and CLang 3.4 on Linux. Moreover an answer on stackoverflow suggests that this should actually compile: http://stackoverflow.com/questions/15721544/destructors-and-noexcept

Cheers,

Raffael

0 Kudos
3 Replies
QIAOMIN_Q_
New Contributor I
206 Views

Have reprocuded as you said ,I will enter this into bug-tracking system and will get you posted on any progress on this .Thank you for your issue submission.

 

Thank you.
--
QIAOMIN.Q
Intel Developer Support
Please participate in our redesigned community support web site:

User forums:                   http://software.intel.com/en-us/forums/

QIAOMIN_Q_
New Contributor I
206 Views

This will not be fixed since Mircosoft VS2013 doesn't support noexcept yet.

On Windows, the default is not to have implicit noexcept. On Linux, a fix has been added to enable this default in g++ 4.8 and later versions. So this is fine on Linux.

Thank you.
--
QIAOMIN.Q
Intel Developer Support

QIAOMIN_Q_
New Contributor I
206 Views

Hello Raffael, 14.0 Update 3, which went out on April 10, already has the fix on Linux. There are no plans to fix this on Windows (since MS does not support it yet, and there are name mangling implications.).There are NO plans to fix this on *Windows* until MS Visual Studio begins to support it. Thank you. -- QIAOMIN.Q Intel Developer Support Please participate in our redesigned community support web site: User forums: http://software.intel.com/en-us/forums/
Reply