bearophile Wrote:
> Kagamin:
>
> > bearophile Wrote:
> >
> > > Most of the things you can do with templates can be done with functions
> > > (even not pure ones!) run at compile-time that are also allowed to use
> > > (and receive/return) a type of compile-time variables of type "type" :-)
>
Kagamin:
> bearophile Wrote:
>
> > Most of the things you can do with templates can be done with functions
> > (even not pure ones!) run at compile-time that are also allowed to use (and
> > receive/return) a type of compile-time variables of type "type" :-) I think
> > this may lead to a lang
bearophile Wrote:
> Most of the things you can do with templates can be done with functions (even
> not pure ones!) run at compile-time that are also allowed to use (and
> receive/return) a type of compile-time variables of type "type" :-) I think
> this may lead to a language that's cleaner th
Always nice to see the inner workings, thanks.
Here a few things that bugged me:
Seeing templates as runtime functions, making the whole instantiation thing
kind of strange :)
Trying to use implicitly deduces parameters for function templates.
Writing Foo(d) iso Foo!(int [][])(d).
--
template Fo
Walter Bright wrote:
> http://www.reddit.com/r/programming/comments/8wgak/compiling_templates/
Nice & informative. Now if there were only such a readable description
of how exceptions work…
—Joel Salomon
Walter Bright:
> http://www.reddit.com/r/programming/comments/8wgak/compiling_templates/
It looks like a quite complex machinery.
>From the article:
>But there is a rule in C++ and D that a template with a specific set of
>arguments can only have one instantiation for the whole program. This mea