Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

three way comparison operator c++

//Since C++20
	lhs <=> rhs  
The expression returns an object that
- compares <0 if lhs < rhs
- compares >0 if lhs > rhs
- compares ==0 if lhs and rhs are equal/equivalent.
Source by en.cppreference.com #
 
PREVIOUS NEXT
Tagged: #comparison #operator
ADD COMMENT
Topic
Name
7+1 =