Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c++ > #714

Semantics of std::function's constructors

From Roman Perepelitsa <Roman.Perepelitsa@googlemail.com>
Newsgroups comp.std.c++
Subject Semantics of std::function's constructors
Date 2014-03-19 23:13 -0700
Organization unknown
Message-ID <c27a0fad-a26d-4deb-bfd3-7d6de995d4b8@googlegroups.com> (permalink)

Show all headers | View raw


Both C++11 and the C++14 draft seem to be missing semantics
of several std::function's constructors.

[func.wrap.func]:

// 20.9.11.2.1, construct/copy/destroy:
function() noexcept;
function(nullptr_t) noexcept;
function(const function&);
function(function&&);
template<class F> function(F);
template<class A> function(allocator_arg_t, const A&) noexcept;
...

20.9.11.2.1 function construct/copy/destroy [func.wrap.func.con]
defines semantics for the constructors with allocator_arg_t as
the first parameter but not, for example, template<class F> function(F).

Is that an oversight or am I missing something?

I'm trying to understand whether template<class F> function(F) is
required to participate in overload resolution if and only if F is
Callable for argument types ArgTypes and return type R.

Roman Perepelitsa.


--
[ comp.std.c++ is moderated.  To submit articles, try posting with your ]
[ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]

Back to comp.std.c++ | Previous | NextNext in thread | Find similar


Thread

Semantics of std::function's constructors Roman Perepelitsa <Roman.Perepelitsa@googlemail.com> - 2014-03-19 23:13 -0700
  Re: Semantics of std::function's constructors Daniel Krügler <daniel.kruegler@googlemail.com> - 2014-03-21 13:11 -0700

csiph-web