Skip to content

Instantly share code, notes, and snippets.

#include <type_traits>
template <
class TInt,
typename std::enable_if<
std::is_integral<TInt>::value,
int
>::type = 0
>
class Fraction {
// https://godbolt.org/z/pujcf7
#include <utility>
#include <tuple>
namespace rz
{
namespace adl
{
using std::begin;
@roehrdor
roehrdor / BitField.hpp
Created September 24, 2018 07:31
BitField Class Wrapper
#include <cstdint>
#include <cstdlib>
template <class T = uint_least64_t, size_t size = 64, T first = 0, T last = first>
constexpr T genMask() {
static_assert(first <= last, "");
static_assert(first < size && last < size, "");
return (1ULL << last) | ((1ULL << (last - first)) - 1ULL) << first;
}
(function (window) {
'use strict';
var App = window.App || {};
class ConnectFour {
constructor() {
this.settings = {
displayDump: false
};
this.gameOver = false;