summaryrefslogtreecommitdiff
path: root/zen/string_tools.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2018-07-29 21:45:13 -0700
committerDaniel Wilhelm <shieldwed@outlook.com>2018-07-29 21:45:13 -0700
commit06c99e6c91d87a91f3e54191670d23e3f4d132b9 (patch)
treea2c82149d6fe802c68365f73e11f3c241c95ef3d /zen/string_tools.h
parent10.1 (diff)
downloadFreeFileSync-06c99e6c91d87a91f3e54191670d23e3f4d132b9.tar.gz
FreeFileSync-06c99e6c91d87a91f3e54191670d23e3f4d132b9.tar.bz2
FreeFileSync-06c99e6c91d87a91f3e54191670d23e3f4d132b9.zip
10.2
Diffstat (limited to 'zen/string_tools.h')
-rwxr-xr-xzen/string_tools.h8
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>
bgstack15