<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 --- - erroneous error of circular inheritance"
   href="https://llvm.org/bugs/show_bug.cgi?id=26271">26271</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>erroneous error of circular inheritance
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.7
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>hui.li@me.com
          </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>I could be wrong but I don't think the following code has circular inheritance.
And gcc6 compiles it just fine.

#include <type_traits>
#include <utility>

enum color
{
   red,
   green,
   yellow
};

enum shape
{
   circle,
   square
};

template < color... c >
using colors = std::integer_sequence<color,c...>;

template < shape... s >
using shapes = std::integer_sequence<shape,s...>;

template < color, shape >
struct object
{};

template < typename, typename >
struct objects;

template < color c, shape s >
struct objects<colors<c>,shapes<s>>
 : object<c,s>
{};

template < color c, shape... s >
struct objects<colors<c>,shapes<s...>>
 : object<c,s>...
{};

template < color... c, shape... s >
struct objects<colors<c...>, shapes<s...>>
 : objects<colors<c>,shapes<s...>>...
{};

int main(int argc, const char * argv[])
{
   objects<colors<red,green>,shapes<circle>> x;
   object<red,circle>& r = x;
   (void)r;
}


clang++-mp-3.7 -std=c++1z main.cpp
main.cpp:42:4: error: circular inheritance between 'objects<colors<c>,
shapes<s...> >' and 'objects<integer_sequence<color,
      c...>, integer_sequence<shape, s...> >'
 : objects<colors<c>,shapes<s...>>...
   ^</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>