<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 using std::map fails with gcc's STL 6.2.0."
   href="https://llvm.org/bugs/show_bug.cgi?id=30519">30519</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Compilation using std::map fails with gcc's STL 6.2.0.
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.6
          </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>C++11
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>ruben.lapauw@cs.kuleuven.be
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=17345" name="attach_17345" title="Minimal unworking example">attachment 17345</a> <a href="attachment.cgi?id=17345&action=edit" title="Minimal unworking example">[details]</a></span>
Minimal unworking example

The error occurs for clang versions (tested 3.6.1 and 3.8.1) with the
gcc-toolchain (6.2.0) only when C++11 is enabled.
With gcc-toolchain version 5.4.0 or 4.8.5 the error does not occur.
Without C++11 the error does not occur, yet there is no C++11 specific header
code (that I can see).
With gcc of any version (4.8.5, 5.4.0, 6.2.0) the error does not occur.

I ran the attached file with the following commands:
clang++ --std=c++11 -c test.cpp 
clang++ -c test.cpp
g++ --std=c++11 -c test.cpp
g++ -c test.cpp

The difference can be traced back to changes to the following lines:

    620       // Shortcut for the cases where constructors taking _UElements...
    621       // need to be constrained.
    622       template<typename... _UElements> using _TMC =
    623                   _TC<(sizeof...(_Elements) == sizeof...(_UElements)),
    624                       _Elements...>;
    625
    626       template<typename... _UElements, typename
    627                enable_if<
x   628                   _TC<sizeof...(_UElements) == 1,
_Elements...>::template
x   629                     _NotSameTuple<_UElements...>()
x   630                   && _TMC<_UElements...>::template
x   631                     _MoveConstructibleTuple<_UElements...>()
x   632                   && _TMC<_UElements...>::template
x   633                     _ImplicitlyMoveConvertibleTuple<_UElements...>()
x   634                   && (sizeof...(_Elements) >= 1),
x   635         bool>::type=true>
    636         constexpr tuple(_UElements&&... __elements)
    637         : _Inherited(std::forward<_UElements>(__elements)...) { }
    638
    639       template<typename... _UElements, typename
    640         enable_if<
x   641                   _TC<sizeof...(_UElements) == 1,
_Elements...>::template
x   642                     _NotSameTuple<_UElements...>()
x   643                   && _TMC<_UElements...>::template
x   644                     _MoveConstructibleTuple<_UElements...>()
x   645                   && !_TMC<_UElements...>::template
x   646                     _ImplicitlyMoveConvertibleTuple<_UElements...>()
x   647                   && (sizeof...(_Elements) >= 1),
x   648         bool>::type=false>
    649         explicit constexpr tuple(_UElements&&... __elements)
    650         : _Inherited(std::forward<_UElements>(__elements)...) { }</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>