[LLVMbugs] [Bug 15453] New: static constexpr member function fails to compile

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 6 00:07:59 PST 2013


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

            Bug ID: 15453
           Summary: static constexpr member function fails to compile
           Product: clang
           Version: 3.2
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: warp.grrr at gmx.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following code:

//--------------------------------------------------
class MyClass
{
 public:
    static constexpr int func(int);
};

constexpr int MyClass::func(int i) { return i+1; }
//--------------------------------------------------

issues the compiler error "Conflicting types for 'func'".

(Note that if the function is implemented in its declaration inside the class,
it compiles ok.)

-- 
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/20130306/ef72287e/attachment.html>


More information about the llvm-bugs mailing list