Re: Using boost::any

2003-10-02 Thread Angus Leeming
Lars Gullik Bjønnes wrote: > But aren't you using the wrong any_cast here? > Shouldn't you use boost::any_cast? I would love to, but that would mean storing a pointer to a boost::function. > Hmm... there is something I do not understand here. any_cast with a > refernece or a value type will thro

Re: Using boost::any

2003-10-02 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Angus Leeming wrote: > >> Angus Leeming wrote: >>> Lars Gullik Bjønnes wrote: note the member function boost::any:type >>> >>> Bingo! No need for exceptions after all. >>> Many thanks, Lars. >> >> Next iteration. I think that this is ready to conv

Re: Using boost::any

2003-10-02 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Angus Leeming wrote: > >> Angus Leeming wrote: >>> Lars Gullik Bjønnes wrote: note the member function boost::any:type >>> >>> Bingo! No need for exceptions after all. >>> Many thanks, Lars. >> >> Next iteration. I think that this is ready to conv

Re: Using boost::any

2003-10-02 Thread Angus Leeming
Angus Leeming wrote: > Angus Leeming wrote: >> Lars Gullik Bjønnes wrote: >>> note the member function boost::any:type >> >> Bingo! No need for exceptions after all. >> Many thanks, Lars. > > Next iteration. I think that this is ready to convert into InsetExternal > code. Hmmppfff! trying to do

Re: Using boost::any

2003-10-02 Thread Angus Leeming
Lars Gullik Bjønnes wrote: > | Because the code using it does exactly the same as Inset::clone. Just > | passes a pointer around safely. > > But you are not passing it... isn't it a static class variable? The factory function is static, but the transformer itself is not. Each transformer holds a

Re: Using boost::any

2003-10-02 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: >> | Angus Leeming wrote: Lars Gullik Bjxnnes wrote: > note the member function boost::any:type Bingo! No need for exceptions after all. Many thanks, Lars. >>> >> | Next iteration. I think that this is

Re: Using boost::any

2003-10-02 Thread Angus Leeming
Lars Gullik Bjønnes wrote: > | Angus Leeming wrote: >>> Lars Gullik Bjxnnes wrote: note the member function boost::any:type >>> >>> Bingo! No need for exceptions after all. >>> Many thanks, Lars. >> > | Next iteration. I think that this is ready to convert into > | InsetExternal code. However

Re: Using boost::any

2003-10-02 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Angus Leeming wrote: >> Lars Gullik Bjxnnes wrote: >>> note the member function boost::any:type >> >> Bingo! No need for exceptions after all. >> Many thanks, Lars. > | Next iteration. I think that this is ready to convert into InsetExternal | code. Ho

Re: Using boost::any

2003-10-02 Thread Angus Leeming
Angus Leeming wrote: > Lars Gullik Bjønnes wrote: >> note the member function boost::any:type > > Bingo! No need for exceptions after all. > Many thanks, Lars. Next iteration. I think that this is ready to convert into InsetExternal code. However, I think that I'll also use it in the documentati

Re: Using boost::any

2003-10-02 Thread Angus Leeming
Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > > | Attached is a simple sample showing how I could use boost::any to > | implement the transformation stuff in InsetExternal. > > I do not agree with how you use operatesOn. Thanks for the feedback. I'm feeling my way her

Re: Using boost::any

2003-10-02 Thread Angus Leeming
Lars Gullik Bjønnes wrote: > note the member function boost::any:type Bingo! No need for exceptions after all. Many thanks, Lars. -- Angus

Re: Using boost::any

2003-10-02 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Thu, Oct 02, 2003 at 12:48:16PM +0200, Lars Gullik Bjønnes wrote: >> If we all agree that we want to use exceptions, I am all for it. >> But that is up to the rest of you. > | What's the drawback? To use excepitions well is not easy, and it has to be

Re: Using boost::any

2003-10-02 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Attached is a simple sample showing how I could use boost::any to implement | the transformation stuff in InsetExternal. > | I think it results in very elegant code, but the killer is the try,catch | block. The block is needed, so I guess that this mea

Re: Using boost::any

2003-10-02 Thread Andre Poenitz
On Thu, Oct 02, 2003 at 12:48:16PM +0200, Lars Gullik Bjønnes wrote: > If we all agree that we want to use exceptions, I am all for it. > But that is up to the rest of you. What's the drawback? I.e. which of the currently supported compilers don't 'do' exceptions? [I am fine with them btw.] And

Re: Using boost::any

2003-10-02 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Attached is a simple sample showing how I could use boost::any to implement | the transformation stuff in InsetExternal. I do not agree with how you use operatesOn. | template | TransformCommand::ptr_type | getTransformer(Data const