Questions tagged [ambiguous]

An ambiguous call is a situation in which the compiler cannot deduce which version of a function or method to use from the given parameter types. This tag should not be confused with the [ambiguity] tag.

An ambiguous call occurs when the parameters can be converted in many ways such that they fit more than one overload of a function. For example:

void f(float f)
{

}

void f(double d)
{

}

Passing an int value to this function will cause an ambiguous call compiler error, because int can be converted both to float and to double while the compiler is not able to choose the overloaded version of function uniquely.

612 questions
0
votes
1 answer

Ambiguous redirect error when using cat with regex

I have a dir with files : X, A_1, A_2, A_3, etc.. I want to append X to A_1, A_2,A_3,.. and write to A_1,A_2,A_3,... That is : cat X >> A_1, cat X >> A2, cat X >> A3 When I do cat X >> A_* I get -bash: A_*: ambiguous redirect What am I doing…
user196711
  • 311
  • 5
  • 17
0
votes
1 answer

BC30554: 'xxxxDBDataContext' is ambiguous

I'm working on a VB.net project in VS 2012 and I'm getting the below error message. Error Details C:\xxx\xxxApp\xxxApplication.aspx(51): error BC30554: 'xxxxDBDataContext' is ambiguous. Error Source System.Web Here is the screenshot of the…
Julu
  • 11
  • 2
0
votes
1 answer

C++ Diamond Inheritance - Share variables with another non base class

This is my first post on stackoverflow so be gentle :) I have standard diamond problem but I'd managed to sort it out. class Control { public: bool Focused; }; class Caption : public virtual Control { public: string Text; …
Lavi
  • 13
  • 2
0
votes
1 answer

Ambiguous reference between 'Microsoft.Xna.Framework.Color' & 'System.Drawing'

I think this is a simple question to answer, but I still can't figure out a way to get past it. Basically, what I wanted, was to use a Bitmap object in my Xna game. So I went ahead and added System.Drawing as an assembly reference. This worked out…
Neophyte
  • 55
  • 6
0
votes
3 answers

Why does the compiler accept an ambiguous variables definitions?

I have such pretty little code: //example1 namespace { int a; } int a; main() { a++; return 0; } Of course, g++ 4.6.1 compiler can't compile it and outputs an error: ./temp.cpp: In function ‘int main()’: ./temp.cpp:10:5: error:…
Lucky Man
  • 1,488
  • 3
  • 19
  • 41
0
votes
1 answer

References Ambiguous (Depending on project location)

I have a very unusual problem. My project files for Visual Basic are in: C:\VB.Net\Projects When they are here I have the following problems: In an attempt to start playing around with the references I copy / pasted the project folder to my…
Alex
  • 4,821
  • 16
  • 65
  • 106
0
votes
1 answer

Hibernate Criteria setMaxResults with Oracle 11G giving org.hibernate.exception.SQLGrammarException: ORA-00918: column ambiguously defined

We are using Hibernate 4.0 with JBoss 7 against an Oracle 11G database. The java pojo class has these two properties (in addition to others). Please note that the SalesPerson class has a SalesPersonId, a composite key that persists to the…
rstelow
  • 1
  • 1
  • 5
0
votes
2 answers

Unittest inherit from target (SUT) with Dispose

I have found that it's significant easier to test a class if you inherit from it. consider this seudo example: public class Bizz { public void Do() { var obj = ExtenOutOfTest(); someList.Add(obj); } protected…
Jens Kloster
  • 11,099
  • 5
  • 40
  • 54
0
votes
2 answers

Import specific method signature in Scala

Is there a manner to import a specific method signature? def test() { lazy val log = LoggerFactory.getLogger("AndroidProxy") import log.{error, debug, info, trace} trace("This is a test") trace "This is also" // <- This line will not…
Hamy
  • 20,662
  • 15
  • 74
  • 102
0
votes
1 answer

Eclipse Indigo running on Java 7 does not show ambiguous references to methods

I have an application that used to run on Java 1.5. It compiled and ran well. Recently, I've decided to migrate to Java 1.7. When I compile the code with Maven (I updated the Java version in the pom.xml), it displays several compilation errors,…
Khoa Nghiem
  • 315
  • 1
  • 18
0
votes
2 answers

Preserving type across cascading insertion operation

I am trying to create a thin wrapper over an ostringstream instance which delegates all insertion operations to the enclosed ostringstream instance. The idea is to preserve type when doing cascading insertion operations. Normally the resulting…
0
votes
2 answers

Ambiguous layout on almost empty UIView for iPad

I'm trng to design a screen for iPad using interface builder. I have an empty view and I added an UIImageView as a wallpaper with 4 constraints: Leading Space to superview = 0 Trailing Space to superview = 0; Top Space to superview = 0; Bottom Space…
Chorche
  • 403
  • 4
  • 16
0
votes
3 answers

Ambiguous column query

I'm getting the "ambiguous column" error when running this query, but I'm having a hard time finding the cause: select bobooks.ID request, bobooks.TITLE, bobooks.AUTHOR, bogenres.NAME genre, bobooks.OWNER,…
Raúl Núñez Cuevas
  • 838
  • 4
  • 10
  • 14
0
votes
1 answer

Use of overloaded operator '>>' is ambiguous (with operand types 'istream' (aka 'basic_istream') and 'MyIncreEx')

Here is the code and I don't seem to find what's wrong with it; I need to overload the << and >> operators, but I get the following error: Use of overloaded operator '>>' is ambiguous (with operand types 'istream' (aka 'basic_istream') and…
EasyQuestions
  • 327
  • 1
  • 10
  • 23
0
votes
1 answer

Reference to 'move' is ambiguous

In this particular part of code Xcode finds the following error: Reference to 'move' is ambiguous. Additionally, it says that: enumeration value 'move' not handled in switch; which is a nonsense since the class with that value is…
user1563544
  • 379
  • 3
  • 17