This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<type_traits> | |
template<class T> | |
struct S | |
{ | |
template <class F, typename std::enable_if< | |
std::is_void<decltype(std::declval<F>()(std::declval<T>()))>::value | |
>::type* = nullptr> | |
void then(F f) | |
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace msglike | |
{ | |
using Val = s3d::JSONValue; | |
namespace develop | |
{ | |
class stop {};//そこまでよ!!! | |
class none {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//sample http://txt-txt.hateblo.jp/entry/2014/01/21/180633 | |
#include<boost\variant\variant.hpp> | |
#include<type_traits> | |
#include<utility> | |
template<class F1,class F2> | |
class BiGenLambda | |
{ | |
template<class F> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include<memory> | |
#include<unordered_map> | |
#include<initializer_list> | |
#include<type_traits> | |
/* | |
**sample** | |
struct A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<boost\any.hpp> | |
#include<unordered_map> | |
#include<typeindex> | |
#include<iostream> | |
#include<string> | |
class Type2ValueMap | |
{ | |
public: | |
template<class T> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include<chrono> | |
#include<string> | |
#include<list> | |
class DebugTimer | |
{ | |
struct Data | |
{ | |
Data(const std::string&id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<vector> | |
#include<string> | |
//VSでのみ動作を確認 | |
template<class T> | |
class Piyo | |
{ | |
public: | |
void print() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include<tuple> | |
namespace deteil{ | |
template<class Tuple,class Visitor> | |
class _tuple_foreach | |
{ | |
public: | |
void operator()(Tuple & tuple, Visitor& visitor) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include<tuple> | |
#include<vector> | |
namespace proloog | |
{ | |
class None{}; | |
class Var{}; | |
template<class... X> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace alol{ | |
template<class...T> | |
class ordered_poly_lambda | |
{ | |
struct stop{}; | |
public: | |
void operator()(stop){} | |
}; | |
template<class F, class ...T> | |
class ordered_poly_lambda<F, T...> |