Compare commits
No commits in common. "acd93337d4fe1d150ad83b0af3c37c4b8d4cf9fb" and "be1f90955b0bb0010391b736029bb46263f56580" have entirely different histories.
acd93337d4
...
be1f90955b
6
deps/ox/src/ox/std/math.hpp
vendored
6
deps/ox/src/ox/std/math.hpp
vendored
@ -48,11 +48,11 @@ constexpr const T &clamp(const T &v, const T &lo, const T &hi) noexcept requires
|
||||
return min(ox::max(v, lo), hi);
|
||||
}
|
||||
|
||||
template<typename I, typename E>
|
||||
template<typename I>
|
||||
[[nodiscard]]
|
||||
constexpr I pow(I v, E e) noexcept {
|
||||
constexpr I pow(I v, int e) noexcept {
|
||||
I out = 1;
|
||||
for (E i = 0; i < e; ++i) {
|
||||
for (I i = 0; i < e; i++) {
|
||||
out *= v;
|
||||
}
|
||||
return out;
|
||||
|
5
deps/ox/src/ox/std/stringliteral.hpp
vendored
5
deps/ox/src/ox/std/stringliteral.hpp
vendored
@ -32,9 +32,10 @@ class StringLiteral: public detail::BaseStringView {
|
||||
|
||||
constexpr explicit StringLiteral(const char *str, std::size_t len) noexcept: BaseStringView(str, len) {}
|
||||
|
||||
constexpr explicit StringLiteral(char const *str) noexcept: StringLiteral(str, ox::strlen(str)) {}
|
||||
constexpr explicit StringLiteral(char const *str) noexcept: StringLiteral(str, ox::strlen(str)) {
|
||||
}
|
||||
|
||||
constexpr StringLiteral &operator=(StringLiteral const&other) noexcept {
|
||||
constexpr auto &operator=(StringLiteral const&other) noexcept {
|
||||
if (&other != this) {
|
||||
set(other.data(), other.len());
|
||||
}
|
||||
|
7
deps/ox/src/ox/std/strongint.hpp
vendored
7
deps/ox/src/ox/std/strongint.hpp
vendored
@ -34,7 +34,7 @@ class Integer: public Base {
|
||||
|
||||
constexpr Integer(const Integer<T, Base> &i) noexcept;
|
||||
|
||||
constexpr Integer<T, Base> &operator=(Integer<T, Base> i) noexcept;
|
||||
constexpr Integer<T, Base> operator=(Integer<T, Base> i) noexcept;
|
||||
|
||||
constexpr Integer<T, Base> operator==(Integer<T, Base> i) const noexcept;
|
||||
|
||||
@ -118,9 +118,10 @@ constexpr Integer<T, Base>::Integer(const Integer<T, Base> &i) noexcept: Base(i)
|
||||
}
|
||||
|
||||
template<typename T, class Base>
|
||||
constexpr Integer<T, Base> &Integer<T, Base>::operator=(Integer<T, Base> i) noexcept {
|
||||
constexpr Integer<T, Base> Integer<T, Base>::operator=(Integer<T, Base> i) noexcept {
|
||||
// needed in case T has nodiscard
|
||||
Base::operator=(i);
|
||||
constexpr auto ignore = [](Base) {};
|
||||
ignore(Base::operator=(i));
|
||||
m_i = i.m_i;
|
||||
return *this;
|
||||
}
|
||||
|
4
deps/ox/src/ox/std/utility.hpp
vendored
4
deps/ox/src/ox/std/utility.hpp
vendored
@ -16,8 +16,8 @@
|
||||
namespace std {
|
||||
|
||||
template<typename T>
|
||||
constexpr ox::remove_reference_t<T> &&move(T &&t) noexcept {
|
||||
return static_cast<ox::remove_reference_t<T>&&>(t);
|
||||
constexpr typename ox::remove_reference<T>::type &&move(T &&t) noexcept {
|
||||
return static_cast<typename ox::remove_reference<T>::type&&>(t);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
Loading…
x
Reference in New Issue
Block a user