mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
18 lines
248 B
C++
18 lines
248 B
C++
#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());
|
|
}
|