If the `const char*` is a compile-time value, you can get its size via `std::char_traits<char>::length()`.
Here I could get `magic_functor<std::source_location::file_name()>::type` to work on MSVC: https://godbolt.org/z/Ph8dd78fa gcc doesn't accept this code, but that seems more like an implementation problem than a specification problem?