summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt3
-rw-r--r--zp/include/zp/mem3
-rw-r--r--zp/include/zp/zp40
3 files changed, 27 insertions, 19 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 42d1872..6c207ce 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -34,6 +34,9 @@
* Define conversion function for opt;
* Make assignment operators return references;
+* Fix text paddings;
+* Add algorithm for moving: mov;
+
# 1.0.0
* Update API-BREAK file;
diff --git a/zp/include/zp/mem b/zp/include/zp/mem
index 5475152..ce0cc65 100644
--- a/zp/include/zp/mem
+++ b/zp/include/zp/mem
@@ -65,6 +65,9 @@ namespace zp {
template<typename ltyp, typename rtyp> zp_nothw bool equ(ltyp * lbuf,rtyp * rbuf,::zp::siz num);
template<typename buftyp,typename valtyp> zp_nothw buftyp * fil(buftyp * buf, valtyp & val, ::zp::siz num);
template<typename buftyp,typename valtyp> zp_nothw buftyp * srh(buftyp * buf, valtyp & val, ::zp::siz num);
+#if zp_std_cxx11
+ template<typename ltyp, typename rtyp> zp_nothw ::zp::cpyres<ltyp,rtyp> cpy(ltyp * dst, rtyp * src, ::zp::siz num); // Identical to cpy except that all values are passed to fwd firstly.
+#endif
}
#include <zp/det/mem.ii>
diff --git a/zp/include/zp/zp b/zp/include/zp/zp
index 2c970be..b163429 100644
--- a/zp/include/zp/zp
+++ b/zp/include/zp/zp
@@ -65,26 +65,26 @@ namespace zp {
#if zp_std_cxx11
template<typename typ> struct minval {constexpr static typ val = {};};
- template<> struct minval<bool> {constexpr static auto val = false;};
- template<> struct minval<char> {constexpr static auto val = zp_minvalc;};
- template<> struct minval<double> {constexpr static auto val = zp_minvald;};
- template<> struct minval<float> {constexpr static auto val = zp_minvalf;};
- template<> struct minval<int> {constexpr static auto val = zp_minvali;};
+ template<> struct minval<bool> {constexpr static auto val = false;};
+ template<> struct minval<char> {constexpr static auto val = zp_minvalc;};
+ template<> struct minval<double> {constexpr static auto val = zp_minvald;};
+ template<> struct minval<float> {constexpr static auto val = zp_minvalf;};
+ template<> struct minval<int> {constexpr static auto val = zp_minvali;};
template<> struct minval<int long> {constexpr static auto val = zp_minvalil;};
- template<> struct minval<double long> {constexpr static auto val = zp_minvaldl;};
+ template<> struct minval<double long> {constexpr static auto val = zp_minvaldl;};
template<> struct minval<int short> {constexpr static auto val = zp_minvalis;};
- template<> struct minval<char signed> {constexpr static auto val = zp_minvalcs;};
- template<> struct minval<char unsigned> {constexpr static auto val = zp_minvalcu;};
- template<> struct minval<int unsigned> {constexpr static auto val = zp_minvaliu;};
+ template<> struct minval<char signed> {constexpr static auto val = zp_minvalcs;};
+ template<> struct minval<char unsigned> {constexpr static auto val = zp_minvalcu;};
+ template<> struct minval<int unsigned> {constexpr static auto val = zp_minvaliu;};
template<> struct minval<int long unsigned> {constexpr static auto val = zp_minvalilu;};
template<> struct minval<int short unsigned> {constexpr static auto val = zp_minvalisu;};
- template<> struct minval<wchar_t> {constexpr static auto val = zp_minvalw;};
+ template<> struct minval<wchar_t> {constexpr static auto val = zp_minvalw;};
#if __cpp_char8_t >= 201811
- template<> struct minval<char8_t> {constexpr static auto val = zp_minvalc8;};
+ template<> struct minval<char8_t> {constexpr static auto val = zp_minvalc8;};
#endif
#if zp_std_cxx11
- template<> struct minval<char16_t> {constexpr static auto val = zp_minvalc01;};
- template<> struct minval<char32_t> {constexpr static auto val = zp_minvalc02;};
+ template<> struct minval<char16_t> {constexpr static auto val = zp_minvalc01;};
+ template<> struct minval<char32_t> {constexpr static auto val = zp_minvalc02;};
template<> struct minval<int long long> {constexpr static auto val = zp_minvalill;};
template<> struct minval<int long long unsigned> {constexpr static auto val = zp_minvalillu;};
#endif
@@ -98,12 +98,12 @@ namespace zp {
template<> struct maxval<int> {constexpr static auto val = zp_maxvali;};
template<> struct maxval<int long> {constexpr static auto val = zp_maxvalil;};
template<> struct maxval<double long> {constexpr static auto val = zp_maxvaldl;};
- template<> struct maxval<int short> {constexpr static auto val = zp_maxvalis;};
+ template<> struct maxval<int short> {constexpr static auto val = zp_maxvalis;};
template<> struct maxval<char signed> {constexpr static auto val = zp_maxvalcs;};
template<> struct maxval<char unsigned> {constexpr static auto val = zp_maxvalcu;};
template<> struct maxval<int unsigned> {constexpr static auto val = zp_maxvaliu;};
template<> struct maxval<int long unsigned> {constexpr static auto val = zp_maxvalilu;};
- template<> struct maxval<int short unsigned> {constexpr static auto val = zp_maxvalisu;};
+ template<> struct maxval<int short unsigned> {constexpr static auto val = zp_maxvalisu;};
template<> struct maxval<wchar_t> {constexpr static auto val = zp_maxvalw;};
#if __cpp_char8_t >= 201811
template<> struct maxval<char8_t> {constexpr static auto val = zp_maxvalc8;};
@@ -215,7 +215,7 @@ namespace zp {
template<> struct isusgn<int unsigned> {constexpr static bool val = true;};
template<> struct isusgn<int long long unsigned> {constexpr static bool val = true;};
template<> struct isusgn<int long unsigned> {constexpr static bool val = true;};
- template<> struct isusgn<int short unsigned> {constexpr static bool val = true;};
+ template<> struct isusgn<int short unsigned> {constexpr static bool val = true;};
#if __cpp_char8_t >= 201811
template<> struct isusgn<char8_t> {constexpr static bool val = true;};
#endif
@@ -265,8 +265,8 @@ namespace zp {
template<> struct isinttyp<int long long> {constexpr static bool val = true;};
template<> struct isinttyp<int long long unsigned> {constexpr static bool val = true;};
template<> struct isinttyp<int long unsigned> {constexpr static bool val = true;};
- template<> struct isinttyp<int short> {constexpr static bool val = true;};
- template<> struct isinttyp<int short unsigned> {constexpr static bool val = true;};
+ template<> struct isinttyp<int short> {constexpr static bool val = true;};
+ template<> struct isinttyp<int short unsigned> {constexpr static bool val = true;};
template<typename typ> struct isinttyp<typ const> {constexpr static bool val = isinttyp<typ>::val;};
template<typename typ> struct isinttyp<typ volatile> {constexpr static bool val = isinttyp<typ>::val;};
@@ -395,7 +395,9 @@ namespace zp {
#if zp_std_cxx11
zp_iln constexpr auto iscstevl() noexcept -> bool; // is constant-evaluated
- template<typename typ> zp_iln constexpr auto fwd(typ & ref) noexcept -> typ && {return static_cast<typ &&>(ref);}
+ template<typename typ> zp_iln constexpr auto fwd(typ & ref) noexcept -> typ && {return static_cast<typ &&>(ref);}
+ template<typename typ> zp_iln constexpr auto fwd(typ && ref) noexcept -> typ && {return static_cast<typ &&>(ref);}
+ template<typename typ> zp_iln constexpr auto fwd(typ const& ref) noexcept -> typ && = delete;
#endif
zp_iln zp_noret zp_nothw inline void trp() {::zp_trp();}