[LLVMbugs] [Bug 8097] New: __has_trivial_constructor doesn't work for void and arrays of unknown bound

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 7 08:44:29 PDT 2010


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

           Summary: __has_trivial_constructor doesn't work for void and
                    arrays of unknown bound
           Product: clang
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: hhinnant at apple.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


This trait is supposed to work for void types, and arrays of unknown bounds.  I
believe it should answer false to both.  Here is a test case I believe should
compile:


template <class T, bool Result>
void
test__has_trivial_constructor()
{
    static_assert(__has_trivial_constructor(T) == Result, "");
    // or use assert if -std=c++0x not specified
}

int main()
{
    test__has_trivial_constructor<void, false>();
    test__has_trivial_constructor<int[], false>();
}

-- 
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