Skip to content

Instantly share code, notes, and snippets.

@dabrahams
dabrahams / lambda-overload.cpp
Created September 25, 2012 00:50
Demonstration of Mathias Gaunard's overloaded function object technique. See also https://gist.github.com/3779508
// Copyright Dave Abrahams 2012. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
template<class...Fs> struct overloaded;
template<class F1, class...Fs>
struct overloaded<F1, Fs...> : F1, overloaded<Fs...>::type
{
typedef overloaded type;