https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100838

--- Comment #1 from Amir Kirsh <kirshamir at gmail dot com> ---
This main:

int main() {
  MyString s1 = MyString{"Hello"}; // same also for rounded brackets 
  std::cout << __LINE__ << std::endl;
}

works as expected.

Output with C++14 and -fno-elide-constructors:

ctor
copy ctor
dtor
22
dtor

Reply via email to