[llvm-bugs] [Bug 30247] New: Clang prohibits friendship based on typedefs

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 1 16:16:52 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30247

            Bug ID: 30247
           Summary: Clang prohibits friendship based on typedefs
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mattreecebentley at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

This:
template <class class_element_allocator_type, bool is_const> class
class_iterator;
typedef class_iterator<element_allocator_type, false>        iterator;
typedef class_iterator<element_allocator_type, true>        const_iterator;
friend class class_iterator<element_allocator_type, false>;
friend class class_iterator<element_allocator_type, true>;

works.

This:

template <class class_element_allocator_type, bool is_const> class
class_iterator;
typedef class_iterator<element_allocator_type, false>        iterator;
typedef class_iterator<element_allocator_type, true>        const_iterator;
friend class iterator;
friend class const_iterator;

Does not.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160901/0b96f6e7/attachment.html>


More information about the llvm-bugs mailing list