::std::string to_string() const
{
- return ::std::string(ptr, size);
+ return ::std::string(_Base::ptr, _Base::size);
}
//int operator == ( const sized_ccharbuf& other ) const
{
//return _Base::operator ==(s);
- const char* p1 = ptr;
+ const char* p1 = _Base::ptr;
const char* p2 = other.ptr;
- const char* p_end1 = ptr + size;
+ const char* p_end1 = _Base::ptr + _Base::size;
const char* p_end2 = other.ptr + other.size;
for( ; ; p1++, p2++ )
{
//int operator == ( const char* s ) const
int compare( const char* s ) const
{
- T* p1 = ptr;
+ T* p1 = _Base::ptr;
T* p2 = s;
for( ; ; p1++, p2++ )
{
- if ( p1 == ptr+size && *p2 == '\0' )
+ if ( p1 == _Base::ptr + _Base::size && *p2 == '\0' )
return 0;
- if ( p1 == ptr+size )
+ if ( p1 == _Base::ptr + _Base::size )
return *p2;
if ( *p2 == '\0' )
return -(*p1);
return 0;
}
- template <typename T>
+ //template <typename T>
bool operator == ( const T& other ) const
{
return ! compare(other);
}
- template <typename T>
+ //template <typename T>
bool operator != ( const T& other ) const
{
//return (bool)compare(other);