Skip to content

Commit fb2435d

Browse files
authored
Fixing Enum ambiguous calls
1 parent c79a34c commit fb2435d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/flecs/addons/cpp/mixins/entity/builder.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ struct entity_builder : entity_view {
100100
* @tparam First The first element of the pair
101101
* @param constant the enum constant.
102102
*/
103-
template<typename First, typename Second, if_t< is_enum<Second>::value > = 0>
103+
template<typename First, typename Second, if_t< is_enum<Second>::value && !std::is_same<First, Second>::value > = 0>
104104
const Self& add(Second constant) const {
105105
flecs_static_assert(is_flecs_constructible<First>::value,
106106
"cannot default construct type: add T::T() or use emplace<T>()");

0 commit comments

Comments
 (0)