<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/78128>78128</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            std::source_location make constexpr size wrong at compile time.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Ghost-LZW
      </td>
    </tr>
</table>

<pre>
    background: want to get compile time type name without rtti.

```cpp
#include <iostream>
#include <string_view>
#include <source_location>
#include <utility>

template<typename T>
void foo() {
  constexpr std::string_view func_name =
 std::source_location::current().function_name();
  constexpr size_t type_anchor_idx = func_name.find_first_of('=');
  constexpr size_t type_end_idx = func_name.find_last_of(']');
  constexpr auto type_str =
      func_name.substr(type_anchor_idx + 2, type_end_idx - type_anchor_idx - 2);
  std::cerr << type_anchor_idx << ' ' << type_end_idx << std::endl;
  std::cerr << func_name.data() << '\n' << type_str.data() << std::endl;
  std::cerr << type_str.size() << ' '
 << std::make_index_sequence<type_str.size()>().size() << std::endl;
}

int main() {
  foo<int>();
}
/*
14 19
void foo() [T = int]
int]
3 9
*/
```

https://godbolt.org/z/r45d8cjsr

expect output is
```
14 19
void foo() [T = int]
int]
3 3
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyklc-T6igQx_8acqG0EjAvySGHGV33ssdXtVV7SSF0lPcSyEIzzsxfvwU66mhmf9RaGlNN9-fbDTQI7_XeALSkfCblJhMBD9a1vx6sx8Vvf_ye7ax6a3dC_tw7G4wi_IkehUGKlu4BqbTjpAegqEeg-DYBNWIEetR4sAGpQ9RLkm9I_nR-fstPXzlNZwvj2sghKKCEr7X16ECMhP8yN-zRabPvXjQcv_KwwUnoBisFamu-8AqoB41v19H0RBinQSAQvo6lpEq-X3xerFa0t5awmrCGkur5ZKdUWuMRXidHPcYZIvzpJlHaByO7BCN8c465Ot7nG40yOAcGT0rLGB_HEuNkI3xOXL9Dh2kVOmHkwbpOq9coek1h2Wujul47j53tE6yKWbHq31DBqK-Qg7glln9HFAHtiefR3cxJ-lyxPuw8OsLqh4LYM2WErT_ntHgofBG9blO4TLoEF4XXhK9npiuZCatOvxuva_nJdsGBUcM_yVzrUgLFxx66aJFybe7lPLoZ5_-keuHEVXwQTcKn8Hv4KH5Cp42C187DnwGM_OiKO1xsj9M2fZSYT5VUm9um0wbpKLR5bKvYa3ytDV40ZhhsS9iZVKxo0cz3avn8PW3aCCs3F-HLO6fNBy8hP59Vt-keECcfq4rC271VOzvg0ro9Ydt3wrZuVapa_vDuNgheJ5BIbcApINV-lv-_0ud3yEy1XDW8ERm0RZWXPG84q7NDmzPFVJ0XuSqghKZvOOSNkn0NfVFXrMh0y3K2youizJuc5fWyh7rpYVcVUjBR9d_IKodR6GE5DC9jrDzT3gdoq7pgdTaIHQw-XSeMGTjSNEgYi7eLa2PMYhf2nqzyQXv0VwpqHKD96mCkcUfeHUv06KzZU_H5GlpmwQ3t3TppPITdUtqRsG1UPP8tJmd_gETCtilPT9g21fFXAAAA__9ktxiT">