You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/llarp/mem.hpp

15 lines
240 B
C++

7 years ago
#ifndef LLARP_MEM_HPP
#define LLARP_MEM_HPP
#include <llarp/mem.h>
#include <cmath>
namespace llarp
{
template<typename T>
static constexpr size_t alignment()
{
return std::exp2(1+std::floor(std::log2(sizeof(T))));
}
}
#endif