From 7b5d1e3d46e94262a9c0fd3a01ab4685aea9d12d Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 1 May 2021 15:10:54 -0400 Subject: Added bash completion, amongst others --- src/utils.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h index bdf7ddc..e44bdf2 100644 --- a/src/utils.h +++ b/src/utils.h @@ -29,6 +29,18 @@ namespace utils { } } + template std::vector> castPtrs(std::vector> from) { + std::vector> Ts; + for(std::shared_ptr f : from) { + std::shared_ptr t = dynamic_pointer_cast(f); + if(t) { + Ts.push_back(t); + } + } + return Ts; + } + + template std::string join(Container parts, std::string joiner) { std::stringstream out; bool isFirst = true; -- cgit v1.2.3