Format:
Recent snippets matching tags of variadic templates
#include "for_each.h" #include <iostream> #include <tuple> // ------- Fibonacii number generator --------- template<int N> struct Fib { enum { value = Fib<N-1>::value + Fib<N-2>::value }; };
176 Views
no comments
#include "for_each.h" #include <iostream> #include <string> #include <tuple> using namespace std; struct Functor { template<typename T>
125 Views
1 comments
// ===================================================================================== // // Filename: for_each.h // // ===================================================================================== #ifndef FOR_EACH_INC #define FOR_EACH_INC
145 Views
1 comments
// ===================================================================================== // // Filename: indexes.h // // ===================================================================================== #ifndef INDEXES_INC #define INDEXES_INC
152 Views
2 comments
#include <utility> // Note: I've revised my implementation of AUTO_FUN here // to make its use look more like a function definition #define AUTO_FUN_IMPL( ... ) decltype( __VA_ARGS__ ) { return __VA_ARGS__; } #define AUTO_FUN( name_and_param_list ) auto name_and_param_list-> AUTO_FUN_IMPL template< typename SourceType >
527 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
