https://llvm.org/bugs/show_bug.cgi?id=27221

Roland <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #3 from Roland <[email protected]> ---
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?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to