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;

Reply via email to