Implement LWG#2407: 'packaged_task(allocator_arg_t, const Allocator&, F&&) should neither be constrained nor explicit'

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@241068 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow 2015-06-30 14:16:49 +00:00
parent abadb458d0
commit 07546f3b93
2 changed files with 3 additions and 3 deletions

View File

@ -329,7 +329,7 @@ public:
template <class F> template <class F>
explicit packaged_task(F&& f); explicit packaged_task(F&& f);
template <class F, class Allocator> template <class F, class Allocator>
explicit packaged_task(allocator_arg_t, const Allocator& a, F&& f); packaged_task(allocator_arg_t, const Allocator& a, F&& f);
~packaged_task(); ~packaged_task();
// no copy // no copy
@ -2042,7 +2042,7 @@ public:
>::type >::type
> >
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
explicit packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f) packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f)
: __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)), : __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)),
__p_(allocator_arg, __a) {} __p_(allocator_arg, __a) {}
// ~packaged_task() = default; // ~packaged_task() = default;

View File

@ -11,7 +11,7 @@
// class packaged_task<R(ArgTypes...)> // class packaged_task<R(ArgTypes...)>
// template <class F, class Allocator> // template <class F, class Allocator>
// explicit packaged_task(allocator_arg_t, const Allocator& a, F&& f); // packaged_task(allocator_arg_t, const Allocator& a, F&& f);
// These constructors shall not participate in overload resolution if // These constructors shall not participate in overload resolution if
// decay<F>::type is the same type as std::packaged_task<R(ArgTypes...)>. // decay<F>::type is the same type as std::packaged_task<R(ArgTypes...)>.