473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

gcc error for Name lookup. - Item 32 exception C++

Hi,

While understanding name lookup using item 32 of EC++ ( Sutter ), i
found error
from gcc bit unclear. It will be great if anyone can help me.

In short - compiler complains about reference while there is no
reference in signature.

Code
-----------------------------------------------------
namespace A{
class X{};
void f(X);
}

namespace B{
void f( A::X ) {}
void g( A::X param)
{
f(param);
}
}

int main()
{
A::X xc;
B::g(xc);
}
----------------------------------------
lookup.cpp: In function `void B::g(A::X)':
lookup.cpp:10: error: call of overloaded `f(A::X&)' is ambiguous
<----------- ??? HOW?
lookup.cpp:7: error: candidates are: void B::f(A::X)
lookup.cpp:3: error: void A::f(A::X)

so the error is consistent according to lookup rules, but I am
surprised at 2nd line
of error. ( gcc - 3.3.1 on Sun)

WHy it shows f(A::X&) ? -- is by reference understood from the code or
something else ?

thanks
Ketan

Jan 29 '06 #1
0 1378

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | last post by:
I have gotten the following error in trying to get totals to come out on a footer. Server Error in '/test' Application....
2
by: James Wallace | last post by:
I hope that someone can help me out there with this problem. I get an itermittant problem with our web page that occurs about once every 10 to 15 days where the only way to fix the problem is to...
0
by: JSantora | last post by:
Essentially, InsertAT is broken! For the past couple of hours, I've been getting this "Parameter name: '-2147483550' is not a valid value for 'index'." error. Apparently, its caused by having...
1
by: RSH | last post by:
Hi, I am deep into creating a VB .Net application that basically creates SQL Server versions of our Access databases and copies over all the data. I Extracted the VB DTS script and brought it...
0
by: Janning Vygen | last post by:
Hi, i have a question about how to handle postgresql constraint errors in the client app. I found some mails in the archive about it, too. But i have still so many questions about how to do it,...
3
by: Trez | last post by:
Hey guys, Am new at using ASP.Net. am having some problems updating my SQL DB. whenever i try i get this Error. Can someone help me? Incorrect syntax near 'nvarchar'. Description: An unhandled...
2
by: arun1985 | last post by:
In the project i am using i am having the following code and when i upload it to the server.Its givig me the following error in the global.cs file. Server Error in '/' Application. ...
1
by: morrisqueto | last post by:
Hello, One of my websites just started sending a new rare error. The site has been working for almost 2 years without trouble, but today morning started giving away this error in all my views. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.