- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I would like to report a bug, I hope it is the right place. I asked on stackoverflow first (see here).
Trying to compile the code below with ICC (VS10 integrated, Composer XE 2013, Win64) return this error:
error #453: protected function "A::A()" (declared at line 10) is not accessible through a "A" pointer or object.
class A
{
protected:
constexpr A() = default;
~A() = default;
A(const A&) = delete;
};
class B
: protected A
{
public:
B() = default;
};
int main()
{
B b;
}
Modifications that made the code compile :
- making the ctor of A public
- removing the deleted copy ctor of A
- replacing "= default;" by "{}" in the ctor of A
- replacing "= default;" by " : A() {}" in the ctor of B
Modifications that didn't make the code compile :
- removing the constexpr
- changing inheritance of A by B to public and private
- replacing "= default;" by " {}" in the ctor of B without explicit call to A's ctor
Thank you for your consideration.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another solution has been given by Mike Kinghan after I tested Arne Mertz's ideas an reported the results :
It appears that adding a pointless non-static data member in the class is a good workaround :
class A
{
protected:
constexpr A() = default;
~A() = default;
A(const A&) = delete;
private:
char placate_intel_compiler_bug = 0;
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reporting the issue with a testcase.
This issue has been solved in the 14.0, although the fix is not in the beta or beta update. 14.0 will be released in the near future. An announcement will be posted on the Forum when it is released.
Thanks,
Jennifer

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page