Skip to content

Commit 4263f85

Browse files
committed
Make the strong number types themselves nodiscard
This helps ensure any instantiation of them is assigned to something, either a variable or function parameter.
1 parent c08bd77 commit 4263f85

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

common/altypes.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ auto operator==(T const &lhs, al::ConstantNum<typename T::value_t> const &rhs) n
857857

858858

859859
#define DECL_NUMBERTYPE(SelfType, ValueType) \
860-
struct SelfType : al::number_base<ValueType, SelfType> { \
860+
struct [[nodiscard]] SelfType : al::number_base<ValueType, SelfType> { \
861861
using number_base::number_base; \
862862
\
863863
constexpr SelfType() noexcept = default; \

0 commit comments

Comments
 (0)