On Tuesday, March 21, 2017 09:27:55 Yuxuan Shui via Digitalmars-d wrote:
> On Tuesday, 21 March 2017 at 01:10:38 UTC, Jonathan M Davis wrote:
> > On Monday, March 20, 2017 22:14:37 Yuxuan Shui via
> >
> > Digitalmars-d wrote:
> >> On Monday, 20 March 2017 at 21:53:47 UTC, Jonathan M Davis
> >>
>
On Tuesday, 21 March 2017 at 01:10:38 UTC, Jonathan M Davis wrote:
On Monday, March 20, 2017 22:14:37 Yuxuan Shui via
Digitalmars-d wrote:
On Monday, 20 March 2017 at 21:53:47 UTC, Jonathan M Davis
wrote:
> [...]
Makes sense...
OK, attempt 2: how about support implicit partial application
On Monday, March 20, 2017 22:14:37 Yuxuan Shui via Digitalmars-d wrote:
> On Monday, 20 March 2017 at 21:53:47 UTC, Jonathan M Davis wrote:
> > On Monday, March 20, 2017 21:37:26 Yuxuan Shui via
> >
> > Digitalmars-d wrote:
> >> [...]
> >
> > auto ref for non-templates would not be quite the same
On Monday, 20 March 2017 at 21:53:47 UTC, Jonathan M Davis wrote:
On Monday, March 20, 2017 21:37:26 Yuxuan Shui via
Digitalmars-d wrote:
[...]
auto ref for non-templates would not be quite the same thing,
and regardless, it wouldn't help any with explictly
instantiating a template that had
On Monday, March 20, 2017 21:37:26 Yuxuan Shui via Digitalmars-d wrote:
> On Monday, 20 March 2017 at 21:34:14 UTC, Yuxuan Shui wrote:
> > On Monday, 20 March 2017 at 21:08:40 UTC, Jonathan M Davis
> >
> > wrote:
> >> [...]
> >
> > This is a bit tedious because it requires you creating a new
> >
On Monday, 20 March 2017 at 21:34:14 UTC, Yuxuan Shui wrote:
On Monday, 20 March 2017 at 21:08:40 UTC, Jonathan M Davis
wrote:
[...]
This is a bit tedious because it requires you creating a new
function.
Maybe we can create a template for that. But still, auto ref
requires us to do things
On Monday, 20 March 2017 at 21:08:40 UTC, Jonathan M Davis wrote:
On Monday, March 20, 2017 13:20:52 Jonathan M Davis via
Digitalmars-d wrote:
So, yes, this particular restriction can be annoying, but
there is a good reason for the restriction (though the error
message _is_ pretty bad), and I
On Monday, March 20, 2017 13:20:52 Jonathan M Davis via Digitalmars-d wrote:
> So, yes, this particular restriction can be annoying, but there is a good
> reason for the restriction (though the error message _is_ pretty bad), and
> I have no idea how we would fix the problem.
After thinking about
On Monday, March 20, 2017 19:49:03 Yuxuan Shui via Digitalmars-d wrote:
> An auto ref function template should behave like a normal
> function template, but it doesn't.
>
> You can fully instantiate a function template by specifying all
> of its template parameters, but you can't do that with auto
On Monday, 20 March 2017 at 19:49:03 UTC, Yuxuan Shui wrote:
And you can't do that with an auto ref template, which makes
them quite annoying.
BTW, the error message you get when you try to do this, is not
very helpful:
'auto' can only be used as part of 'auto ref' for template
function
An auto ref function template should behave like a normal
function template, but it doesn't.
You can fully instantiate a function template by specifying all
of its template parameters, but you can't do that with auto ref
templates. The only way to instantiate an auto ref template is to
call
11 matches
Mail list logo