Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Bert_Jonson
Beginner
138 Views

C++11 override bug

[cpp]

struct A {
virtual ~A() = default;
};

struct B : A {
virtual ~B() override = default;
};

int main() {
B b;
}[/cpp]

It's produces these error(but it mustn't):

error: modifier is not allowed on a destructor

ICC 13 update 1, windows.

0 Kudos
12 Replies
Marián__VooDooMan__M
New Contributor II
138 Views

Greetings, I had same problem. "= delete" is fully working, and "= default" is working partially (i.e. for constructors and assignments operators), but not destructurs. Documentation is saying "this is under development". We must wait for future releases. EDIT: Err, it is working only for move constructor, but not for move-assignment operator. I am waiting for next release. I am on 13.0.1 on Windows. [cpp] error : invalid type for defaulted assignment operator c_volume& operator=(c_volume&&) = default; ^ [/cpp]
Judith_W_Intel
Employee
138 Views

C++11 virtual override and final were not implemented in 13.0. What you are seeing is our emulation of the Microsoft "override" keyword (a Microsoft extension) which is not allowed to be used on destructors,i.e.: !% cat f2.cpp struct A { virtual ~A(); }; struct B : A { virtual ~B() override; }; int main() { B b; return 0; } !% cl -c f2.cpp Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. f2.cpp f2.cpp(7) : error C3665: 'B::~B' : override specifier 'override' not allowed on a destructor
Marián__VooDooMan__M
New Contributor II
138 Views

Judith Ward (Intel) wrote:

C++11 virtual override and final were not implemented in 13.0.

Just out of my curiosity, when there will be support for: 1. = default 2. virtual "override" and "final" class/struct ? Both comes handy. Some time line?
SergeyKostrov
Valued Contributor II
138 Views

>>...C++11 virtual override and final were not implemented in 13.0... Is it possible to get a complete list of C++11 features supported and implemented in the latest version of Intel C++ compiler ( v13.x.x )?
Judith_W_Intel
Employee
138 Views

SergeyKostrov
Valued Contributor II
138 Views

Thanks, Judy. I also would like to get some details if the article reflects the most recent changes in version 13 of the Intel C++ compiler?
Marián__VooDooMan__M
New Contributor II
138 Views

VooDooMan wrote:

Quote:

Judith Ward (Intel) wrote:

C++11 virtual override and final were not implemented in 13.0.

Just out of my curiosity, when there will be support for:

1. = default
2. virtual "override" and "final" class/struct ?

Both comes handy. Some time line?

Judy, once again I am asking: any timeline/schedule to implement "NO"'s and "Partial"'s ? I am so excited to use C++11 features with ICC...
Judith_W_Intel
Employee
138 Views

Sorry but I am not allowed to comment on our future plans. But I can say that our top priority is to implement the c++11 features that Gnu has already implemented in their recent releases. We would love to have more beta customers to try out these new features for our next release so look for an invitation here. Judy
Marián__VooDooMan__M
New Contributor II
138 Views

Hello Judy,
Judith Ward (Intel)]

Sorry but I am not allowed to comment on our future plans.

Of course, that indeed makes sense. I respect the fact.

But I can say that our top priority is to implement the c++11 features that Gnu has already implemented in their recent releases.

This is what I needed to hear! I'm excited, and impatiently waiting! Thank you.

We would love to have more beta customers to try out these new features for our next release so look for an invitation here.

What I need to apply to be a beta tester? And what it takes, i.e. what is expected from me as a beta tester?
Bert_Jonson
Beginner
138 Views

offtop { Also wanting to be BT btw. :3 };
SergeyKostrov
Valued Contributor II
138 Views

>>...We would love to have more beta customers to try out these new features for our next release so look for an invitation here... Judy, Could you post more details regarding beta-testing of a new release of Intel C++ compiler, please?
JenniferJ
Moderator
138 Views

All those features (default, delete & override) are supported by 14.0 and latest compilers. You can find the latest C++11 support on the article pointed by JudyW.

Jennifer

 

Reply