Skip to content

Commit e0bbff7

Browse files
committed
add appropriate preprocessor guards
1 parent ba49af3 commit e0bbff7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

include/alpaca/alpaca.h

+2
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ void serialize_helper(const T &s, Container &bytes, std::size_t &byte_index) {
143143
}
144144
}
145145

146+
#ifndef ALPACA_EXCLUDE_SUPPORT_STD_BITSET
146147
// version for bitset
147148
template <options O, typename T, typename U>
148149
typename std::enable_if<is_bitset<U>::value, void>::type
@@ -155,6 +156,7 @@ void to_bytes_router(const std::bitset<N> &input, Container &bytes,
155156
std::size_t &byte_index) {
156157
to_bytes<O>(bytes, byte_index, input);
157158
}
159+
#endif
158160

159161
} // namespace detail
160162

include/alpaca/detail/is_bitset.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#pragma once
2+
#ifndef ALPACA_EXCLUDE_SUPPORT_STD_BITSET
23
#include <bitset>
34
#include <type_traits>
45

@@ -16,3 +17,5 @@ struct is_bitset<std::bitset<N>> : std::true_type {};
1617
} // namespace detail
1718

1819
} // namespace alpaca
20+
21+
#endif // ALPACA_EXCLUDE_SUPPORT_STD_BITSET

0 commit comments

Comments
 (0)