Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libcxx/docs/ReleaseNotes/21.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Deprecations and Removals
- libc++ no longer adds ``constexpr`` to ``std::hash<std::vector<bool, A>>::operator()``, as the ``constexpr`` addition
since C++20 was an unintended extension.

- TODO: The non-conforming extension ``packaged_task::result_type`` has been removed in LLVM 21.
- The non-conforming extension ``packaged_task::result_type`` has been removed in LLVM 21.

Potentially breaking changes
----------------------------
Expand Down
8 changes: 0 additions & 8 deletions libcxx/include/future
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,6 @@ template <class R, class... ArgTypes>
class packaged_task<R(ArgTypes...)>
{
public:
typedef R result_type; // extension

// construction and destruction
packaged_task() noexcept;
template <class F>
Expand Down Expand Up @@ -1605,9 +1603,6 @@ inline _Rp __packaged_task_function<_Rp(_ArgTypes...)>::operator()(_ArgTypes...

template <class _Rp, class... _ArgTypes>
class packaged_task<_Rp(_ArgTypes...)> {
public:
using result_type _LIBCPP_DEPRECATED = _Rp; // extension

private:
__packaged_task_function<_Rp(_ArgTypes...)> __f_;
promise<_Rp> __p_;
Expand Down Expand Up @@ -1699,9 +1694,6 @@ void packaged_task<_Rp(_ArgTypes...)>::reset() {

template <class... _ArgTypes>
class packaged_task<void(_ArgTypes...)> {
public:
using result_type _LIBCPP_DEPRECATED = void; // extension

private:
__packaged_task_function<void(_ArgTypes...)> __f_;
promise<void> __p_;
Expand Down
34 changes: 0 additions & 34 deletions libcxx/test/libcxx/thread/futures/futures.task/types.pass.cpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@

// <future>

// template<class R, class... ArgTypes>
// class packaged_task<R(ArgTypes...)>
// {
// public:
// typedef R result_type; // extension

// This libc++ extension is deprecated. See https://github.com/llvm/llvm-project/issues/112856.
// Verify that the non-conforming extension packaged_task::result_type is removed.
// See https://github.com/llvm/llvm-project/issues/112856.

#include <future>
#include <type_traits>

struct A {};

using RA = std::packaged_task<A(int, char)>::result_type; // expected-warning {{'result_type' is deprecated}}
using RV = std::packaged_task<void(int, char)>::result_type; // expected-warning {{'result_type' is deprecated}}
using RA = std::packaged_task<A(int, char)>::result_type; // expected-error {{no type named 'result_type'}}
using RV = std::packaged_task<void(int, char)>::result_type; // expected-error {{no type named 'result_type'}}
Loading