Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: ADL woes
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 7 Topic 9510 of 9831
Post > Topic >>

Re: ADL woes

by Alberto Ganesh Barbati <AlbertoBarbati@[EMAIL PROTECTED] > Apr 17, 2008 at 04:43 PM

Alberto Ganesh Barbati ha scritto:
> Kimon Hoffmann ha scritto:
> 
>> What I'd like to know is whether there is some way to make HalfWorking 
>> work with fully qualified calls to func() like the one in 
>> cool_algorithm_2(), besides the obvious solution to move HalfWorking 
>> together with the function overload into the default_impl namespace.
> 
> Given that the target function is not defined in namespace default_impl,
> I don't see how you might refer to it with a name fully qualified with
> default_impl::.
> 

Well, of course you could put a using declaration

   using ::func;

in namespace default_impl, but you still need to have the definition of
::foo() visible at the definition point of the algorithm. This would
greatly restrict the genericity of the algorithm.

HTH,

Ganesh

-- 
      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 7 Posts in Topic:
ADL woes
Kimon Hoffmann <kimon.  2008-04-16 15:45:27 
Re: ADL woes
Alberto Ganesh Barbati &l  2008-04-17 03:51:35 
Re: ADL woes
Alberto Ganesh Barbati &l  2008-04-17 16:43:14 
Re: ADL woes
Kimon Hoffmann <kimon.  2008-04-18 15:01:58 
Re: ADL woes
Kimon Hoffmann <kimon.  2008-04-18 15:02:05 
Re: ADL woes
Jiri Palecek <jpalecek  2008-04-19 01:39:31 
Re: ADL woes
Kimon Hoffmann <kimon.  2008-04-19 18:11:06 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 21:59:02 CDT 2008.