mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
cpp11 branch - committing the merge (rest of it)
git-svn-id: svn://ultimatepp.org/upp/trunk@7048 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
51687976c2
commit
e5dfeba4be
58 changed files with 1176 additions and 2335 deletions
36
tutorial/Ntl15/Ntl15.cpp
Normal file
36
tutorial/Ntl15/Ntl15.cpp
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
Tuple3<int, String, String> x = MakeTuple<int, String, String>(12, "hello", "world");
|
||||
|
||||
DUMP(x.a);
|
||||
DUMP(x.b);
|
||||
DUMP(x.c);
|
||||
|
||||
DUMP(x);
|
||||
|
||||
DUMP(GetHashValue(x));
|
||||
|
||||
Tuple3<int, String, String> y = x;
|
||||
|
||||
DUMP(x != y);
|
||||
DUMP(x.Compare(y));
|
||||
|
||||
y.b = "a";
|
||||
|
||||
DUMP(SgnCompare(y));
|
||||
DUMP(x < y);
|
||||
|
||||
static Tuple2<int, const char *> map[] = {
|
||||
{ 1, "one" },
|
||||
{ 2, "one" },
|
||||
{ 3, "one" },
|
||||
};
|
||||
|
||||
Tuple2<int, const char *> *f = FindTuple(map, __countof(map), 2);
|
||||
if(f)
|
||||
DUMP(f->b);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue