On Sunday, 16 June 2019 at 15:11:29 UTC, Robert M. Münch wrote:
How does the observerObject Template and function work? I'm
struggling because both use the same name and how is the
template parameter R deduced/where is it coming from? Looks
like it's somehow implicitly deduced.
Eponymous
On 2019-06-17 20:53:28 +, aliak said:
Less typing for one. Otherwise you'd have to write:
auto observer = observerObject!int.observerObject(TestObserver());
Since code is many times more read than written I will never understand
why the syntax is polluted to save some keystrokes, making
On Monday, 17 June 2019 at 18:25:24 UTC, Robert M. Münch wrote:
On 2019-06-16 15:14:37 +, rikki cattermole said:
observerObject is an eponymous template.
What this means (in essence) is the symbol inside the template
block == template block.
Hmm... ok. Is there any reason to have these
On 2019-06-16 15:14:37 +, rikki cattermole said:
observerObject is an eponymous template.
What this means (in essence) is the symbol inside the template block ==
template block.
Hmm... ok. Is there any reason to have these "eponymous templates"? I
don't see any benefit...
--
Robert
How does the observerObject Template and function work? I'm struggling
because both use the same name and how is the template parameter R
deduced/where is it coming from? Looks like it's somehow implicitly
deduced.
class ObserverObject(R, E...){...}
template observerObject(E)
{
On 17/06/2019 3:11 AM, Robert M. Münch wrote:
How does the observerObject Template and function work? I'm struggling
because both use the same name and how is the template parameter R
deduced/where is it coming from? Looks like it's somehow implicitly
deduced.
class ObserverObject(R,