C++11 override bug

C++11 override bug

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

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

error: modifier is not allowed on a destructor

ICC 13 update 1, windows.

13 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

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.


error : invalid type for defaulted assignment operator

        c_volume& operator=(c_volume&&) = default;

                  ^

-- With best regards, VooDooMan - If you find my post helpful, please rate it and/or select it as a best answer where applies. Thank you.

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

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?

-- With best regards, VooDooMan - If you find my post helpful, please rate it and/or select it as a best answer where applies. Thank you.

>>...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 )?

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?

Quote:

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...

-- With best regards, VooDooMan - If you find my post helpful, please rate it and/or select it as a best answer where applies. Thank you.

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

Hello Judy,

Quote:

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.

Quote:

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.

Quote:

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?

-- With best regards, VooDooMan - If you find my post helpful, please rate it and/or select it as a best answer where applies. Thank you.

offtop {
Also wanting to be BT btw.
:3
};

>>...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?

Bild des Benutzers Jennifer J. (Intel)

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

 

Melden Sie sich an, um einen Kommentar zu hinterlassen.