<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Overloads of atomic_fetch_meow(atomic<T*>*, ...) are non-conforming"
   href="https://bugs.llvm.org/show_bug.cgi?id=47908">47908</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Overloads of atomic_fetch_meow(atomic<T*>*, ...) are non-conforming
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>11.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>Casey@Carter.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre><atomic> includes overloads:

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
_Tp* 
atomic_fetch_add(volatile atomic<_Tp*>* __o, typename
atomic<_Tp*>::difference_type __op) _NOEXCEPT
{
    return __o->fetch_add(__op);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
_Tp* 
atomic_fetch_add(atomic<_Tp*>* __o, typename atomic<_Tp*>::difference_type
__op) _NOEXCEPT
{
    return __o->fetch_add(__op);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
_Tp*
atomic_fetch_add_explicit(volatile atomic<_Tp*>* __o, typename
atomic<_Tp*>::difference_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_add(__op, __m);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
_Tp*
atomic_fetch_add_explicit(atomic<_Tp*>* __o, typename
atomic<_Tp*>::difference_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_add(__op, __m);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
_Tp*
atomic_fetch_sub(volatile atomic<_Tp*>* __o, typename
atomic<_Tp*>::difference_type __op) _NOEXCEPT
{
    return __o->fetch_sub(__op);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
_Tp*
atomic_fetch_sub(atomic<_Tp*>* __o, typename atomic<_Tp*>::difference_type
__op) _NOEXCEPT
{
    return __o->fetch_sub(__op);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
_Tp*
atomic_fetch_sub_explicit(volatile atomic<_Tp*>* __o, typename
atomic<_Tp*>::difference_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_sub(__op, __m);
}

template <class _Tp>
_LIBCPP_INLINE_VISIBILITY
_Tp*
atomic_fetch_sub_explicit(atomic<_Tp*>* __o, typename
atomic<_Tp*>::difference_type __op, memory_order __m) _NOEXCEPT
{
    return __o->fetch_sub(__op, __m);
}

which don't appear in the Standard. This wouldn't be an issue, except for the
fact that e.g. `atomic_fetch_add<int*>` doesn't name a specialization of the
`atomic_fetch_add` overload that takes `atomic<T*>`, it names a specialization
of the `atomic_fetch_add` overload that takes `atomic<T>` which is
unfortunately constrained to reject argument types that aren't integral and
non-`bool`.

Conforming programs that pass pointer type arguments via explicit template
argument lists to these `atomic_fetch_meow` overloads will fail to compile,
e.g., <a href="https://godbolt.org/z/q7b6Yj">https://godbolt.org/z/q7b6Yj</a>.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>