Closed blakemulnix closed 4 years ago
Due to an error in the regex pattern for matching floats in types/float.cmake's cpp_is_float function, integers that have more than 2 digits are typed as floats.
cpp_is_float
For example:
set(arg1 1) set(arg2 12) set(arg3 123) set(arg4 123456) cpp_type_of(type1 "${arg1}") cpp_type_of(type2 "${arg2}") cpp_type_of(type3 "${arg3}") cpp_type_of(type4 "${arg4}") message("type1: ${type1}") message("type2: ${type2}") message("type3: ${type3}") message("type4: ${type4}")
produces:
type1: int type2: int type3: float type4: float
I would expect all floats to be typed as floats and ints to be typed as ints.
Due to an error in the regex pattern for matching floats in types/float.cmake's
cpp_is_float
function, integers that have more than 2 digits are typed as floats.For example:
produces:
I would expect all floats to be typed as floats and ints to be typed as ints.