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

    <tr>
        <th>Summary</th>
        <td>
            #embed interacts poorly with template argument deduction and initializer lists
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            c++,
            clang:frontend,
            rejects-valid
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          cor3ntin
      </td>
    </tr>
</table>

<pre>
    Clang incorrectly rejects the following because it fails to deduce the correct size for the array/initializer list
```cpp

static constexpr auto std_to_char_array = std::to_array<char>({
         #embed __FILE__
 , '\0'
    });
    static constexpr auto initializer_list = std::initializer_list<char>{
        #embed __FILE__
         , '\0'
 };
```

https://godbolt.org/z/4oj8Tr4d5

([From reddit](https://www.reddit.com/r/cpp/comments/1hxdv17/experimenting_with_embed/))
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsU12PgyoQ_TXjC9lGUao--NCPNbnJfbzvBoEqGwQDY7vdX3-Ddr-aNSSEmYE5c46Hh6AHq1QD7AjsnPAFR-cb4XxuUdukd_LenAy3A9FWOO-VQHMnXr0pgYHgqMjFGeNu2g6kV4IvQRGN5MK1CQQdkUouQq2Fj-sk6I94y69B7j2_A2211ai50R_KE6MDQnqAfbotMc_xmB4CctSCCGcDqvfZE76gIwFlh64TI_fd-hyB_ByjkB8gP6DbopCfYgnkr0ArKI-QHsjnBzRXU68k6br2n39fuy4mgZ4I0BLYKY3bVg7lGWgN-ef1vyH9mKaL0_xG9Jz9gewXrD9RfSef0UVoK64v4jbWRsQ5xM60BdoOTvbO4M75AWj7AbQt3Fv1ny8k28ojO-zYejcRr6TUCOwMtPr9yu12223ZnXAT0NYDbaNOtBVumpTFALTNxnd5zUqgrXqfldcxru3Q3TSO3Tra-loNtE5kk8s6r3mimqzM90VeVjVLxkayuudKlKoS9YXVVb1PWbEvKsEKVdE9T3RDU8rSLK0zxrKc7eqMluXlUihRyFqIDIpUTVybnTHXKc6d6BAW1WSU5uk-MbxXJqwGoFQAPa6LAj3Fc_z1IT9cvLOorPxKPBzwcuVGr1F2TnwTO7z0yxCgSKOy4bsnajSq-ZJUW1SeRw_NznlzJ5ETgmqaDcdoi2GJbG3-Qe0s4VaSZ5eEZPGmeRJY47j0D1li-8f2MnsXMUezxflXgTYKrg39PwAA__-LI0Nn">