I use a macro BOOST_STRONG_TYPEDEFthat creates a class that overloads operator==. I wonder if I need to overload operator!=?
BOOST_STRONG_TYPEDEF
operator==
operator!=
The answer is no!
The reason I didn't notice at first is because BOOST_STRONG_TYPEDEF uses Boost operators ( http://www.boost.org/doc/libs/1_38_0/libs/utility/operators.htm ), in particular total_ordered1 and whole_ordered2, Thus, less comparison and equality operators are implemented for you.
, . , , , .
Source: https://habr.com/ru/post/1583874/More articles:How to use the properties file outside the WEB-INF directory? - javaWhat are the best methods for git clean history? - gitChange type of number with Haskell - haskellPython - printing on the same line - pythonDynamically upload files on classpath using ReloadableResourceBundleMessageSource - javaawk: find minimum and maximum columns - bashWhy does authentication fail when using IBM Rational sample Java code to connect to a ClearCase server? - javaRearrange x & y Axis in Matlab - matlabSubscript in axis description - javaGetting "weak links" error in cryptography-0.8.2 python install - pythonAll Articles