<html>
    <head>
      <base href="http://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 --- - Move constructor SFINAE from parameter list to template argument list to work with inheriting constructors."
   href="http://llvm.org/bugs/show_bug.cgi?id=20173">20173</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Move constructor SFINAE from parameter list to template argument list to work with inheriting constructors.
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>eric@efcs.ca
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, mclow.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Inheriting constructors and SFINAE in constructor parameter lists do not play
nicely in c++11 due to 12.9.1. 

For example the following code will not compile although it likely should.

#include <type_traits>

struct A {
    A(int) {}

    template <class T>
    A(T, typename std::enable_if<!std::is_same<T, int>::value>::type* = 0) {}
};

struct B : public A { using A::A; };

int main() { B b(0); }

I think an effort should be made to convert constructors with SFINAE into forms
that allow the constructors to be inherited.

Some conversions may require the use of default NTTP in function templates
which is a C++11 extension. It may not be worth it change these constructors.

This is the initial list of classes that have SFINAE constructor parameters and
should be considered for conversion:
- chrono::duration
- chrono::time_point
- forward_list
- function
- list
- default_delete
- queue
- linear_congruential_engine
- mersenne_twister_engine
- subtract_with_carry_engine
- discard_block_engine
- independent_bits_engine
- shuffle_order_engine
- stack
- error_condition
- pair
- vector

Open Questions:
  - Is there a way to tell if the compiler supports default NTTPs for function
templates? 
  - Should classes that require C++03 support be converted if it means having
two sets of constructors?
  - Are there any problems with moving SFINAE to the template argument list?</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>