kfr

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
Log | Files | Refs | README

commit 11f2867d798adaa35c3cc12c0d30d9e5b08b240f
parent cbe8c79107e1575766cf6a1134b8f524794a1f0b
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date:   Mon,  1 Apr 2019 17:10:23 +0000

as_string: support for std::vector

Diffstat:
Minclude/kfr/io/tostring.hpp | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/include/kfr/io/tostring.hpp b/include/kfr/io/tostring.hpp @@ -30,6 +30,7 @@ #include "../simd/complex.hpp" #include "../simd/vec.hpp" #include <cmath> +#include <vector> namespace cometa { @@ -201,6 +202,15 @@ struct representation<std::array<T, Size>> return details::array_to_string(value.data(), value.size()); } }; +template <typename T, typename Allocator> +struct representation<std::vector<T, Allocator>> +{ + using type = std::string; + static std::string get(const std::vector<T, Allocator>& value) + { + return details::array_to_string(value.data(), value.size()); + } +}; } // namespace cometa namespace kfr