Created attachment 166153 [details] Fix braced init lists for conforming to C++ N3922 During the exp-run in bug 206074, it was found that x11/leechcraft gives errors with a recent clang 3.8.0 snapshot [1]: /wrkdirs/usr/ports/x11/leechcraft/work/leechcraft-0.6.70/src/util/network/addresses.cpp:44:4: error: initializer for variable 'locals' with type 'const auto' contains multiple expressions QHostAddress::parseSubnet ("172.16.0.0/12"), ^ and a number of similar errors. This is because after the C++ Working Group issue N3922, a C++11/14 braced initializer for more than one element should be prefixed by an assignment operator, e.g. instead of: auto foo { 1, 2, 3, 4 }; one should write: auto foo = { 1, 2, 3, 4 }; The attached patch changes the few initializers in leechcraft to conform to this new syntax. This fix should probably be upstreamed too. [1] http://package18.nyi.freebsd.org/data/headamd64PR206074-default/2016-01-15_15h26m58s/logs/errors/leechcraft-0.6.70_7.log [2] http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2014/n3922.html
Please build it, if it's ok - commit.
(In reply to Veniamin Gvozdikov from comment #1) > Please build it, if it's ok - commit. Yes, it built OK for me, though it took a long time, it has a LOT of dependencies! :)
A commit references this bug: Author: dim Date: Wed Jan 27 19:52:04 UTC 2016 New revision: 407380 URL: https://svnweb.freebsd.org/changeset/ports/407380 Log: In x11/leechcraft, change the syntax of C++11 braced initializers with multiple elements to correspond to C++ WG paper N3922. E.g, instead of: auto foo { 1, 2, 3, 4 }; one should write: auto foo = { 1, 2, 3, 4 }; This makes the port compile with clang 3.8.0 and higher, or gcc 5.0 and higher. Approved by: vg (maintainer) PR: 206650 MFH: 2016Q1 Changes: head/x11/leechcraft/files/patch-plugins_azoth_plugins_otroid_otrhandler.cpp head/x11/leechcraft/files/patch-util_network_addresses.cpp head/x11/leechcraft/files/patch-util_xdg_xdg.cpp
A commit references this bug: Author: dim Date: Wed Jan 27 21:02:31 UTC 2016 New revision: 407389 URL: https://svnweb.freebsd.org/changeset/ports/407389 Log: MFH: r407380 In x11/leechcraft, change the syntax of C++11 braced initializers with multiple elements to correspond to C++ WG paper N3922. E.g, instead of: auto foo { 1, 2, 3, 4 }; one should write: auto foo = { 1, 2, 3, 4 }; This makes the port compile with clang 3.8.0 and higher, or gcc 5.0 and higher. Approved by: ports-secteam (feld) PR: 206650 Changes: _U branches/2016Q1/ branches/2016Q1/x11/leechcraft/files/patch-plugins_azoth_plugins_otroid_otrhandler.cpp branches/2016Q1/x11/leechcraft/files/patch-util_network_addresses.cpp branches/2016Q1/x11/leechcraft/files/patch-util_xdg_xdg.cpp