Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Eugene_S_1
Beginner
51 Views

Inheriting an explicit constuctor

Intel C++ compiler (Version 16.0.3.207 Build 20160415) seems to drop the explicit specifier when the constructor of the base class is inherited with using.

struct B
{
    explicit B(int) { }
};

struct D : B
{
    using B::B;
};

B b = 1; // Not OK, fine
D d = 1; // Not OK with Microsoft C++ and GCC, but OK with Intel C++
0 Kudos
1 Reply
Yuan_C_Intel
Employee
51 Views

Hi, Eugene

Thank you for reporting this issue.

I have reproduce the issue you reported and entered into our problem-tracking system. We will try to resolve this issue as soon as we can. However, please be advised that this issue may have to be targeted to for the next major release. I will let you know when I have an update on this issue.

Thank you.

Reply