diff --git a/coord/ops.hpp b/coord/ops.hpp index 7c7e9cb5..af3c447f 100644 --- a/coord/ops.hpp +++ b/coord/ops.hpp @@ -1426,7 +1426,23 @@ namespace util { { return rshift (k, num, K {fill}); } -} + + + template < + typename K, + typename = std::enable_if_t< + is_coord_v + > + > + constexpr auto + lshift (const K k, const int places, typename K::value_type fill) + { + K res {}; + std::copy_n (std::cbegin (k) + places, K::elements - places, std::begin (res)); + std::fill_n (std::begin (res) + K::elements - places, places, fill); + return res; + } +}; ///////////////////////////////////////////////////////////////////////////////