Skip to content

Instantly share code, notes, and snippets.

View ltjax's full-sized avatar

Marius Elvert ltjax

View GitHub Profile
@ltjax
ltjax / scoped_flags.hpp
Created January 13, 2020 17:51
scoped_flags for c++11 scoped enumerations
#pragma once
template <class T>
class scoped_flags
{
public:
using value_type = std::underlying_type_t<T>;
scoped_flags(std::initializer_list<T> flag_list)
: value_(combine_(flag_list))