diff --git a/include/stdex/mapping.hpp b/include/stdex/mapping.hpp index 6f13cfca7..0c6cb18b7 100644 --- a/include/stdex/mapping.hpp +++ b/include/stdex/mapping.hpp @@ -68,6 +68,16 @@ namespace stdex { return mapping(from + other.from, to + other.to); } + + /// + /// Reverses source and destination indexes + /// + void invert() + { + T tmp = from; + from = to; + to = tmp; + } }; template >>