<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:rbock@eudoxos.de" title="Roland <rbock@eudoxos.de>"> <span class="fn">Roland</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - member function of template instantiated even though only declaration is needed"
   href="https://llvm.org/bugs/show_bug.cgi?id=27221">bug 27221</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>INVALID
           </td>
           <td>---
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - member function of template instantiated even though only declaration is needed"
   href="https://llvm.org/bugs/show_bug.cgi?id=27221#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - member function of template instantiated even though only declaration is needed"
   href="https://llvm.org/bugs/show_bug.cgi?id=27221">bug 27221</a>
              from <span class="vcard"><a class="email" href="mailto:rbock@eudoxos.de" title="Roland <rbock@eudoxos.de>"> <span class="fn">Roland</span></a>
</span></b>
        <pre>Sorry, if I am a bit obnoxious about this. But I am having trouble with the
given explanation:

If I remove the definition of the move constructor, the code compiles and links
just fine with every compiler I could get my hands on (gcc, clang, msvc).

template<typename T>
struct X
{
  X() = default;

  X(X&&);
};

auto impl() -> X<int>
{
  return {};
}

auto test() -> decltype(impl())
{
  return impl();
}

int main()
{
  test();
}


Thus, the implementation does not seem to be required. According to the given
explanation, this depends on the current mood of the compiler, and they could
all fail to compile tomorrow. Thus, it is not deterministic whether or not this
code can be compiled.

Then maybe what I reported is not a bug in clang but a bug in the standard?</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>