<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - char8_t can't be mangled on Windows, but the feature-test macro is defined"
   href="https://bugs.llvm.org/show_bug.cgi?id=41063">41063</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>char8_t can't be mangled on Windows, but the feature-test macro is defined
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>C++2a
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sfinae@hotmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Using Clang 8 RC5 on Windows, the char8_t feature-test macro is defined, but
the type is unusable, which defeats the purpose of feature-test macros:

C:\Temp>type meow.cpp
#include <stdio.h>

template <typename T>
    struct Meow { };

template <typename U>
    void woof(U) { }

int main() {
#ifdef __cpp_char8_t
    puts("__cpp_char8_t defined");
    Meow<char8_t> m;
    woof(m);
#else
    puts("__cpp_char8_t NOT defined");
#endif
}

C:\Temp>cl /EHsc /nologo /W4 /std:c++latest meow.cpp && meow
meow.cpp
__cpp_char8_t NOT defined

C:\Temp>cl /EHsc /nologo /W4 /std:c++latest /Zc:char8_t meow.cpp && meow
meow.cpp
__cpp_char8_t defined

C:\Temp>clang-cl -m32 /EHsc /nologo /W4 /std:c++latest meow.cpp && meow
error: cannot mangle this built-in char8_t type yet
error: cannot mangle this built-in char8_t type yet
2 errors generated.</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>