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

    <tr>
        <th>Summary</th>
        <td>
            The variable template type is incorrect
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          Mq-b
      </td>
    </tr>
</table>

<pre>
    ```cpp
#include <iostream>
#include <type_traits>

template<std::size_t...values>
constexpr std::size_t array[]{ values... };

int main() {
    std::cout << std::is_same_v<decltype(::array<1, 2, 3, 4, 5>),  const std::size_t[]>;
}
```

[Output](https://godbolt.org/z/E8jTW1GsW):

```
1
```
Both gcc and clang have this result, but this is obviously not true, msvc outputs **0**.

gcc and clang consider `array<1, 2, 3, 4, 5>` to be the same type as `const std::size_t[]`.

---

msvc will only output 1 when faced with the following code.

```cpp
#include <iostream>
#include <type_traits>

template<std::size_t...values>
constexpr std::size_t array[]{ values... };

int main() {
    std::cout << std::is_same_v<decltype(::array<1, 2, 3, 4, 5>), const std::size_t[5]>;
}
```

msvc considers `array<1, 2, 3, 4, 5>` and `const std::size_t[5]` to be of the same type.

- ***I think msvc is right***.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsVcGO4zYM_Rr6QsSQpdhODj4kmUnRQ9HLAnscyDYTa6tYrkQnzX59ITvTTAbTaYteFwhoRxSpR_I9WYdgjj1RBfkW8qdEj9w5X_3y-6JOatdeKyjE_GuGAcQTiA1IZfrGji0hqJ1xgT3pE6jnj9x8HeiFvTYc7jsmy3QarGYCtQvcgtqA2gTznV44TdOztiPdIxrXB6Y_Bo_vtqL2Xl9n7FBucY5L0xShfAK1fXug6RlP2vQgVyDXCOXNi4j3tI0bOeIGtbsvmvAS9IlezqB2LTU2FhWzTM4ZgdplIHcoo1HRLKPJYwVyHV9xquE9_hty9XzHWj7dXl4b_7YGyLe_jjyMHKPkqmMeQswn9yD3R9fWznLq_BHk_jvI_fPq25ev2U_hawShNg-ZHtNnH65uHXd4bBrUfYuN1f0RO30m5M4E9BRGy7G2euR5yQR09dm4Mdgr9o6R_UhxxymcG3QT8oAgNyA3Yn6kb0E9HhU7ZlryCIX4xy4XAtlhHbERxmlhnBLqEKM_630hHiAsFou3fyfgF2Mtut5ebyVghpeOejzohlq8GO6mUw_OWncxE_KW0g-7_UNF_0tFfzfI_D-paBrqK7vCv6VXJOYnXMpnMt1Y6A6PRHzk2E0CIDc_R-H0v80CiaIyx47_8qZJW6l2rdY6oSorRbHMM5HJpKtEni-LMivzvCjqclW3h1YruaamFJmU-SExlRRyKTK5ypYxJs3aWualIMpVKYp1A0tBJ21sau35FO-MxIQwUlWuy1wkVtdkw_RVkLKnC05OkDJ-JHwVYxb1eAywFNYEDvcsbNhS9aUjPGtvdG0JX0k6SzLeE33jvKeGk9Hb6t0tZrgb67RxJ5D7mPX2WAzefaOGQe4nLAHkfsL6ZwAAAP__jkHy6Q">