[LLVMbugs] [Bug 22362] New: tuple constructor accepts less arguments than the tuple has values

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jan 27 15:32:56 PST 2015


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

            Bug ID: 22362
           Summary: tuple constructor accepts less arguments than the
                    tuple has values
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: mclow.lists at gmail.com
          Reporter: bugs+llvm+org at sebastianhahn.net
                CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
    Classification: Unclassified

I'm expecting this code to not compile:

    std::tuple<unsigned, unsigned> t(1);

but it does (and it behaves as if I had provided 1 and 0). It was suggested to
me that this stems from an implementation of N4064 as detailed in
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4064.html - but I'm
not spotting it there, and I find it rather surprising that this should work.

It caused a bug where I emplace()d a tuple into a vector and provided one
argument too few. This should imho be at least a warning if it cannot be an
error.

-- 
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/20150127/5f28b740/attachment.html>


More information about the llvm-bugs mailing list