hrev48626 adds 1 changeset to branch 'master' old head: 61c227c6eba2639b968c755bccd84fbd14fc6f1f new head: 6aa4d138bfccc79e327768f2f128edc03b7c62e5 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=6aa4d13+%5E61c227c ---------------------------------------------------------------------------- 6aa4d13: LayoutBuilder: document C++ method chaining behavior Fixes #8515. [ Adrien Destugues <pulkomandy@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev48626 Commit: 6aa4d138bfccc79e327768f2f128edc03b7c62e5 URL: http://cgit.haiku-os.org/haiku/commit/?id=6aa4d13 Author: Adrien Destugues <pulkomandy@xxxxxxxxx> Date: Wed Jan 7 16:27:51 2015 UTC Ticket: https://dev.haiku-os.org/ticket/8515 ---------------------------------------------------------------------------- 1 file changed, 14 insertions(+) docs/user/interface/LayoutBuilder.dox | 14 ++++++++++++++ ---------------------------------------------------------------------------- diff --git a/docs/user/interface/LayoutBuilder.dox b/docs/user/interface/LayoutBuilder.dox index 265b7c7..5776ace 100644 --- a/docs/user/interface/LayoutBuilder.dox +++ b/docs/user/interface/LayoutBuilder.dox @@ -90,6 +90,20 @@ BLayoutBuilder::Group<>(B_HORIZONTAL) // back to the Group<>::GridBuilder \endcode + Note that the C++ language does not impose any sequence points in such + method chains. This means the arguments to all calls may be evaluated in an + unexpected order. For exemple, the following code may not result in adding + the 3 views in rows 0, 1 and 2 in the target grid: + +\code + // Don't do this! + int row = 0; + BLayoutBuilder::Grid<>(target) + .Add(viewA, row++) + .Add(viewB, row++) + .Add(viewC, row++); +\endcode + \since Haiku R1 */