-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IReference operators need to go into the level-1 header (#906)
- Loading branch information
1 parent
8684e14
commit 5e1b063
Showing
6 changed files
with
42 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
WINRT_EXPORT namespace winrt::Windows::Foundation | ||
{ | ||
template <typename T> | ||
bool operator==(IReference<T> const& left, IReference<T> const& right) | ||
{ | ||
if (get_abi(left) == get_abi(right)) | ||
{ | ||
return true; | ||
} | ||
|
||
if (!left || !right) | ||
{ | ||
return false; | ||
} | ||
|
||
return left.Value() == right.Value(); | ||
} | ||
|
||
template <typename T> | ||
bool operator!=(IReference<T> const& left, IReference<T> const& right) | ||
{ | ||
return !(left == right); | ||
} | ||
} |