Seems only gcc can do a constexpr with strlen.
This fixes the build with clang, hopefully to with MSVC?
svuorela |
Seems only gcc can do a constexpr with strlen.
This fixes the build with clang, hopefully to with MSVC?
No Linters Available |
No Unit Test Coverage |
Buildable 10311 | |
Build 10329: arc lint + arc unit |
src/imageformats/ora.cpp | ||
---|---|---|
21 | Won't sizeof give the sizeof(char*)? |
Although s_magic decays to a char*, it is not a char*. char[n] is a type distinct from char*
From e.g. man strlen
char string[32] = "hello, world"; char *ptr = string; sizeof (string) ⇒ 32 sizeof (ptr) ⇒ 4 /* (on a machine with 4 byte pointers) */