This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <cstddef> | |
template <typename TRet, typename TVal> | |
TRet *poff(TVal *ptr, ptrdiff_t offset) | |
{ | |
return reinterpret_cast<TRet *>(reinterpret_cast<char *>(ptr) + offset); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#ifdef _MSC_VER | |
#define _offsetof_(s, m) offsetof(s, m) | |
#else | |
namespace detail { | |
template<typename T> struct declval_helper { static T value; }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <vector> | |
template <typename T, size_t N> | |
struct allocator_with_buffer | |
{ | |
using value_type = T; | |
template <class U> | |
struct rebind { typedef allocator_with_buffer<U, N> other; }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <mutex> | |
#include <thread> | |
#include <new> | |
template <typename TObj, typename TMutex = std::mutex> | |
class MutexedGuard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#ifndef _FUNCTION_HPP_INCLUDED_ | |
#define _FUNCTION_HPP_INCLUDED_ | |
#include <type_traits> | |
namespace | |
{ |