resolves #104: fix clang compiler error

provide a local typedef instead of using a pure anonymous struct

also fix inconsistent whitespace
feature/contexts
Oliver Giles 5 years ago
parent b90f49987f
commit 21c097a7a9

@ -38,7 +38,8 @@ namespace _ {
}
template<int N, int...I>
static constexpr decltype(auto) static_alloc_str_impl(const char* str, std::integer_sequence<int, I...>) {
return (struct {char buf[N+1];}) {str[I]..., 0};
typedef struct {char buf[N+1];} static_null_terminated;
return (static_null_terminated) {str[I]..., '\0'};
}
template<int N>
static constexpr decltype(auto) static_alloc_str(const char* str) {

Loading…
Cancel
Save