<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Compilation failure when using libc++"
   href="https://llvm.org/bugs/show_bug.cgi?id=22935">22935</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Compilation failure when using libc++
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.6
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>partow@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, mclow.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=14064" name="attach_14064" title="code that demonstrates the issue">attachment 14064</a> <a href="attachment.cgi?id=14064&action=edit" title="code that demonstrates the issue">[details]</a></span>
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 ---</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>