.reference

git-svn-id: svn://ultimatepp.org/upp/trunk@10454 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-11-17 08:00:08 +00:00
parent 52eeacf5d8
commit 6b4db67068

View file

@ -34,9 +34,12 @@ CONSOLE_APP_MAIN{
// DUMP(Min(empty)); // This is undefined (fails in ASSERT)
DUMP(Min(empty, -99999));
int mul = 1;
Accumulate(data, [&](int x) { mul *= x; });
DUMP(mul);
struct {
int mul = 1;
void operator()(int x) { mul *= x; };
} acc;
Accumulate(data, acc);
DUMP(acc.mul);
DUMP(Sum(data));
@ -48,7 +51,7 @@ CONSOLE_APP_MAIN{
DUMP(Sum(data));
Vector<String> s = Split("one;two;three", ';');
Vector<String> s = { "one", "two", "three" };
DUMP(Sum(s, ""));
data = { 5, 7, 9, 9, 14, 20, 23, 50 };