texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] "Overloading ambiguity" error in compiling 1.0.7.2


From: Kostas Oikonomou
Subject: Re: [Texmacs-dev] "Overloading ambiguity" error in compiling 1.0.7.2
Date: Fri, 19 Jun 2009 14:49:38 -0400
User-agent: Thunderbird 2.0.0.17 (X11/20081010)

Joris,

Thanks for the suggestion.   I changed the fragment

box
action_box (path ip, box b, tree filter, command cmd, bool ch) {
return tm_new<action_box_rep> (ip, b, filter, cmd, ch, decorate ());
}

to

box
action_box (path ip, box b, tree filter, command cmd, bool ch) {
return tm_new<action_box_rep> ((const list<int>&) ip, b, filter, cmd, ch, decorate ());
}

but the error remains the same. Unfortunately my knowledge of C++ is tiny, and I don't know how to add additional tm_new forms in fast_alloc.hpp as you suggest.

If you can give an example, I will try.

                                Kostas

On Thu, Jun 18, 2009 at 11:56:38AM -0400, Kostas Oikonomou wrote:
> "./Typeset/Boxes/Modifier/change_boxes.cpp", line 603:
> Error: Overloading ambiguity between
>
> tm_new<action_box_rep, list<int>, box, tree, command, bool,
> list<int>>(list<int>&, const box&, tree&, command&, bool&,
> list<int>&)
>
> tm_new<action_box_rep, list<int>, box, tree, command, bool,
> list<int>>(const list<int>&, const box&, const tree&, const
> command&, const bool&, const list<int>&)

Very annoying. I hope this is the only occurrence of this problem. This is due to f****** C++; I did not find a clean way to redefine the new operator for TeXmacs objects only (avoiding interaction with Qt).
I had to explicitly list all cases of tm_new in fast_alloc.hpp.

You may try to disambiguate by casting the first argument to
const list<int>& and see if that works. You may also try to
add additional tm_new forms in fast_alloc.hpp.
Please play a bit and tell me what works for you.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]