Changeset 930609e2 for libcfa/src/parseconfig.cfa
- Timestamp:
- Aug 31, 2021, 1:49:09 AM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
- Children:
- 716e4e6
- Parents:
- 6604ea1
- git-author:
- Jacob Prud'homme <jafprudhomme@…> (07/16/21 15:36:51)
- git-committer:
- Jacob Prud'homme <jafprudhomme@…> (08/31/21 01:49:09)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/parseconfig.cfa
r6604ea1 r930609e2 115 115 116 116 117 // *********************************** validation *********************************** 118 119 120 forall(T | arithmetic( T )) 121 bool is_nonnegative( T & value ) { 122 T zero_val = 0; 123 return value >= zero_val; 124 } 125 126 forall(T | arithmetic( T )) 127 bool is_positive( T & value ) { 128 T zero_val = 0; 129 return value > zero_val; 130 } 131 132 forall(T | arithmetic( T )) 133 bool is_nonpositive( T & value ) { 134 T zero_val = 0; 135 return value <= zero_val; 136 } 137 138 forall(T | arithmetic( T )) 139 bool is_negative( T & value ) { 140 T zero_val = 0; 141 return value < zero_val; 142 } 143 144 117 145 // Local Variables: // 118 146 // tab-width: 4 //
Note: See TracChangeset
for help on using the changeset viewer.