/*** Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: ResetMember.hpp Date: 2022-08-26 Author: Reece ***/ #pragma once template static void AuResetMember(T &ref, Args &&...args) { if constexpr (AuIsClass_v) { ref.~T(); AuMemset(&ref, 0, sizeof(ref)); new (&ref) T(AuForward(args)...); } else { ref = AuDecay_t(); } } template static void AuResetMember(AuSPtr &ref) { ref.reset(); } namespace Aurora::Memory { struct ByteBuffer; } template static void AuResetMember(Aurora::Memory::ByteBuffer &ref);