[LLVMbugs] [Bug 9910] New: Constructor mistakenly marked deleted

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 13 09:55:45 PDT 2011


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

           Summary: Constructor mistakenly marked deleted
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: hhinnant at apple.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Apple clang version 3.0 (trunk 131287) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin10.7.0
Thread model: posix

class money_base
{
public:
    enum part {none, space, symbol, sign, value};
    struct pattern {char field[4];};
};

class  moneypunct
    : public money_base
{
public:

protected:

    virtual pattern do_neg_format() const
        {pattern __p = {symbol, sign, none, value}; return __p;}
};

int main()
{
}


test.cpp:17:60: error: call to deleted constructor of 'money_base::pattern'
        {pattern __p = {symbol, sign, none, value}; return __p;}
                                                           ^~~
test.cpp:6:12: note: function has been explicitly marked deleted here
    struct pattern {char field[4];};
           ^
1 error generated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list