http://llvm.org/bugs/show_bug.cgi?id=19123

            Bug ID: 19123
           Summary: deprecated warning for implicit copy constructor
                    doesn't notice the destructor is defaulted
           Product: clang
           Version: 3.3
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

I love the new implicit copy constructor warning, but it seems it is
overzealous about what constitutes a user-declared destructor.  For example

class EnumIterator
{
public:
    EnumIterator() = default;
    ~EnumIterator() = default;
};

static void E()
{
    EnumIterator a;
    EnumIterator b;
    b = a;
}

Results in the error:

error: definition of implicit copy assignment operator for 'EnumIterator' is
deprecated because it has a user-declared destructor [-Werror,-Wdeprecated]
        ~EnumIterator() = default;
        ^
note: implicit copy assignment operator for 'EnumIterator' first required here
        b = a;

But clearly, despite technically being user-declared, it is user-decalred to be
the default, which I would think is functionally equivalent to the non-user
declared case.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to