Public bug reported:
g++ > 5.1 introduced a regression Following code compiled with g++ -std=c++11 #include <memory> struct HelperArgs { std::shared_ptr<bool> dummy; }; static void freefunc(HelperArgs aa = {}) { }; // doesn't work //static void freefunc(HelperArgs aa = HelperArgs{}) { }; // works int main() { freefunc(); return 0; } creates: g++ -std=c++11 test.cpp /tmp/ccDj6FO4.o: In function `main': test.cpp:(.text+0xc7): undefined reference to `std::shared_ptr<bool>::shared_ptr()' collect2: error: ld returned 1 exit status all clang++ compile this code fine ** Affects: gcc-5 (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1643538 Title: gcc 5 copy list initialization creates undefined reference To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1643538/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs