File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ namespace stdsharp
2828 };
2929
3030 template <typename T>
31- class default_arithmetic_operation : default_increase_and_decrease<T>
31+ class default_arithmetic_operator : default_increase_and_decrease<T>
3232 {
3333 friend constexpr T& operator ++(T& t) noexcept (noexcept (t += 1 ))
3434 requires requires { t += 1 ; }
@@ -72,4 +72,20 @@ namespace stdsharp
7272 return 0 - t;
7373 };
7474 };
75+
76+ template <typename T>
77+ class default_arrow_operator
78+ {
79+ [[nodiscard]] constexpr decltype (auto ) operator->() const noexcept (noexcept (*static_cast <const T&>(*this )))
80+ requires dereferenceable<const T&>
81+ {
82+ return *static_cast <const T&>(*this );
83+ }
84+
85+ [[nodiscard]] constexpr decltype (auto ) operator->() noexcept (noexcept (*static_cast <T&>(*this )))
86+ requires dereferenceable<T&>
87+ {
88+ return *static_cast <T&>(*this );
89+ }
90+ };
7591}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ namespace stdsharp::filesystem
1414
1515 template <typename Rep, std::uintmax_t Num, std::uintmax_t Denom>
1616 class space_size <Rep, std::ratio<Num, Denom>> :
17- default_arithmetic_operation <space_size<Rep, std::ratio<Num, Denom>>>
17+ default_arithmetic_operator <space_size<Rep, std::ratio<Num, Denom>>>
1818 {
1919 public:
2020 using rep = Rep;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ namespace stdsharp
99{
1010 template <typename T> // NOLINTBEGIN(*-pointer-arithmetic)
1111 class launder_iterator :
12- default_arithmetic_operation <launder_iterator<T>>,
12+ default_arithmetic_operator <launder_iterator<T>>,
1313 public std::random_access_iterator_tag
1414 {
1515 T* ptr_;
You can’t perform that action at this time.
0 commit comments