Skip to content

Instantly share code, notes, and snippets.

@jwu-rpb
jwu-rpb / nonconst_lvalure_referrable.h
Last active July 27, 2021 15:34
stop perfect forwarding when T&& detected, construct a wrapper of a non const lvalue reference instead
#pragma once
#include <concepts>
#include <type_traits>
namespace executors {
/**
* @brief stop perfect forwarding if decay<T> is T, construct a wrapper of a non
* const lvalue reference instead
@jwu-rpb
jwu-rpb / invocable.h
Last active July 27, 2021 15:37
type-erased polymorphic routine wrapper
#pragma once
#include <functional>
#include <memory>
#include <type_traits>
#include <utility>
namespace wjp{
/*