basedOpinionated utility library |
git clone git://git.dimitrijedobrota.com/based.git |
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING |
commit | 7929424d4d515341538266d94fc36099666d7f7c |
parent | 91b7f9f59b567fcb3c11872e0fc7dec0fef2da13 |
author | Dimitrije Dobrota < mail@dimitrijedobrota.com > |
date | Wed, 21 May 2025 10:37:13 +0200 |
Fix operators =
M | .clang-tidy | | | + |
M | CMakeLists.txt | | | + - |
M | include/based/types/strong.hpp | | | ++++++++++ ---------- |
M | vcpkg.json | | | + - |
4 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/ .clang-tidy b/ .clang-tidy
@@ -15,6 +15,7 @@
Checks: "*,\
-misc-include-cleaner,\
-misc-non-private-member-variables-in-classes,\
-misc-no-recursion,\
-modernize-use-designated-initializers,\
-modernize-use-trailing-return-type,\
-readability-suspicious-call-argument,\
-*-ranges,\
diff --git a/ CMakeLists.txt b/ CMakeLists.txt
@@ -4,7 +4,7 @@
include(cmake/prelude.cmake)
project(
based
VERSION 0.1.2
VERSION 0.2.0
DESCRIPTION "Opinionated utility library"
HOMEPAGE_URL "https://git.dimitrijedobrota.com/based.git"
LANGUAGES CXX
diff --git a/ include/based/types/strong.hpp b/ include/based/types/strong.hpp
@@ -77,7 +77,7 @@
template<class LHS, class RHS>
requires addable<LHS, RHS>;
requires SameAs<LHS, decltype(add(lhs, rhs))>;
})
constexpr auto& operator+=(LHS& lhs, RHS& rhs)
constexpr auto& operator+=(LHS& lhs, RHS rhs)
{
return lhs = lhs + rhs;
}
@@ -97,7 +97,7 @@
template<class LHS, class RHS>
requires subtractable<LHS, RHS>;
requires SameAs<LHS, decltype(sub(lhs, rhs))>;
})
constexpr auto& operator-=(LHS& lhs, RHS& rhs)
constexpr auto& operator-=(LHS& lhs, RHS rhs)
{
return lhs = lhs - rhs;
}
@@ -117,7 +117,7 @@
template<class LHS, class RHS>
requires multiplyable<LHS, RHS>;
requires SameAs<LHS, decltype(mul(lhs, rhs))>;
})
constexpr auto& operator*=(LHS& lhs, RHS& rhs)
constexpr auto& operator*=(LHS& lhs, RHS rhs)
{
return lhs = lhs * rhs;
}
@@ -137,7 +137,7 @@
template<class LHS, class RHS>
requires divisible<LHS, RHS>;
requires SameAs<LHS, decltype(div(lhs, rhs))>;
})
constexpr auto& operator/=(LHS& lhs, RHS& rhs)
constexpr auto& operator/=(LHS& lhs, RHS rhs)
{
return lhs = lhs / rhs;
}
@@ -157,7 +157,7 @@
template<class LHS, class RHS>
requires modable<LHS, RHS>;
requires SameAs<LHS, decltype(mod(lhs, rhs))>;
})
constexpr auto& operator%=(LHS& lhs, RHS& rhs)
constexpr auto& operator%=(LHS& lhs, RHS rhs)
{
return lhs = lhs % rhs;
}
@@ -177,7 +177,7 @@
template<class LHS, class RHS>
requires lshiftable<LHS, RHS>;
requires SameAs<LHS, decltype(lshift(lhs, rhs))>;
})
constexpr auto& operator<<=(LHS& lhs, RHS& rhs)
constexpr auto& operator<<=(LHS& lhs, RHS rhs)
{
return lhs = lhs << rhs;
}
@@ -197,7 +197,7 @@
template<class LHS, class RHS>
requires rshiftable<LHS, RHS>;
requires SameAs<LHS, decltype(rshift(lhs, rhs))>;
})
constexpr auto& operator>>=(LHS& lhs, RHS& rhs)
constexpr auto& operator>>=(LHS& lhs, RHS rhs)
{
return lhs = lhs >> rhs;
}
@@ -217,7 +217,7 @@
template<class LHS, class RHS>
requires andable<LHS, RHS>;
requires SameAs<LHS, decltype(land(lhs, rhs))>;
})
constexpr auto& operator&=(LHS& lhs, RHS& rhs)
constexpr auto& operator&=(LHS& lhs, RHS rhs)
{
return lhs = lhs & rhs;
}
@@ -237,7 +237,7 @@
template<class LHS, class RHS>
requires orable<LHS, RHS>;
requires SameAs<LHS, decltype(lor(lhs, rhs))>;
})
constexpr auto& operator|=(LHS& lhs, RHS& rhs)
constexpr auto& operator|=(LHS& lhs, RHS rhs)
{
return lhs = lhs | rhs;
}
@@ -257,7 +257,7 @@
template<class LHS, class RHS>
requires xorable<LHS, RHS>;
requires SameAs<LHS, decltype(lxor(lhs, rhs))>;
})
constexpr auto& operator^=(LHS& lhs, RHS& rhs)
constexpr auto& operator^=(LHS& lhs, RHS rhs)
{
return lhs = lhs ^ rhs;
}
diff --git a/ vcpkg.json b/ vcpkg.json
@@ -1,6 +1,6 @@
{
"name": "based",
"version-semver": "0.1.1",
"version-semver": "0.2.0",
"dependencies": [
],
"default-features": [],