[질문]
C++ template 매크로 만들어서 쓰는데 괜찮음?
익명(222.164)
2021-04-25 12:30
추천 0
#define STRUCTURE_BTREE_TMP(Ret) \
template <typename Key, std::integral auto Order, typename Alloc, \
std::predicate<Key, Key> Compare> \
Ret BTree<Key, Order, Alloc, Compare>
STRUCTURE_BTREE_TMP([[nodiscard
]] auto)::empty() const noexcept -> bool {
return size_
== 0;
}
매번 template 붙이면 DRY principle 어기는 거 같고 반복하기 싫어서 저리 쓰거든
귀찮더라도 일일이 써야 할까?
오토 개행한거 불편 - dc App
너그러이 넘어가주세요 흑흑
안좋은거같은데
역시 그른가