libcruft-util/alloc/raw/null.cpp
Danny Robson f6056153e3 rename root namespace from util to cruft
This places, at long last, the core library code into the same namespace
as the extended library code.
2018-08-05 14:42:02 +10:00

85 lines
1.6 KiB
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright 2015 Danny Robson <danny@nerdcruft.net>
*/
#include "null.hpp"
#include "../../debug.hpp"
#include <new>
using cruft::alloc::raw::null;
///////////////////////////////////////////////////////////////////////////////
std::byte*
null::begin (void)
{
return nullptr;
}
//-----------------------------------------------------------------------------
const std::byte*
null::begin (void) const
{
return nullptr;
}
//-----------------------------------------------------------------------------
std::byte*
null::end (void)
{ return nullptr; }
//-----------------------------------------------------------------------------
const std::byte*
null::end (void) const
{ return nullptr; }
//-----------------------------------------------------------------------------
size_t
null::offset (const void *ptr) const
{
return reinterpret_cast<uintptr_t> (ptr);
}
///////////////////////////////////////////////////////////////////////////////
void
null::reset (void)
{
;
}
///////////////////////////////////////////////////////////////////////////////
size_t
null::capacity (void) const
{
return 0;
}
//-----------------------------------------------------------------------------
size_t
null::used (void) const
{
return 0;
}
//-----------------------------------------------------------------------------
size_t
null::remain (void) const
{
return 0;
}