-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Not sure whether this is intended. And this isn't consistent with the implementation in customization.h.
Lines 42 to 48 in 8d352d7
| ```cpp | |
| template<> | |
| struct magic::type_info<std::string> | |
| { | |
| inline static std::string name = "std::string"; | |
| }; | |
| ``` |
magic-cpp/include/magic/customization.h
Lines 11 to 15 in 8d352d7
| template <> | |
| struct magic::type_info<std::string> | |
| { | |
| constexpr static const char* name = "std::string"; | |
| }; |
Also, the use of such a pointer is possibly (but not always) IFNDR because magic::type_info<std::string>::name can be initialized to different values in multiple TUs when the string literal is not merged, see CWG2678.
How about changing the specialization(s) like this?
template <>
struct magic::type_info<std::string>
{
constexpr static char name[]{"std::string"};
};Metadata
Metadata
Assignees
Labels
No labels