File: Char_operator_eq_unsigned_int

package info (click to toggle)
cxxtools 3.0.0-1.1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 8,956 kB
  • sloc: cpp: 68,550; ansic: 15,641; sh: 4,239; makefile: 840
file content (17 lines) | stat: -rw-r--r-- 983 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Index: cxxtools-3.0.0/include/cxxtools/char.h
===================================================================
--- cxxtools-3.0.0.orig/include/cxxtools/char.h	2021-05-08 12:56:59.382385827 +0300
+++ cxxtools-3.0.0/include/cxxtools/char.h	2021-05-08 12:56:59.378385953 +0300
@@ -130,6 +130,12 @@
             friend bool operator==(char a, const Char& b)
             { return static_cast<value_type>(a) == b.value(); }
 
+            //! @brief Returns $true$ if the a and b are the same character; $false$ otherwise.
+            //! @return $true$ if the a and b are the same character; $false$ otherwise.
+            friend bool operator==(const Char& a, unsigned int b)
+            { return a.value() == b; }
+
+
             //! @brief Returns $true$ if the a and b are not the same character; $false$ otherwise.
             //! @return $true$ if the a and b are not the same character; $false$ otherwise.
             friend bool operator!=(const Char& a, const Char& b)