This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 154544 [details] my formatting settings Following code: ForTypes::ForTypesImpl<T...>{}.loop(std::forward<F>(body), std::make_index_sequence<sizeof...(T)>{}, std::forward<T>(objects)...); where: - ForTypes is namespace - ForTypesImpl is template structure - loop is template method of that struct is formatted by netbeans as: - after first formatting: ForTypesImpl < T...>{} .loop(std::forward<F>(body), std::make_index_sequence<sizeof...(T)> {}, std::forward<T>(objects)...); - after second formatting: ForTypesImpl < T...>{} .loop(std::forward<F>(body), std::make_index_sequence<sizeof...(T)> {}, std::forward<T>(objects)...); where desired result is: ForTypes::ForTypesImpl<T...>{}.loop(std::forward<F>(body), std::make_index_sequence<sizeof...(T)>{}, std::forward<T>(objects)...); Problems: - ForTypes::ForTypesImpl<T...>{} ^ - this opening bracket is treated like 'less than' operator - there are spaces around it - method call after braces from uniform initialization syntax is treated strangely; its getting worse when overloaded operator() is called instead of regular method
Problems (continuation): - uniform initialization braces were moved to new line, so "std::make_index_sequence<sizeof...(T)>{}," became: "std::make_index_sequence<sizeof...(T)> {},"
Also in return statement unfiorm initialization expression is formatted incorrectly: " return { someOutputValue };" if formatted as: " return { someOutputValue; }; "
fixed, change set: http://hg.netbeans.org/cnd-main/rev/ad00480e10fe
Integrated into 'main-silver', will be available in build *201607160002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/ad00480e10fe User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #253386 Incorrectly formatted templates and initializer lists