Skip to content

Commit 078f02c

Browse files
committed
Making TRange default-constructible only if the underlying point type is
1 parent 13c04b7 commit 078f02c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

source/Ranges/TRange.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ namespace Langulus::Math
176176
static constexpr bool CTTI_RangeTrait = true;
177177

178178
public:
179-
constexpr TRange() noexcept = default;
179+
constexpr TRange() noexcept requires CT::Defaultable<T>;
180180
constexpr TRange(const TRange&) noexcept;
181181
constexpr TRange(const CT::Vector auto&) noexcept;
182182
constexpr TRange(const CT::Scalar auto&) noexcept;

source/Ranges/TRange.inl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
namespace Langulus::Math
1818
{
1919

20+
TEMPLATE() LANGULUS(INLINED)
21+
constexpr TME()::TRange() noexcept requires CT::Defaultable<T> {}
22+
2023
/// Copy constructor
2124
TEMPLATE() LANGULUS(INLINED)
2225
constexpr TME()::TRange(const TRange& a) noexcept {

0 commit comments

Comments
 (0)