[LLVMbugs] [Bug 16077] New: std::vector<bool>::const_reference not bool

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon May 20 15:25:05 PDT 2013


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

            Bug ID: 16077
           Summary: std::vector<bool>::const_reference not bool
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: hhinnant at apple.com
          Reporter: cbcode at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

#include <vector>
struct foo {
    void const* ptr;
    template<typename T> foo(T const& t) : ptr(&t) {}
    foo(bool b);
    foo(std::vector<bool>::reference const&);
  //foo(std::vector<bool>::const_reference const&);
};
void test() {
    std::vector<bool> const v(5, true);
    foo f(v[1]);
}

std::vector<bool>::const_iterator is bool on all other
compilers/standard libraries I tried (gcc, msvc, intel),
and the code above compiles as is.
clang++/libc++ requires to uncomment the commented line,
breaking this code for all other compilers.

Similar problem in BugID 10314 marked as fixed, but
apparently not fixed for my case. 

Linux amd64 debian experimental,
libc++ 1.0~svn181765-1,
clang++ 1:3.2repack-6.

-- 
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/20130520/f1300b79/attachment.html>


More information about the llvm-bugs mailing list