Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2007-11-02 19:05:43


Marco Costalba wrote:
> On 11/2/07, Dean Michael Berris <mikhailberis_at_[hidden]> wrote:
>> On 11/2/07, gchen <chengang31_at_[hidden]> wrote:
>>
>> That is because you need to know what signatures the overload instance
>> will support. In C++, you have no way of modifying a type at runtime
>> -- and that's why what you propose is nearly impossible if not
>> impractical to implement.
>
> I would say it's impossible in C++ ;-)
>

Actually it is possible in c++. You push the overload resolution at
runtime. It will never be as efficient though. With this implementation,
you use the C++ compiler to select the correct overload for you.
Very fast. Without a constrained list of signatures, the compiler
cannot be used to do the selection. You are on your own. You have
to perform the overload resolution by mimicking the way overload
resolution takes place in C++ in your code at runtime.

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk