[LLVMbugs] [Bug 22935] New: Compilation failure when using libc++

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 17 05:51:43 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=22935

            Bug ID: 22935
           Summary: Compilation failure when using libc++
           Product: libc++
           Version: 3.6
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: partow at gmail.com
                CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
    Classification: Unclassified

Created attachment 14064
  --> https://llvm.org/bugs/attachment.cgi?id=14064&action=edit
code that demonstrates the issue

The following bit of code compiles error/warning free when using gcc/clang and
libstdc++, however fails to compile when using libc++.


--- snip ---
#include <string>
#include <vector>
#include <deque>

template <typename T> struct fooboo { enum { value = false };};

#define foo(T) \
template<> struct fooboo<T> { enum { value = true }; };

#define do_foo(sequence)                    \
foo(sequence<char>::iterator)               \
foo(sequence<char>::const_iterator)         \
foo(sequence<unsigned char>::iterator)      \
foo(sequence<unsigned char>::const_iterator)\

foo(char*)
foo(signed char*)
foo(unsigned char*)
foo(const char*)
foo(const signed char*)
foo(const unsigned char*)
foo(std::string::iterator)
foo(std::string::const_iterator)

do_foo(std::vector)
do_foo(std::deque)


int main()
{
    return 0;
}
--- snip ---

-- 
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/20150317/ff4fd910/attachment.html>


More information about the llvm-bugs mailing list