Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling SymbolicC++ - operator , is ambiguous

I'm trying to compile the SymbolicC++ library in VC++ 2010 Express (there is special VS project in the distribution), but it gives a lot of errors in system headers, related to operator,. For example:

1>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\xlocmon(410): error C2593: 'operator ,' is ambiguous

For this code in a system header:

if (_Str[0] < _E0 || _E0 + 9 < _Str[0])
    _Str2 += '-', ++_Off;

Why? How to compile it?

like image 825
artem Avatar asked Mar 21 '26 20:03

artem


1 Answers

Apparently, SymbolicC++ has overloaded operator, in such a manner that a downstream include has been affected.

You should reorder your includes such that SymbolicC++'s include comes last:

#include <iostream>
#include <vector>

// don't want to monkey with our other headers
#include "symbolicc++.h"

This isn't to say the code in the <xlocmon> header isn't suspect, that sort of abuseusage of the comma operator is asking for trouble.

like image 129
user7116 Avatar answered Mar 23 '26 11:03

user7116



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!