mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
syncing uppdev
git-svn-id: svn://ultimatepp.org/upp/trunk@922 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
b5c6615880
commit
fff598768c
2 changed files with 27 additions and 0 deletions
18
uppdev/ArrayOne/ArrayOne.cpp
Normal file
18
uppdev/ArrayOne/ArrayOne.cpp
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
struct ArrayOneHelper {
|
||||
Array<T> array;
|
||||
One<T> one;
|
||||
|
||||
public:
|
||||
operator One<T>&();
|
||||
|
||||
~ArrayOneHelper() { array.Add(one.Detach()); }
|
||||
};
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
Test(array.AddOne());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue