#pragma once // Copyright (c) 2018-2019 David Burkett // Distributed under the MIT software license, see the accompanying // file LICENSE or http://www.opensource.org/licenses/mit-license.php. #include #include class VectorUtil { public: template static std::vector ToPointerVec(std::vector& in) { std::vector out; out.reserve(in.size()); std::transform( in.begin(), in.end(), std::back_inserter(out), [](T& value) { return &value; } ); return out; } };