From f4aa7f8564649cfdeb5d0296ea793577d23918bb Mon Sep 17 00:00:00 2001 From: rexy712 Date: Tue, 28 Jul 2020 06:22:33 -0700 Subject: [PATCH] Change naming convention for template impl of standard class --- include/rexy/binary.hpp | 4 +- include/rexy/binary_base.hpp | 44 +++++++------- include/rexy/binary_base.tpp | 62 ++++++++++---------- include/rexy/detail/binary_string_conv.hpp | 4 +- include/rexy/string.hpp | 4 +- include/rexy/string_base.hpp | 42 ++++++------- include/rexy/string_base.tpp | 68 +++++++++++----------- src/binary.cpp | 2 +- src/string.cpp | 2 +- 9 files changed, 116 insertions(+), 116 deletions(-) diff --git a/include/rexy/binary.hpp b/include/rexy/binary.hpp index ea7beaf..8a77353 100644 --- a/include/rexy/binary.hpp +++ b/include/rexy/binary.hpp @@ -24,9 +24,9 @@ namespace rexy{ - using binary = binary_data>; + using binary = basic_binary>; - extern template class binary_data>; + extern template class basic_binary>; } diff --git a/include/rexy/binary_base.hpp b/include/rexy/binary_base.hpp index 572eb3c..8da10b6 100644 --- a/include/rexy/binary_base.hpp +++ b/include/rexy/binary_base.hpp @@ -61,31 +61,31 @@ namespace rexy{ }; template> - class binary_data : public binary_base + class basic_binary : public binary_base { public: using allocator_type = Allocator; public: - constexpr binary_data(void)noexcept; - constexpr binary_data(rexy::steal data, size_t size)noexcept; - constexpr binary_data(rexy::steal data, size_t cap, size_t size)noexcept; - constexpr binary_data(rexy::steal data)noexcept; - binary_data(const char* data, size_t size)noexcept(noexcept(Allocator::copy(data, size))); - binary_data(const char* data)noexcept(noexcept(Allocator::copy(data, 0))); - binary_data(const char* data, size_t size, size_t cap)noexcept(noexcept(Allocator::copy(data, size))); - explicit binary_data(size_t size)noexcept(noexcept(Allocator::allocate(size))); - binary_data(size_t size, size_t cap)noexcept(noexcept(Allocator::allocate(size))); + constexpr basic_binary(void)noexcept; + constexpr basic_binary(rexy::steal data, size_t size)noexcept; + constexpr basic_binary(rexy::steal data, size_t cap, size_t size)noexcept; + constexpr basic_binary(rexy::steal data)noexcept; + basic_binary(const char* data, size_t size)noexcept(noexcept(Allocator::copy(data, size))); + basic_binary(const char* data)noexcept(noexcept(Allocator::copy(data, 0))); + basic_binary(const char* data, size_t size, size_t cap)noexcept(noexcept(Allocator::copy(data, size))); + explicit basic_binary(size_t size)noexcept(noexcept(Allocator::allocate(size))); + basic_binary(size_t size, size_t cap)noexcept(noexcept(Allocator::allocate(size))); - binary_data(const binary_data& b)noexcept(noexcept(Allocator::copy(b.m_data, b.m_cap))); - constexpr binary_data(binary_data&& b)noexcept; - binary_data(const binary_base& b)noexcept(noexcept(Allocator::copy(b.get(),b.size()))); + basic_binary(const basic_binary& b)noexcept(noexcept(Allocator::copy(b.m_data, b.m_cap))); + constexpr basic_binary(basic_binary&& b)noexcept; + basic_binary(const binary_base& b)noexcept(noexcept(Allocator::copy(b.get(),b.size()))); - ~binary_data(void)noexcept(noexcept(Allocator::free(m_data))); + ~basic_binary(void)noexcept(noexcept(Allocator::free(m_data))); - binary_data& operator=(const binary_data& b)noexcept(noexcept(Allocator::copy(b.m_data, b.m_size))); - constexpr binary_data& operator=(binary_data&& b)noexcept; - binary_data& operator=(const char* c)noexcept(noexcept(Allocator::copy(c, 0))); - binary_data& operator=(const binary_base& b)noexcept(noexcept(Allocator::copy(b.get(), b.size()))); + basic_binary& operator=(const basic_binary& b)noexcept(noexcept(Allocator::copy(b.m_data, b.m_size))); + constexpr basic_binary& operator=(basic_binary&& b)noexcept; + basic_binary& operator=(const char* c)noexcept(noexcept(Allocator::copy(c, 0))); + basic_binary& operator=(const binary_base& b)noexcept(noexcept(Allocator::copy(b.get(), b.size()))); void reset(void) noexcept(noexcept(Allocator::free(m_data))); @@ -98,7 +98,7 @@ namespace rexy{ noexcept(noexcept(Allocator::allocate(0)) && noexcept(Allocator::free(nullptr))); private: - binary_data& _copy_data(const char* data, size_t len) + basic_binary& _copy_data(const char* data, size_t len) noexcept(noexcept(Allocator::copy(nullptr,0)) && noexcept(Allocator::free(nullptr))); }; @@ -115,9 +115,9 @@ namespace rexy{ constexpr size_t size(void)const noexcept; template - operator binary_data(void) - noexcept(std::is_nothrow_constructible, size_t>::value && - std::is_nothrow_invocable>,decltype(*this)>::value); + operator basic_binary(void) + noexcept(std::is_nothrow_constructible, size_t>::value && + std::is_nothrow_invocable>,decltype(*this)>::value); }; class static_binary : public binary_base diff --git a/include/rexy/binary_base.tpp b/include/rexy/binary_base.tpp index 7d3dc44..6a55353 100644 --- a/include/rexy/binary_base.tpp +++ b/include/rexy/binary_base.tpp @@ -70,84 +70,84 @@ namespace rexy{ } template - constexpr binary_data::binary_data(void)noexcept{} + constexpr basic_binary::basic_binary(void)noexcept{} template - constexpr binary_data::binary_data(rexy::steal data)noexcept: + constexpr basic_binary::basic_binary(rexy::steal data)noexcept: binary_base(data.value() ? cx::strlen(data.value()) : 0) { m_data = data.value(); m_size = m_cap; } template - constexpr binary_data::binary_data(rexy::steal data, size_t size)noexcept: + constexpr basic_binary::basic_binary(rexy::steal data, size_t size)noexcept: binary_base(data.value(), size){} template - constexpr binary_data::binary_data(rexy::steal data, size_t cap, size_t size)noexcept: + constexpr basic_binary::basic_binary(rexy::steal data, size_t cap, size_t size)noexcept: binary_base(data.value(), cap, size){} template - binary_data::binary_data(const char* data, size_t size) + basic_binary::basic_binary(const char* data, size_t size) noexcept(noexcept(Allocator::copy(data, size))): binary_base(reinterpret_cast(Allocator::copy(data, size)), size){} template - binary_data::binary_data(const char* data) + basic_binary::basic_binary(const char* data) noexcept(noexcept(Allocator::copy(data, 0))): - binary_data(data, cx::strlen(data)){} + basic_binary(data, cx::strlen(data)){} template - binary_data::binary_data(const char* data, size_t size, size_t cap) + basic_binary::basic_binary(const char* data, size_t size, size_t cap) noexcept(noexcept(Allocator::copy(data, size))): binary_base(reinterpret_cast(Allocator::copy(data, size)), size, cap){} template - binary_data::binary_data(size_t size) + basic_binary::basic_binary(size_t size) noexcept(noexcept(Allocator::allocate(size))): binary_base(reinterpret_cast(Allocator::allocate(size)), size){} template - binary_data::binary_data(size_t size, size_t cap) + basic_binary::basic_binary(size_t size, size_t cap) noexcept(noexcept(Allocator::allocate(size))): binary_base(reinterpret_cast(size ? Allocator::allocate(size) : nullptr), size, cap){} template - binary_data::binary_data(const binary_data& b) + basic_binary::basic_binary(const basic_binary& b) noexcept(noexcept(Allocator::copy(b.m_data, b.m_cap))): binary_base(reinterpret_cast(b.m_size ? Allocator::copy(b.m_data, b.m_size) : nullptr), b.m_size, b.m_size){} template - constexpr binary_data::binary_data(binary_data&& b)noexcept: + constexpr basic_binary::basic_binary(basic_binary&& b)noexcept: binary_base(cx::exchange(b.m_data, nullptr), b.m_size, b.m_cap){} template - binary_data::binary_data(const binary_base& b)noexcept(noexcept(Allocator::copy(b.get(),b.size()))): + basic_binary::basic_binary(const binary_base& b)noexcept(noexcept(Allocator::copy(b.get(),b.size()))): binary_base(reinterpret_cast(b.size() ? Allocator::copy(b.get(), b.size()) : nullptr), b.size(), b.size()){} template - binary_data::~binary_data(void) + basic_binary::~basic_binary(void) noexcept(noexcept(Allocator::free(m_data))) { Allocator::free(m_data); } template - binary_data& binary_data::operator=(const binary_data& b) + basic_binary& basic_binary::operator=(const basic_binary& b) noexcept(noexcept(Allocator::copy(b.m_data, b.m_size))) { return _copy_data(b.get(), b.size()); } template - constexpr binary_data& binary_data::operator=(binary_data&& b)noexcept{ + constexpr basic_binary& basic_binary::operator=(basic_binary&& b)noexcept{ m_size = b.m_size; m_cap = b.m_cap; cx::swap(m_data, b.m_data); return *this; } template - binary_data& binary_data::operator=(const char* c) + basic_binary& basic_binary::operator=(const char* c) noexcept(noexcept(Allocator::copy(c, 0))) { return _copy_data(c, strlen(c)); } template - binary_data& binary_data::operator=(const binary_base& b) + basic_binary& basic_binary::operator=(const binary_base& b) noexcept(noexcept(Allocator::copy(b.get(), b.size()))) { return _copy_data(b.get(), b.size()); } template - void binary_data::reset(void) + void basic_binary::reset(void) noexcept(noexcept(Allocator::free(m_data))) { Allocator::free(m_data); @@ -155,7 +155,7 @@ namespace rexy{ m_cap = m_size = 0; } template - void binary_data::reset(char* val, size_t cap, size_t size) + void basic_binary::reset(char* val, size_t cap, size_t size) noexcept(noexcept(Allocator::free(m_data))) { Allocator::free(m_data); @@ -164,13 +164,13 @@ namespace rexy{ m_size = size; } template - bool binary_data::resize(size_t newsize) + bool basic_binary::resize(size_t newsize) noexcept(noexcept(Allocator::allocate(0)) && noexcept(Allocator::free(nullptr))) { if(newsize < m_cap) return false; - binary_data tmp(newsize); + basic_binary tmp(newsize); if(!tmp) return false; memcpy(STOP_STRICT_ALIAS_WARNING(tmp).m_data, m_data, m_size); @@ -179,7 +179,7 @@ namespace rexy{ return true; } template - void binary_data::append(const char* data, size_t len) + void basic_binary::append(const char* data, size_t len) noexcept(noexcept(Allocator::allocate(0)) && noexcept(Allocator::free(nullptr))) { @@ -189,18 +189,18 @@ namespace rexy{ m_size += len; } template - binary_data& binary_data::_copy_data(const char* data, size_t len) + basic_binary& basic_binary::_copy_data(const char* data, size_t len) noexcept(noexcept(Allocator::copy(nullptr,0)) && noexcept(Allocator::free(nullptr))) { if(!len) - return (*this = binary_data(rexy::steal(nullptr), 0, 0)); + return (*this = basic_binary(rexy::steal(nullptr), 0, 0)); if(len <= m_size){ m_size = len; memcpy(m_data, data, len); return *this; } - return (*this = binary_data(data, len)); + return (*this = basic_binary(data, len)); } constexpr static_binary::static_binary(const char* str, size_t len)noexcept: @@ -238,14 +238,14 @@ namespace rexy{ template template - binary_cat_expr::operator binary_data(void) - noexcept(std::is_nothrow_constructible, size_t>::value && - std::is_nothrow_invocable>,decltype(*this)>::value) + binary_cat_expr::operator basic_binary(void) + noexcept(std::is_nothrow_constructible, size_t>::value && + std::is_nothrow_invocable>,decltype(*this)>::value) { auto sz = size(); - binary_data ret(sz); + basic_binary ret(sz); - detail::string_appender> append(ret); + detail::string_appender> append(ret); append(*this); return ret; diff --git a/include/rexy/detail/binary_string_conv.hpp b/include/rexy/detail/binary_string_conv.hpp index 46404b0..8ce1a1d 100644 --- a/include/rexy/detail/binary_string_conv.hpp +++ b/include/rexy/detail/binary_string_conv.hpp @@ -33,7 +33,7 @@ namespace rexy{ return s; } template = 0, std::enable_if_t,typename Str::allocator_type>::value,int> = 0> - auto binary_to_string(binary_data&& b)noexcept{ + auto binary_to_string(basic_binary&& b)noexcept{ return Str(rexy::steal(b.release()), b.size()); } template = 0> @@ -46,7 +46,7 @@ namespace rexy{ return b; } template = 0, std::enable_if_t,typename Bin::allocator_type>::value,int> = 0> - auto string_to_binary(string_intermediary&& s)noexcept{ + auto string_to_binary(basic_string&& s)noexcept{ return Bin(rexy::steal(s.release()), s.length()); } diff --git a/include/rexy/string.hpp b/include/rexy/string.hpp index 24239ea..b780d78 100644 --- a/include/rexy/string.hpp +++ b/include/rexy/string.hpp @@ -25,9 +25,9 @@ namespace rexy{ //new allocated string - using string = string_intermediary>; + using string = basic_string>; - extern template class string_intermediary>; + extern template class basic_string>; } diff --git a/include/rexy/string_base.hpp b/include/rexy/string_base.hpp index 5c13c13..cea1525 100644 --- a/include/rexy/string_base.hpp +++ b/include/rexy/string_base.hpp @@ -77,46 +77,46 @@ namespace rexy{ //Supplies all functions that string_base can't implement template - class string_intermediary : public string_base + class basic_string : public string_base { public: using allocator_type = Allocator; private: - string_intermediary& _copy_string(const char* s, size_t len) + basic_string& _copy_string(const char* s, size_t len) noexcept(noexcept(Allocator::copy(nullptr,0)) && noexcept(Allocator::free(nullptr))); public: - constexpr string_intermediary(void)noexcept; - constexpr string_intermediary(rexy::steal data, size_t len)noexcept; - constexpr string_intermediary(rexy::steal data, size_t len, size_t cap)noexcept; - constexpr string_intermediary(rexy::steal data)noexcept; - string_intermediary(const char* data, size_t len)noexcept(noexcept(Allocator::copy(data,len))); - string_intermediary(const char* data)noexcept(noexcept(Allocator::copy(data, m_cap))); - explicit string_intermediary(size_t len)noexcept(noexcept(Allocator::allocate(len))); - string_intermediary(size_t len, size_t cap)noexcept(noexcept(Allocator::allocate(len))); + constexpr basic_string(void)noexcept; + constexpr basic_string(rexy::steal data, size_t len)noexcept; + constexpr basic_string(rexy::steal data, size_t len, size_t cap)noexcept; + constexpr basic_string(rexy::steal data)noexcept; + basic_string(const char* data, size_t len)noexcept(noexcept(Allocator::copy(data,len))); + basic_string(const char* data)noexcept(noexcept(Allocator::copy(data, m_cap))); + explicit basic_string(size_t len)noexcept(noexcept(Allocator::allocate(len))); + basic_string(size_t len, size_t cap)noexcept(noexcept(Allocator::allocate(len))); //normal copy and move ctors - string_intermediary(const string_intermediary& b)noexcept(noexcept(Allocator::copy(b.m_data, b.m_length))); - constexpr string_intermediary(string_intermediary&& s)noexcept(noexcept(cx::exchange(s.m_data, nullptr))); + basic_string(const basic_string& b)noexcept(noexcept(Allocator::copy(b.m_data, b.m_length))); + constexpr basic_string(basic_string&& s)noexcept(noexcept(cx::exchange(s.m_data, nullptr))); - string_intermediary(const string_base& b)noexcept(noexcept(Allocator::copy(b.get(), b.length()))); + basic_string(const string_base& b)noexcept(noexcept(Allocator::copy(b.get(), b.length()))); //dtor - ~string_intermediary(void)noexcept(noexcept(Allocator::free(m_data))); + ~basic_string(void)noexcept(noexcept(Allocator::free(m_data))); - string_intermediary& operator=(const string_intermediary& s) + basic_string& operator=(const basic_string& s) noexcept(noexcept(Allocator::copy(nullptr,0)) && noexcept(Allocator::free(nullptr))); - constexpr string_intermediary& operator=(string_intermediary&& s)noexcept; + constexpr basic_string& operator=(basic_string&& s)noexcept; //Copy from c string - string_intermediary& operator=(const char* c) + basic_string& operator=(const char* c) noexcept(noexcept(Allocator::copy(nullptr,0)) && noexcept(Allocator::free(nullptr))); //Copy from other string_base - string_intermediary& operator=(const string_base& s) + basic_string& operator=(const string_base& s) noexcept(noexcept(Allocator::copy(nullptr,0)) && noexcept(Allocator::free(nullptr))); @@ -151,9 +151,9 @@ namespace rexy{ constexpr size_t length(void)const noexcept; template - operator string_intermediary(void) - noexcept(std::is_nothrow_constructible, size_t>::value && - std::is_nothrow_invocable>,decltype(*this)>::value); + operator basic_string(void) + noexcept(std::is_nothrow_constructible, size_t>::value && + std::is_nothrow_invocable>,decltype(*this)>::value); }; template string_cat_expr(Left&&,Right&&) -> string_cat_expr; diff --git a/include/rexy/string_base.tpp b/include/rexy/string_base.tpp index ddebbd6..ef2b9c8 100644 --- a/include/rexy/string_base.tpp +++ b/include/rexy/string_base.tpp @@ -31,29 +31,29 @@ namespace rexy{ template - constexpr string_intermediary::string_intermediary(void)noexcept{} + constexpr basic_string::basic_string(void)noexcept{} template - constexpr string_intermediary::string_intermediary(rexy::steal data)noexcept: + constexpr basic_string::basic_string(rexy::steal data)noexcept: string_base(data.value() ? cx::strlen(data.value()) : 0) { m_data = data.value(); m_length = m_cap; } template - constexpr string_intermediary::string_intermediary(rexy::steal data, size_t len)noexcept: + constexpr basic_string::basic_string(rexy::steal data, size_t len)noexcept: string_base(data.value(), len, len){} template - constexpr string_intermediary::string_intermediary(rexy::steal data, size_t len, size_t cap)noexcept: + constexpr basic_string::basic_string(rexy::steal data, size_t len, size_t cap)noexcept: string_base(data.value(), len, cap){} template - string_intermediary::string_intermediary(const char* data, size_t len) + basic_string::basic_string(const char* data, size_t len) noexcept(noexcept(Allocator::copy(data,len))): string_base(reinterpret_cast(len ? Allocator::copy(data, len+1) : nullptr), len, len) { m_data[len] = 0; } template - string_intermediary::string_intermediary(const char* data) + basic_string::basic_string(const char* data) noexcept(noexcept(Allocator::copy(data, m_cap))): string_base(data ? strlen(data) : 0) { @@ -63,14 +63,14 @@ namespace rexy{ } } template - string_intermediary::string_intermediary(size_t len) + basic_string::basic_string(size_t len) noexcept(noexcept(Allocator::allocate(len))): string_base(reinterpret_cast(len ? Allocator::allocate(len+1) : nullptr), len) { m_data[len] = 0; } template - string_intermediary::string_intermediary(size_t len, size_t cap) + basic_string::basic_string(size_t len, size_t cap) noexcept(noexcept(Allocator::allocate(len))): string_base(reinterpret_cast(len ? Allocator::allocate(len+1) : nullptr), len, cap) { @@ -79,29 +79,29 @@ namespace rexy{ //normal copy and move ctors template - string_intermediary::string_intermediary(const string_intermediary& b) + basic_string::basic_string(const basic_string& b) noexcept(noexcept(Allocator::copy(b.m_data, b.m_length))): string_base(reinterpret_cast(b.m_length ? Allocator::copy(b.m_data, b.m_length+1) : nullptr), b.m_length, b.m_length){} template - constexpr string_intermediary::string_intermediary(string_intermediary&& s) + constexpr basic_string::basic_string(basic_string&& s) noexcept(noexcept(cx::exchange(s.m_data, nullptr))): string_base(cx::exchange(s.m_data, nullptr), s.m_length, s.m_cap){} template - string_intermediary::string_intermediary(const string_base& b) + basic_string::basic_string(const string_base& b) noexcept(noexcept(Allocator::copy(b.get(), b.length()))): string_base(reinterpret_cast(b.length() ? Allocator::copy(b.get(), b.length()+1) : nullptr), b.length(), b.length()){} //dtor template - string_intermediary::~string_intermediary(void) + basic_string::~basic_string(void) noexcept(noexcept(Allocator::free(m_data))) { Allocator::free(m_data); } template - string_intermediary& string_intermediary::operator=(const string_intermediary& s) + basic_string& basic_string::operator=(const basic_string& s) noexcept(noexcept(Allocator::copy(nullptr,0)) && noexcept(Allocator::free(nullptr))) { @@ -110,11 +110,11 @@ namespace rexy{ m_length = s.m_length; return *this; } - string_intermediary tmp(s); + basic_string tmp(s); return (*this = std::move(tmp)); } template - constexpr string_intermediary& string_intermediary::operator=(string_intermediary&& s)noexcept{ + constexpr basic_string& basic_string::operator=(basic_string&& s)noexcept{ cx::swap(m_data, s.m_data); m_length = s.m_length; m_cap = s.m_cap; @@ -122,7 +122,7 @@ namespace rexy{ } //Copy from c string template - string_intermediary& string_intermediary::operator=(const char* c) + basic_string& basic_string::operator=(const char* c) noexcept(noexcept(Allocator::copy(nullptr,0)) && noexcept(Allocator::free(nullptr))) { @@ -130,7 +130,7 @@ namespace rexy{ } //Copy from other string_base template - string_intermediary& string_intermediary::operator=(const string_base& s) + basic_string& basic_string::operator=(const string_base& s) noexcept(noexcept(Allocator::copy(nullptr,0)) && noexcept(Allocator::free(nullptr))) { @@ -139,7 +139,7 @@ namespace rexy{ //Replace managed pointer. Frees existing value template - void string_intermediary::reset(char* val) + void basic_string::reset(char* val) noexcept(noexcept(Allocator::free(m_data))) { Allocator::free(m_data); @@ -148,7 +148,7 @@ namespace rexy{ m_cap = m_length; } template - void string_intermediary::reset(char* val, size_t len) + void basic_string::reset(char* val, size_t len) noexcept(noexcept(Allocator::free(m_data))) { Allocator::free(m_data); @@ -157,16 +157,16 @@ namespace rexy{ m_cap = len; } template - bool string_intermediary::resize(size_t newsize) + bool basic_string::resize(size_t newsize) noexcept(noexcept(Allocator::copy(nullptr,0)) && noexcept(Allocator::free(nullptr))) { if(newsize < m_cap) return false; - return (*this = string_intermediary(m_data, newsize)); + return (*this = basic_string(m_data, newsize)); } template - void string_intermediary::append(const char* data, size_t len) + void basic_string::append(const char* data, size_t len) noexcept(noexcept(Allocator::allocate(0)) && noexcept(Allocator::free(nullptr))) { @@ -175,19 +175,19 @@ namespace rexy{ m_length += len; m_data[m_length] = 0; }else if(!m_data){ - *this = string_intermediary(len, len); + *this = basic_string(len, len); memcpy(m_data, data, len); m_data[len] = 0; }else{ auto newsize = cx::max(m_length+len, m_cap*2); - string_intermediary tmp(newsize); + basic_string tmp(newsize); tmp.append(m_data, m_length); tmp.append(data, len); *this = std::move(tmp); } } template - void string_intermediary::append(const char* data) + void basic_string::append(const char* data) noexcept(noexcept(Allocator::allocate(0)) && noexcept(Allocator::free(nullptr))) { @@ -195,7 +195,7 @@ namespace rexy{ append(data, strlen(data)); } template - void string_intermediary::append(const string_base& s) + void basic_string::append(const string_base& s) noexcept(noexcept(Allocator::allocate(0)) && noexcept(Allocator::free(nullptr))) { @@ -203,19 +203,19 @@ namespace rexy{ } template - string_intermediary& string_intermediary::_copy_string(const char* s, size_t len) + basic_string& basic_string::_copy_string(const char* s, size_t len) noexcept(noexcept(Allocator::copy(nullptr,0)) && noexcept(Allocator::free(nullptr))) { if(!len) - return (*this = string_intermediary(rexy::steal(nullptr), 0, 0)); + return (*this = basic_string(rexy::steal(nullptr), 0, 0)); if(len <= m_length){ m_length = len; memcpy(m_data, s, len); m_data[len] = 0; return *this; } - return (*this = string_intermediary(s, len)); + return (*this = basic_string(s, len)); } @@ -225,13 +225,13 @@ namespace rexy{ } template template - string_cat_expr::operator string_intermediary(void) - noexcept(std::is_nothrow_constructible, size_t>::value && - std::is_nothrow_invocable>,decltype(*this)>::value) + string_cat_expr::operator basic_string(void) + noexcept(std::is_nothrow_constructible, size_t>::value && + std::is_nothrow_invocable>,decltype(*this)>::value) { size_t len = length(); - string_intermediary ret(len); - detail::string_appender> append(ret); + basic_string ret(len); + detail::string_appender> append(ret); append(*this); return ret; } diff --git a/src/binary.cpp b/src/binary.cpp index 1959e5c..3b68d68 100644 --- a/src/binary.cpp +++ b/src/binary.cpp @@ -21,6 +21,6 @@ namespace rexy{ - template class binary_data>; + template class basic_binary>; } diff --git a/src/string.cpp b/src/string.cpp index 6f5f3b5..53e2b9b 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -21,6 +21,6 @@ namespace rexy{ - template class string_intermediary>; + template class basic_string>; }