2575. [fund.ts.v2] experimental::function::assign should be removed

Section: 99 [fund.ts.v2::func.wrap.func] Status: TS Submitter: Tim Song Opened: 2015-12-20 Last modified: 2017-07-30

Priority: 0

View all other issues in [fund.ts.v2::func.wrap.func].

View all issues with TS status.

Discussion:

Addresses: fund.ts.v2

Following the lead of LWG 2385, the assign(F&&, const A&) member function template in std::experimental::function makes no sense (it causes undefined behavior unless the allocator passed compares equal to the one already used by *this) and should be removed.

[2016-02, Issues Telecon]

P0; move to Tentatively Ready.

Proposed resolution:

This wording is relative to N4562.

  1. Edit 99 [fund.ts.v2::func.wrap.func], class template function synopsis, as indicated:

    namespace std {
      namespace experimental {
      inline namespace fundamentals_v2 {
        […]
        template<class R, class... ArgTypes>
        class function<R(ArgTypes...)> {
        public:
          […]
          void swap(function&);
          template<class F, class A> void assign(F&&, const A&);
          […]
        };
        […]
      } // namespace fundamentals_v2
      } // namespace experimental
      […]
    } // namespace std