<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 --- - incorrect behavior with std::is_same with nested class in a template class"
   href="https://llvm.org/bugs/show_bug.cgi?id=30759">30759</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>incorrect behavior with std::is_same with nested class in a template class
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.9
          </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>All Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jeanmichael.celerier@gmail.com
          </td>
        </tr>

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

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In this code, the first static_assert compiles with clang++ (and also g++, but
not MSVC) : 

    #include <type_traits>
    template<typename T>
    struct foo
    {
        using sub = struct some_struct;
    };

    template<typename T>
    struct bar
    {
        using sub = struct some_struct { };
    };

    int main()
    {
        static_assert(std::is_same<foo<int>::sub, foo<double>::sub>::value,
"should not pass");
        static_assert(std::is_same<bar<int>::sub, bar<double>::sub>::value,
"should not pass");
    }

The second does (correctly, in my opinion) not.

Here is the relevant bug report in the gcc bug tracker if it can be useful :
<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78065">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78065</a></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>