On Wed, Oct 08, 2003 at 02:55:37PM +, Angus Leeming wrote:
> Andre Poenitz wrote:
> > Is that to be expected?
>
> Here I have
> $ sed -n '175p' boost/boost/any.hpp
> throw_exception(bad_any_cast());
>
> I think that you should 'cvs -q up boost' and the problem will be
> resolved.
Andre Poenitz wrote:
> Is that to be expected?
Here I have
$ sed -n '175p' boost/boost/any.hpp
throw_exception(bad_any_cast());
I think that you should 'cvs -q up boost' and the problem will be
resolved.
--
Angus
devel/boost/boost/any.hpp: In function `ValueType
| boost::any_cast(const boost::any&) [with ValueType =
|lyx::external::RotationCommandFactory]':
| ../../../lyx-devel/src/insets/ExternalTransforms.C:319: instantiated
| from `void lyx::externalextractIt(const boost::any&,
el/src/insets/../ -I../../../lyx-devel/boost
-I/usr/X11R6/include -O -fno-exceptions -W -Wall -c
../../../lyx-devel/src/insets/ExternalTransforms.C -MT
ExternalTransforms.lo -MD -MP -MF .deps/ExternalTransforms.TPlo
../../../lyx-devel/boost/boost/any.hpp: In function `ValueType
boost::any_cast(cons
Angus Leeming <[EMAIL PROTECTED]> writes:
| Angus Leeming wrote:
>> Lars, could I get you to apply this/contact the boost list as you
>> see fit?
>
| Thanks for doing that Lars. I see that the change has been committed
| and have noted the comment about including the appropriate header.
>
| I'll
Angus Leeming wrote:
> Lars, could I get you to apply this/contact the boost list as you
> see fit?
Thanks for doing that Lars. I see that the change has been committed
and have noted the comment about including the appropriate header.
I'll commit the changes to the lyx tree.
--
Angus
As discussed.
Lars, could I get you to apply this/contact the boost list as you see
fit?
I note that there are a total of 34 throws in the boost libs
$ grep -r 'throw ' boost | grep -c -v ChangeLog
--
AngusIndex: boost/ChangeLog
=
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
nks, Lars.
>>
>> Next iteration. I think that this is ready to convert into InsetExternal
>> code.
>
| Hmmppfff! trying to do so, I get this
>
| ../../../boost/boost/any.hpp: In function `ValueType boost::any_cast(const
|boost::any&) [with ValueType = lyx::external:
nks, Lars.
>>
>> Next iteration. I think that this is ready to convert into InsetExternal
>> code.
>
| Hmmppfff! trying to do so, I get this
>
| ../../../boost/boost/any.hpp: In function `ValueType boost::any_cast(const
|boost::any&) [with ValueType = lyx::external:
InsetExternal
> code.
Hmmppfff! trying to do so, I get this
../../../boost/boost/any.hpp: In function `ValueType boost::any_cast(const
boost::any&) [with ValueType = lyx::external::RotationCommandFactory]':
../../../src/insets/ExternalTemplate.h:54: instantiated from `void
ly
transformer holds a copy of the data it is to transform. I couldn't make
the thing stateless before because I needed the front(), back() member
functions to have the same signature.
Now that you have shown me how to use boost::any that could change.
string const RotationLatexComma
ics.
ok
| I can do that by storing the factory functions that generate the
| transformers available to a particular output target in a vector
| 'somehow'. The problem is the 'somehow'. The different factory functions
| have different signatures, taking RotationData, ResizeData etc.
very well.
| This is where boost::any comes to the rescue.
right.
--
Lgb
which alters the primary command itself,
as for \includegraphics.
I can do that by storing the factory functions that generate the
transformers available to a particular output target in a vector
'somehow'. The problem is the 'somehow'. The different factory functions
have different signatures, taking RotationData, ResizeData etc.
This is where boost::any comes to the rescue.
--
Angus
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
sizeLatexOption : public TransformOption {
static ptr_type factory(ResizeData const & data);
private:
ResizeLatexOption(ResizeData const & data_) : data(data_) {}
virtual string const option() const;
ResizeData data;
};
struct TransformStore
{
TransformStore() {}
template
TransformS
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 feed
Lars Gullik Bjønnes wrote:
> note the member function boost::any:type
Bingo! No need for exceptions after all.
Many thanks, Lars.
--
Angus
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
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
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
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
| getTransforme
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 means I cannot use the
appropach within lyx?
Shame
23 matches
Mail list logo