summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt5
-rw-r--r--test.cc2
-rw-r--r--zp/include/zp/det/mem.ii30
-rw-r--r--zp/include/zp/mem4
-rw-r--r--zp/include/zp/zp.h4
5 files changed, 25 insertions, 20 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 8394b85..563f406 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,8 @@
+# 2.0.0
+
+* Bump API version;
+* Remove arr from dev;
+
# 1.1.1
* Fix res dtor calls;
diff --git a/test.cc b/test.cc
index a96cb7a..fc2135e 100644
--- a/test.cc
+++ b/test.cc
@@ -504,7 +504,7 @@ int main() {
[&] {
tst("arrays");
- ::zp::dev::arr<::zp::i8,::std::allocator<::zp::i8>> arr(0x8u);
+ ::zp::arr<::zp::i8,::std::allocator<::zp::i8>> arr(0x8u);
chkeq(arr.len(),0x8u);
diff --git a/zp/include/zp/det/mem.ii b/zp/include/zp/det/mem.ii
index 589d1f0..a88d31f 100644
--- a/zp/include/zp/det/mem.ii
+++ b/zp/include/zp/det/mem.ii
@@ -5,16 +5,16 @@
*/
#if zp_std_cxx11
-template<typename typ,typename alctyp> zp::dev::arr<typ,alctyp>::arr() : _alc(alctyp()) {}
+template<typename typ,typename alctyp> zp::arr<typ,alctyp>::arr() : _alc(alctyp()) {}
-/*template<typename typ,typename alctyp> zp::dev::arr<typ,alctyp>::arr(::zp::dev::arr<typ,alctyp> & oth) : _alc(alctyp()),_buf(this->_alc.allocate(len)),_len(oth._len) {
+/*template<typename typ,typename alctyp> zp::arr<typ,alctyp>::arr(::zp::arr<typ,alctyp> & oth) : _alc(alctyp()),_buf(this->_alc.allocate(len)),_len(oth._len) {
zp_unlik (this->_buf == zp_nulptr) {return;} // Allocation failed.
::zp::cpy(this->_buf,oth._buf,oth._len);
}*/
-template<typename typ,typename alctyp> zp::dev::arr<typ,alctyp>::arr(::zp::siz const len) {
+template<typename typ,typename alctyp> zp::arr<typ,alctyp>::arr(::zp::siz const len) {
this->_alc = alctyp {};
this->_buf = this->_alc.allocate(len);
@@ -22,19 +22,19 @@ template<typename typ,typename alctyp> zp::dev::arr<typ,alctyp>::arr(::zp::siz c
}
#if zp_std_cxx11
-template<typename typ,typename alctyp> zp::dev::arr<typ,alctyp>::arr(::zp::dev::arr<typ,alctyp> && oth) : _alc(oth._alc),_buf(oth._buf),_len(oth._len) {oth._buf = zp_nulptr;}
+template<typename typ,typename alctyp> zp::arr<typ,alctyp>::arr(::zp::arr<typ,alctyp> && oth) : _alc(oth._alc),_buf(oth._buf),_len(oth._len) {oth._buf = zp_nulptr;}
#endif
-template<typename typ,typename alctyp> zp_nothw zp::dev::arr<typ,alctyp>::~arr() {
+template<typename typ,typename alctyp> zp_nothw zp::arr<typ,alctyp>::~arr() {
zp_unlik (this->_buf == zp_nulptr) {return;}
this->_alc.deallocate(this->_buf,this->_len);
}
-template<typename typ,typename alctyp> zp_nothw bool zp::dev::arr<typ,alctyp>::oky() const {return this->_buf == zp_nulptr;}
+template<typename typ,typename alctyp> zp_nothw bool zp::arr<typ,alctyp>::oky() const {return this->_buf == zp_nulptr;}
-template<typename typ,typename alctyp> zp_nothw ::zp::siz zp::dev::arr<typ,alctyp>::len() const {return this->_len;}
+template<typename typ,typename alctyp> zp_nothw ::zp::siz zp::arr<typ,alctyp>::len() const {return this->_len;}
-template<typename typ,typename alctyp> bool zp::dev::arr<typ,alctyp>::alc(::zp::siz const len) {
+template<typename typ,typename alctyp> bool zp::arr<typ,alctyp>::alc(::zp::siz const len) {
this->_len = len;
this->_buf = this->_alc(len);
@@ -42,15 +42,15 @@ template<typename typ,typename alctyp> bool zp::dev::arr<typ,alctyp>::alc(::zp::
return false;
}
-template<typename typ,typename alctyp> template<typename valtyp> ::zp::siz zp::dev::arr<typ,alctyp>::fil(valtyp const& val) {return static_cast<::zp::siz>(::zp::fil(this->_buf,val,this->_len)-this->_buf);}
+template<typename typ,typename alctyp> template<typename valtyp> ::zp::siz zp::arr<typ,alctyp>::fil(valtyp const& val) {return static_cast<::zp::siz>(::zp::fil(this->_buf,val,this->_len)-this->_buf);}
-template<typename typ,typename alctyp> typ * zp::dev::arr<typ,alctyp>::begin() {return this->_buf;}
-template<typename typ,typename alctyp> typ const* zp::dev::arr<typ,alctyp>::begin() const {return this->_buf;}
-template<typename typ,typename alctyp> typ * zp::dev::arr<typ,alctyp>::end() {return this->_buf+this->_len;}
-template<typename typ,typename alctyp> typ const* zp::dev::arr<typ,alctyp>::end() const {return this->_buf+this->_len;}
+template<typename typ,typename alctyp> typ * zp::arr<typ,alctyp>::begin() {return this->_buf;}
+template<typename typ,typename alctyp> typ const* zp::arr<typ,alctyp>::begin() const {return this->_buf;}
+template<typename typ,typename alctyp> typ * zp::arr<typ,alctyp>::end() {return this->_buf+this->_len;}
+template<typename typ,typename alctyp> typ const* zp::arr<typ,alctyp>::end() const {return this->_buf+this->_len;}
-template<typename typ,typename alctyp> typ & zp::dev::arr<typ,alctyp>::operator [](::zp::ptrdif const off) {return this->_buf[off];}
-template<typename typ,typename alctyp> typ const& zp::dev::arr<typ,alctyp>::operator [](::zp::ptrdif const off) const {return this->_buf[off];}
+template<typename typ,typename alctyp> typ & zp::arr<typ,alctyp>::operator [](::zp::ptrdif const off) {return this->_buf[off];}
+template<typename typ,typename alctyp> typ const& zp::arr<typ,alctyp>::operator [](::zp::ptrdif const off) const {return this->_buf[off];}
#endif
template<typename dsttyp,typename srctyp> zp_nothw inline ::zp::cpyres<dsttyp,srctyp> zp::memcpy(dsttyp * dst,srctyp const* src,::zp::siz const num) {
diff --git a/zp/include/zp/mem b/zp/include/zp/mem
index ce0cc65..6d44236 100644
--- a/zp/include/zp/mem
+++ b/zp/include/zp/mem
@@ -21,10 +21,10 @@ namespace zp {
template<typename typ,typename alctyp> class arr {
public:
zp_nothw arr();
- arr(::zp::dev::arr<typ,alctyp> & oth);
+ arr(::zp::arr<typ,alctyp> & oth);
explicit arr(::zp::siz len);
#if zp_std_cxx11
- zp_nothw arr(::zp::dev::arr<typ,alctyp> && oth);
+ zp_nothw arr(::zp::arr<typ,alctyp> && oth);
#endif
zp_nothw ~arr();
diff --git a/zp/include/zp/zp.h b/zp/include/zp/zp.h
index b584ed9..95552ac 100644
--- a/zp/include/zp/zp.h
+++ b/zp/include/zp/zp.h
@@ -285,8 +285,8 @@ typedef typeof (nullptr) zp_nulptrtyp;
typedef decltype (nullptr) zp_nulptrtyp;
#endif
-#define zp_apiver ((zp_i04)+0x1u) /* Programs expecting this version will still compile with the current extension version. */
-#define zp_extver ((zp_i04)+0x1u) /* The extension versions adds functionality without breaking the existing ones. */
+#define zp_apiver ((zp_i04)+0x2u) /* Programs expecting this version will still compile with the current extension version. */
+#define zp_extver ((zp_i04)+0x0u) /* The extension versions adds functionality without breaking the existing ones. */
/* The patch version is not public as it only changes implementation details. */
#define zp_bytelen ((zp_siz)+0x8u)