On Wed, Dec 03, 2014 at 02:11:54AM +0000, bearophile via Digitalmars-d wrote:
> sdvcn:
> 
> >void ac(int aa)
> >{
> >}
> >
> >void ac(void *a2)
> >{
> >}
> >
> >int main(string[] argv)
> >{
> >auto v = &ac;  //<--- who address
> >}
> >
> >
> >who get "void ac(int aa)" address ?
> 
> This code:
> 
> 
> void foo(int) {}
> void foo(void*) {}
> 
> void main() {
>     auto pfoo = &foo;
> }
> 
> 
> Gives:
> 
> test.d(5,17): Error: cannot infer type from overloaded function symbol & foo
[...]

How do you take the address of specific overload, though?


T

-- 
Arise, you prisoners of Windows
Arise, you slaves of Redmond, Wash,
The day and hour soon are coming
When all the IT folks say "Gosh!"
It isn't from a clever lawsuit
That Windowsland will finally fall,
But thousands writing open source code
Like mice who nibble through a wall.
-- The Linux-nationale by Greg Baker

Reply via email to