[LLVMbugs] [Bug 20096] New: class with pure virtuals makes it non-destructible (unlike libstdc++)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jun 21 15:22:53 PDT 2014


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

            Bug ID: 20096
           Summary: class with pure virtuals makes it non-destructible
                    (unlike libstdc++)
           Product: libc++
           Version: 3.4
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jbeich at tormail.org
                CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
    Classification: Unclassified

$ clang++ -std=c++11 -stdlib=libstdc++ -I/path/to/gcc48/include/c++ a.cc
$ clang++ -std=c++11 -stdlib=libc++ a.cc
a.cc:11:3: error: static_assert failed "A"
  static_assert(std::is_destructible<A>::value, "A");
  ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

$ cat a.cc
#include <type_traits>

class A
{
public:
  virtual int B() const = 0;
};

int main()
{
  static_assert(std::is_destructible<A>::value, "A");
  return 0;
}

-- 
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/20140621/5bbf6fb8/attachment.html>


More information about the llvm-bugs mailing list