Skip to content

Instantly share code, notes, and snippets.

View CaseyCarter's full-sized avatar

Casey Carter CaseyCarter

View GitHub Profile
#include <range/v3/view_facade.hpp>
#include <iostream>
using namespace ranges;
template <class T>
class weirdrange :
public view_facade<weirdrange<T>, cardinality::unknown> {
friend class ranges::range_access;
@CaseyCarter
CaseyCarter / swap_demo.cpp
Last active August 29, 2015 14:22
Potential conceptified STL2 array swap implementation.
#include <type_traits>
#include <utility>
#include <stl2/concepts/foundational.hpp>
template <stl2::Movable T>
void swap(T& a, T& b)
noexcept(std::is_nothrow_move_constructible<T>::value &&
std::is_nothrow_move_assignable<T>::value)
{