Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit add5c49

Browse files
authored
Avoid name collision with macros TRUE and FALSE. (#722)
1 parent 2759770 commit add5c49

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

include/highfive/bits/H5Converter_misc.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,11 @@ struct type_helper {
212212
template <typename T>
213213
struct inspector: type_helper<T> {};
214214

215-
enum Boolean : int8_t {
216-
FALSE = 0,
217-
TRUE = 1,
215+
enum class Boolean : int8_t {
216+
HighFiveFalse = 0,
217+
HighFiveTrue = 1,
218218
};
219+
219220
template <>
220221
struct inspector<bool>: type_helper<bool> {
221222
using base_type = Boolean;

include/highfive/bits/H5DataType_misc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class AtomicType<std::complex<T>>: public DataType {
207207

208208
// For boolean we act as h5py
209209
inline EnumType<details::Boolean> create_enum_boolean() {
210-
return {{"FALSE", details::Boolean::FALSE}, {"TRUE", details::Boolean::TRUE}};
210+
return {{"FALSE", details::Boolean::HighFiveFalse}, {"TRUE", details::Boolean::HighFiveTrue}};
211211
}
212212

213213
// Other cases not supported. Fail early with a user message

0 commit comments

Comments
 (0)