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


Groups > comp.lang.c++ > #10329

Re: C++11 lambdas

From Miles Bader <miles@gnu.org>
Newsgroups comp.lang.c++
Subject Re: C++11 lambdas
Date 2011-09-20 16:57 +0900
Organization NEC Electronics
Message-ID <buo4o071w9a.fsf@dhlpc061.dev.necel.com> (permalink)
References <835cd0b9-b3e1-4aa2-bf61-f71760b8fb04@fi7g2000vbb.googlegroups.com> <4e78359c$0$4384$7b1e8fa0@news.nbl.fi>

Show all headers | View raw


Juha Nieminen <nospam@thanks.invalid> writes:
>   2) Why can't the compiler "auto-templatize" a function that takes a
> parameter of type 'auto'? (In other words, implicitly make it a template
> function where the parameter marked as 'auto' is a templated type.)

I seem to recall that this was considered, along with the same thing
("implicit templates") for ordinary functions, and came sort of close to
getting in, but was decided to be just a bit too much for the current
standard.  Soooo maybe in a future standard.

There's some discussion of it here (search for "polymorphic lambdas"):

http://channel9.msdn.com/Shows/Going+Deep/Herb-Sutter-C-Questions-and-Answers

-Miles

-- 
Omochiroi!

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

C++11 lambdas Jerry <jerry.jeremiah@gmail.com> - 2011-09-19 15:40 -0700
  Re: C++11 lambdas Lucien Coffe <lcof@nospam.invalid> - 2011-09-20 06:38 +0000
  Re: C++11 lambdas Juha Nieminen <nospam@thanks.invalid> - 2011-09-20 06:41 +0000
    Re: C++11 lambdas Miles Bader <miles@gnu.org> - 2011-09-20 16:57 +0900
    Re: C++11 lambdas Noah Roberts <roberts.noah@gmail.com> - 2011-09-20 08:23 -0700
      Re: C++11 lambdas Juha Nieminen <nospam@thanks.invalid> - 2011-09-21 07:14 +0000
        Re: C++11 lambdas Victor Bazarov <v.bazarov@comcast.invalid> - 2011-09-21 18:25 -0400
  Re: C++11 lambdas ChuanQi Tan <chuanqi.tan@gmail.com> - 2011-10-04 22:04 -0700
    Re: C++11 lambdas Jerry <jerry.jeremiah@gmail.com> - 2011-10-23 15:21 -0700
      Re: C++11 lambdas Miles Bader <miles@gnu.org> - 2011-10-24 17:27 +0900

csiph-web