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
namespace detail | |
{ | |
template <std::size_t I, class Tuple> | |
struct aligned_offset_impl | |
{ | |
constexpr std::size_t operator()() const noexcept | |
{ | |
using current_element_t = std::tuple_element_t<I, Tuple>; | |
using previous_element_t = std::tuple_element_t<I - 1, Tuple>; |
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
#include <array> | |
#include <iostream> | |
#include <type_traits> | |
#include <vector> | |
// Array factory for type deduction | |
template <typename... Ts> | |
constexpr auto make_array(Ts&&... ts) noexcept | |
{ | |
return std::array<std::common_type_t<Ts...>, sizeof...(Ts)>{std::forward<Ts>(ts)...}; |
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
#include <iostream> | |
#include <vector> | |
#include <Windows.h> | |
#include <Tlhelp32.h> | |
// The normal Toolhelp32.h process snapshot enumeration. This example was taken | |
// mostly from MSDN, with a few modifications. | |
std::vector<int> test_toolhelp() | |
{ |