New user self-registration is disabled due to spam. For an account please email bugs-admin@lists.llvm.org with your e-mail address and full name.

Bug 23018 - clang claims an inherited constructor protected when declared public with using
Summary: clang claims an inherited constructor protected when declared public with using
Status: RESOLVED INVALID
Alias: None
Product: clang
Classification: Unclassified
Component: C++ (show other bugs)
Version: 3.6
Hardware: PC Linux
: P normal
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-25 05:15 PDT by Andreas Pokorny
Modified: 2015-04-02 17:17 PDT (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments
Two versions of the error included, one variant works with gcc, the other yields the same behavior in gcc and clang (313 bytes, application/x-download)
2015-03-25 05:15 PDT, Andreas Pokorny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Pokorny 2015-03-25 05:15:45 PDT
Created attachment 14096 [details]
Two versions of the error included, one variant works with gcc, the other yields the same behavior in gcc and clang

See the attached file. 

Behavior with clang-3.6 and clang-3.5:
bug_report.cpp:25:7: error: calling a protected constructor of class 'Bar'
    } bar(a);
      ^
bug_report.cpp:24:20: note: declared protected here
        using Foo::Foo;
                   ^
1 error generated.
Comment 1 Richard Smith 2015-04-02 17:17:36 PDT
An inheriting constructor has the same access as the corresponding original constructor. See [class.inhctor]p4.