Skip to content

Commit fb4bbd7

Browse files
committed
utils.h: added bool_to_string()
1 parent 0f8d96a commit fb4bbd7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/utils.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,4 +325,9 @@ static inline std::string ptr_to_string(const void* p)
325325
#endif
326326
}
327327

328+
static inline std::string bool_to_string(bool b)
329+
{
330+
return b ? "true" : "false";
331+
}
332+
328333
#endif

0 commit comments

Comments
 (0)