>'+' operator is already overloaded to sum two memory addresses in Flexus. There is no '+' in my flexus 4.0. If you mean types.hpp, there are '+=' , '-=' , '==' , '=' , '<'
// Naderan *Mahmood; ----- Original Message ---- From: Onur Koçberber <[email protected]> To: simflex <[email protected]> Sent: Fri, April 8, 2011 3:21:34 AM Subject: Re: Adding two VirtualMemoryAddress variables Dear Mahmood, '+' operator is already overloaded to sum two memory addresses in Flexus. Please do not overload this operator. If you need any other functionality than this, you can define your own operator. Regards, Onur ________________________________________ From: Mahmood Naderan [[email protected]] Sent: Saturday, March 12, 2011 4:05 PM To: simflex Subject: Adding two VirtualMemoryAddress variables Hi, I have defined an overloaded '+' operator in types.hpp like this: const MemoryAddress_& operator+ (underlying_type const & left) const { MemoryAddress_ result = *this; result += left; return result; } It is similar to other overloaded operators. However when I use it to add two VirtualMemoryAddress variables it says: error: ambiguous overload for ‘operator+’ in ‘add1 + add2’ note: candidates are: operator+(long long int, long long int) <built-in> /home/mahmood/flexus-4.0/core/types.hpp:97: note: const Flexus::Core::MemoryAddress_<underlying_type, isVirtual>& Flexus::Core::MemoryAddress_<underlying_type, isVirtual>::operator+(const underlying_type&) const [with underlying_type = long long int, bool isVirtual = true] /opt/boost_1_33_1/boost/operators.hpp:250: note: Flexus::Core::MemoryAddress_<long long int, true> boost::operator+(const int&, const Flexus::Core::MemoryAddress_<long long int, true>&) /opt/boost_1_33_1/boost/operators.hpp:250: note: Flexus::Core::MemoryAddress_<long long int, true> boost::operator+(const Flexus::Core::MemoryAddress_<long long int, true>&, const int&) Seems that it conflict with the overloaded '+' in boost. Has anybody faced such issue? Thanks, -- // Naderan *Mahmood;
