-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
clangClang issues not falling into any other categoryClang issues not falling into any other category
Description
std::string new_string_after_operational = ResovleCharString("any_test_string"); //const char[]
where:
#define ResovleCharStringA(strAscii) \
[]() -> char* { \
constexpr auto sizeAscii = sizeof(strAscii) / sizeof(strAscii[0]); \
constexpr auto resovled_strAscii = class_operationAscii<sizeAscii>(strAscii); \
static char after_operation_stringA[sizeAscii]; \
operational_strA.operationAscii((unsigned char*)resovled_strA); \
return after_operation_stringA; \
}()
- CLANG - lot of trash dynamic operations when compiler is knowed original string length
- MS VC - complier dont use original string with strlen and strcopy operations before call operational_strA.operationAscii() and return already operation completed string.
this error is bypass in CLANG by next construction:
constexpr auto test = "any_test_string";
std::string new_string_after_operational = ResovleCharString(test);
Metadata
Metadata
Assignees
Labels
clangClang issues not falling into any other categoryClang issues not falling into any other category