Commit 43e2d1e0 authored by Dominik Charousset's avatar Dominik Charousset

Fix build on Clang and MSVC

parent 6713c6d6
...@@ -106,11 +106,20 @@ public: ...@@ -106,11 +106,20 @@ public:
// nop // nop
} }
#ifdef CAF_GCC
constexpr string_view(const char* cstr) noexcept constexpr string_view(const char* cstr) noexcept
: data_(cstr), : data_(cstr),
size_(strlen(cstr)) { size_(strlen(cstr)) {
// nop // nop
} }
#else
template <size_t N>
constexpr string_view(const char (&cstr)[N]) noexcept
: data_(cstr),
size_(N - 1) {
// nop
}
#endif
constexpr string_view(const string_view&) noexcept = default; constexpr string_view(const string_view&) noexcept = default;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment