Skip to content

Instantly share code, notes, and snippets.

// simplygon_minimal_example.cpp
#define WIN32_LEAN_AND_MEAN
#include <fstream>
#include <cassert>
#include <cstdio>
#include <cstdint>
#include <vector>
#include <string>
#include <windows.h>
#include <tchar.h>
@oteguro
oteguro / scope_exit.h
Created May 8, 2014 13:33
Tiny "ScopeExit" macro on C++11.
// ----------------------------------------------------------------------------
// scope_exit.h
// ----------------------------------------------------------------------------
// Description : Tiny "ScopeExit" on C++11.
#pragma once
template <typename T> class ScopeExit
{
public:
T m_func;
// ----------------------------------------------------------------------------
// constexpr_hash_murmur.h
// ----------------------------------------------------------------------------
// compile time string hashing(murmur hash equivalent).
// @see also https://sites.google.com/site/murmurhash/
#pragma once
#include <stdint.h>
#if defined(_MSC_VER)
#pragma warning (push)