Subject: Arrest reports Updated

From: Felons Neat you <[email-masked]>
Date: Wed, 02 Jul 2014 09:36:42 -0700

Hi Krb-wg-archive,

Think of someone you would like to know more about...

1.) put their name in http://www.towopt.com/your-file/324526345-screening.you
2.) See their full report.

---------------
---------------
You want to know what your record looks like:
[email-masked] - http://www.towopt.com/your-file/324526345-screening.you

They say, "What you don't know won't hurt you." But can it?

Your Local Crime Report
Violent crime jumps 18 percent in 2011, first rise in nearly 20 years.

Violent crimes unexpectedly jumped 18 percent last year, the first rise in nearly 20 years, and property crimes rose for first time in a decade. But academic experts said the new government data fall short of signaling a reversal of the long decline in crime.

- http://www.towopt.com/your-file/324526345-screening.you

Brought to you from:
LLG-Database - Lookup - 1007 Main
Street, Eudora, KS, 66025 Exit/messages here- http://www.towopt.com/y7.hhy-A

A retired police chief says the growing number of assaults last year may reflect a need by law enforcement to spend more time and attention on what's happening in the nation's schools.

With C++14 function return type deduction, that should work.

In C++11, you could define another lambda (which can deduce the return type), rather than a function (which can't):

auto makeLambda = [](double ratio) {
    return [=](double value) {return value * ratio;};
};
As noted in the comments, this could be further wrapped, if you particularly want a function:

auto makeLambdaFn(double ratio) -> decltype(makeLambda(ratio)) {
    return makeLambda(ratio);
}
share|improve this answer
edited Jun 26 at 14:53

Casey
16k21942	
answered Jun 26 at 13:25

Mike Seymour
121k8136259
2	  	
You forgot to make the inner lambda capturing.   Konrad Rudolph Jun 26 at 13:33
  	  	
@KonradRudolph: So I did, thanks.   Mike Seymour Jun 26 at 13:34
1	  	
The example works in idone but failed in vc2013. VC2013 is still not c++11 enough.   user1899020 Jun 26 at 13:37
3	  	
If you want a function rather than a lambda, wrap the lambda in a function again: auto func(double x)->decltype(makeLambda(x)){return makeLambda(x);}

Thanks