Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:07

0001 /*
0002  *  Copyright (c), 2017, Adrien Devresse <adrien.devresse@epfl.ch>
0003  *  Copyright (c), 2017-2024, BlueBrain Project, EPFL
0004  *
0005  *  Distributed under the Boost Software License, Version 1.0.
0006  *    (See accompanying file LICENSE_1_0.txt or copy at
0007  *          http://www.boost.org/LICENSE_1_0.txt)
0008  *
0009  */
0010 #pragma once
0011 
0012 #include <vector>
0013 
0014 namespace HighFive {
0015 namespace detail {
0016 
0017 template <class To, class From, class It = From const*>
0018 inline std::vector<To> convertSizeVector(const It& begin, const It& end) {
0019     std::vector<To> to(static_cast<size_t>(end - begin));
0020     std::copy(begin, end, to.begin());
0021 
0022     return to;
0023 }
0024 
0025 template <class To, class From>
0026 inline std::vector<To> convertSizeVector(const std::vector<From>& from) {
0027     return convertSizeVector<To, From>(from.cbegin(), from.cend());
0028 }
0029 
0030 }  // namespace detail
0031 }  // namespace HighFive