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

    <tr>
        <th>Summary</th>
        <td>
            libc++ - <future> missing a swap function template.
        </td>
    </tr>

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

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

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

<pre>
    It seems libc++ is missing a swap function template.   

Here's a cut/paste from a cygwin session:
$ cat t.cpp
#include <future>

int main(void)
{
        void (*fp02)(std::promise<void>&, std::promise<void>&) noexcept
            = std::swap<void>;
}

VogelEd@XLB3502Q4E ~/tests/perenstl
$ clang++ -std=c++11 -c t.cpp

VogelEd@XLB3502Q4E ~/tests/perenstl
$ clang++ -std=c++11 -c -stdlib=libc++ t.cpp
In file included from t.cpp:1:
In file included from /usr/include/c++/v1/future:366:
In file included from /usr/include/c++/v1/system_error:147:
/usr/include/c++/v1/type_traits:4586:68: error: cannot form a reference to
      'void'
    : public integral_constant<bool, __detail::__swappable_with<_Tp&>::value>
                                                                   ^
/usr/include/c++/v1/utility:269:5: note: in instantiation of template class
      'std::__1::__is_swappable<void>' requested here
    __is_swappable<_Tp>::value
    ^
t.cpp:6:13: note: while substituting explicitly-specified template arguments
      into function template 'swap'
            = std::swap<void>;
                   ^
1 error generated.

Visual Studio 2019 also compiles this.

Not an important issue.  Just wanted to report it.

Thank you,

Ed vogel

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1Vcuu4zYM_RpnQySw5Ve88CL3JoNOURQoOii6M2RbdtTKkmtRN5O_L-W8nE7RO4NBDUNRaFIkDw-p2rTn8iOCFWKwoGTdBOyFXpAWBmmt1D1wsCc-Qud0g9JoQDGMiqPYAEAQ7oNwd1l_EJMIWG7JoHEYsA8jtyigm8zgRef-JDU5okONDuKrUcASaDgCbppxvIliqRvlWgF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