Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

built-in C++ operator+= (const int &, int)

$
0
0
class C2666 
{ 
public: operator int const & () const; 
C2666 & operator += (unsigned) const; 
};
void trigger () { C2666 () += 0; }

1>c.cpp(7): error C2666: 'C2666::operator +=' : 2 overloads have similar conversions

1> c.cpp(6): could be 'C2666 &C2666::operator +=(unsigned int) const'

1> or 'built-in C++ operator+=(const int &, int)'

1> while trying to match the argument list '(C2666, int)'

I beg your pardon?  What is 'built-in C++ operator+=(const int &, int)'??


Christopher Yeleighton


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>