POV-Ray : Newsgroups : povray.off-topic : To anyone who has worked with boost : Re: To anyone who has worked with boost Server Time
28 Jul 2024 20:28:48 EDT (-0400)
  Re: To anyone who has worked with boost  
From: Anthony D  Baye
Date: 17 Feb 2013 11:55:00
Message: <web.51210b3e6e8f7c38d97ee2b90@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Anthony D. Baye <Sha### [at] spamnomorehotmailcom> wrote:
> > Though, I also don't recall my c++ instructor ever mentioning class-type
> > functors.  (I feel embarrassed now)
>
> structs and classes are the same thing in C++. Their only difference is
> the default visibility of members, when no visibility keyword is specified.
>
> --
>                                                           - Warp

I realize that. Classes are default private, structs are default public.

> > Still, it seems strange to me to bind a signal to a struct rather than to the
> > member function thereof.  After all, when the signal is raised/emitted, it is
> > the function that is called, not the containing object.
>
> You do understand what the idea with functors is?

apparently not.

When I learned about overloaded operators, I thought -- And it seems I was
wrong, or misheard -- that the parentheses were one of a few operators that it
didn't work with.  I had no idea they could even be overloaded.

The only mention of function objects in either of my textbooks was a brief
mention in relation to sorting, and an entry in a glossary.

*goes to look stuff up online.*

A.D.B.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.