diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2018-07-29 21:45:13 -0700 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2018-07-29 21:45:13 -0700 |
commit | 06c99e6c91d87a91f3e54191670d23e3f4d132b9 (patch) | |
tree | a2c82149d6fe802c68365f73e11f3c241c95ef3d /zen/string_tools.h | |
parent | 10.1 (diff) | |
download | FreeFileSync-06c99e6c91d87a91f3e54191670d23e3f4d132b9.tar.gz FreeFileSync-06c99e6c91d87a91f3e54191670d23e3f4d132b9.tar.bz2 FreeFileSync-06c99e6c91d87a91f3e54191670d23e3f4d132b9.zip |
10.2
Diffstat (limited to 'zen/string_tools.h')
-rwxr-xr-x | zen/string_tools.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/zen/string_tools.h b/zen/string_tools.h index 58cb6ea6..e09cb61f 100755 --- a/zen/string_tools.h +++ b/zen/string_tools.h @@ -14,7 +14,7 @@ #include <algorithm> #include <cassert> #include <vector> -#include <sstream> +#include <sstream> //std::basic_ostringstream #include "stl_tools.h" #include "string_traits.h" @@ -446,7 +446,11 @@ namespace impl template <class S, class T> struct CopyStringToString { - T copy(const S& src) const { return T(strBegin(src), strLength(src)); } + T copy(const S& src) const + { + static_assert(!std::is_same_v<std::decay_t<S>, std::decay_t<T>>); + return T(strBegin(src), strLength(src)); + } }; template <class T> |