Browse Source

types: real pointer should take precedence over array

*should* fix most constexpr'ness issues when inlining
(but, now has a small overhead of template instantiation)
network/test
Maxim Prokhorov 1 year ago
parent
commit
a6031c7720
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      code/espurna/types.h

+ 2
- 1
code/espurna/types.h View File

@ -264,7 +264,8 @@ struct StringView {
_len(len)
{}
constexpr StringView(const char* ptr) noexcept :
template <typename T, typename = typename std::enable_if<std::is_pointer<T>::value>::type>
constexpr StringView(T ptr) noexcept :
StringView(ptr, __builtin_strlen(ptr))
{}


Loading…
Cancel
Save