2022-04-01 04:06:53 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: auListUtils.hpp
|
|
|
|
Date: 2022-3-27
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
template <typename T, typename ... Args>
|
2023-04-17 14:32:13 +00:00
|
|
|
bool AuListFromArgs(T &list, Args && ... args)
|
2022-04-01 04:06:53 +00:00
|
|
|
{
|
|
|
|
constexpr auto end = sizeof...(Args);
|
|
|
|
if (!AuTryResize(list, end))
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
AuUInt i = 0;
|
|
|
|
(..., (list[i++] = AuMove(args)));
|
|
|
|
return true;
|
|
|
|
}
|