<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 - clang -x cuda fails in some templates on >>>"
   href="https://bugs.llvm.org/show_bug.cgi?id=37013">37013</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang -x cuda fails in some templates on >>>
          </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>Linux
          </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>CUDA
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>a.huebl@hzdr.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Compiling C++11 template code with `>>>` fails in some cases as soon as `-x
cuda` is used.

Although `>>>` should be valid in C++11, they might be mismatched here with
CUDA kernel arguments.

Environment:
  clang version 7.0.0 (<a href="https://git.llvm.org/git/clang.git/">https://git.llvm.org/git/clang.git/</a>
780143bbd516aa39d754e5cab50955321b71fba0) (<a href="https://git.llvm.org/git/llvm.git/">https://git.llvm.org/git/llvm.git/</a>
bef5f248b85fb47702bd94a11276728a4cb4689f)
  nvcc 8.0.44

It would be great if closing multiple nested template arguments in such manner
works with the CUDA frontend as well.

Reproducer: Issue first seen with Boost.mp11 (1.66.0) with minimal example:

  #include <boost/mp11.hpp>
  int main() {}

Compiled with

  clang++ -std=c++11 -x cuda main.cpp  --cuda-path=$CUDA_ROOT
-I$BOOST_ROOT/include

<a href="https://github.com/ComputationalRadiationPhysics/alpaka/issues/459">https://github.com/ComputationalRadiationPhysics/alpaka/issues/459</a>

We could not boil it down to a non-mp11 code snippet yet, maybe it's related to
the heavy use of variadic template arguments in combination with `>>>` ?</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>