LWN.net Logo

Sometimes C++ is faster

Sometimes C++ is faster

Posted Jun 18, 2008 21:51 UTC (Wed) by ncm (subscriber, #165)
In reply to: Sometimes C++ is faster by flewellyn
Parent article: Converting GCC to C++

Does CL support overloading?  Or would you need to give the functions DECLAREd with different
argument types different names?


(Log in to post comments)

Sometimes C++ is faster

Posted Jun 18, 2008 21:58 UTC (Wed) by flewellyn (subscriber, #5047) [Link]

You would DECLARE the types of the arguments in the calling function.  Then (in some
implementations, anyway) the compiler would see that the arguments to the generic function are
of a particular type, and do the dispatch at compile-time.  No changes to the called GF
required.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds