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

    <tr>
        <th>Summary</th>
        <td>
            Incompatibility between clang++ 14 and libstdc++ 12
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    This sample code:

```
#include <iomanip>
#include <iostream>

int main(int argc, char **argv) {
        std::tm tm = {};
        std::stringstream ss("2022-03-18 01:02:03");
        ss >>std::get_time(&tm, "%Y-%m-%d %H:%M:%S");
        std::cout << std::asctime(&tm);
}
```

works perfectly when built with gcc 12.0, or when built with clang 14 using libc++ or libstdc++ versions prior to 12.0 -- but when using clang with libstdc++ 12.0 (20220313 snapshot), it results in

```
In file included from test.cc:1:
In file included from /usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/12.0.0/../../../../include/c++/12.0.0/iomanip:43:
In file included from /usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/12.0.0/../../../../include/c++/12.0.0/locale:41:
In file included from /usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/locale_facets_nonio.h:2069:
/usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/locale_facets_nonio.tcc:1477:18: error: reference to non-static member function must be called
      if ((void*)(this->*(&time_get::do_get)) == (void*)(&time_get::do_get))
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/12.0.0/../../../../include/c++/12.0.0/iomanip:433:20: note: in instantiation of member function 'std::time_get<char>::get' requested here
              __mg.get(_Iter(__is.rdbuf()), _Iter(), __is,
                   ^
test.cc:7:5: note: in instantiation of function template specialization 'std::operator>><char, std::char_traits<char>>' requested here
        ss >>std::get_time(&tm, "%Y-%m-%d %H:%M:%S");
           ^
1 error generated.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNFsly7Cbwa5gLJZUEWmYOOngZ1_Mhp-SS0xRCSCJBMA_Q-DlfnwbNZo-dd0kqVlENopum96Y13Wvz2ygddmzaK4G56QSidyh7RNkJVtlxLL-ESs3V3AmM6IM0E9Nyj-j2Y6zzVrDpgo5Qao8nJjUi67BkduCIPGA-MosRAR53sHVAZINRfb8cwcfP-S6IR-_8hGEg-hhp6kdEP6MEEaQeFkGwc3ApIoRkhCQZTfI1znIgykgAFDBw7S0vh4MKdHtmOgi_83ISkVvlpyB_PFz-ngCYAuhgp_wW6En5yzL9-tkFJ77czD5YDsZlkzn-9q4Lg6D5h16K8MXYPx3eC9sL7tUrfhmFxu0slccv0o944BznJM2C9MbeoLliesB5gWcHFsRKtuCnexiBGP5AwNPGQVgnjYbLrASkN5EvThLg5xfGC5OFZ2T_lkOkBxWDZzKaU-w027vR-KAuyCc9tsLNyjsMkfN5fD5r3EuI5GMYdri3BmJFOJ9yDsbMz-H9MSUiT7OzANsQoE9pCgAkrQqYwV4Af6yrXVUkZi80BH9n5YElSur5RzLoGfBBk2DT5ew7cLwMVkfFrw-cs-muoF9YTGU4U6FMFF_ZmK307izsrmdceLfTRkuTjiA2yarNpdJ9TTn9ErFFXYdpDQALa40NCyt6YYXmIiQbkCfOMy85nsTUCov7WUPRMBpPs_O4hcrOlBLdddmRPY4lZX0wsot1FxJt7aEbJKHahY1YcKD07KDeLbWoM3EdSDeh_MYK_I7FPx56W_jOHyq3qP63x__u2-uEpjHoguu08SF7IFdggNu0lyz6yvQ37kOkvvS8s1EfQq-MLenYjIAMIuL7DGUOcm-EyPjIzrvdNKSRer179sKGeSddart27qPjNsdqe0KffoEK5k98t3gv4i51NoRs-TNtz2p6Ac8P5gV2e8ElU_IvdqM--Mcybxa9tycjkKtGGTZ23rKQUVc22v7MOv95f782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