Beispiel #1
0
inline double
once_c(_fCallable&& f, _tParams&&... args)
{
	const std::clock_t cl(std::clock());

	yforward(f)(yforward(args)...);
	return double(clock() - cl) / CLOCKS_PER_SEC;
}
Beispiel #2
0
inline double
total_c(size_t n, _fCallable&& f, _tParams&&... args)
{
	const std::clock_t cl(std::clock());

	for(size_t i(0); i != n; ++i)
		yforward(f)(yforward(args)...);
	return double(clock() - cl) / CLOCKS_PER_SEC;
}
Beispiel #3
0
bool
strict_all_of(_tIn first, _tIn last, _fPred pred)
{
	return std::accumulate(first, last, true,
		[pred](bool b, decltype(*first) val){
		return b && bool(pred(yforward(val)));
	});
}
Beispiel #4
0
yconstfn _type
make_from_tuple_impl(_tTuple&& t, index_sequence<_vSeq...>)
{
	return _type(std::get<_vSeq>(yforward(t))...);
}
Beispiel #5
0
yconstfn std::initializer_list<_tDst>
initializer_cast(_tSrc&&... x)
{
	return {_tDst(yforward(x))...};
}
Beispiel #6
0
	yconstfn
	mixin(variadic_sequence<_vSeq...>, std::tuple<_tParams...>&& tp)
		: _tBases(yforward(std::get<_vSeq>(tp)))...
	{}
Beispiel #7
0
	yconstfn
	mixin(_tParam1&& arg1, _tParam2&& arg2, _tParams&&... args)
		: mixin(std::forward_as_tuple(yforward(arg1), yforward(arg2),
		yforward(args)...))
	{}
Beispiel #8
0
	yconstfn
	mixin(_tParam&& arg)
		: _tBases(yforward(arg))
	{}
Beispiel #9
0
	yconstfn
	boxed_value(_tParam1&& arg1, _tParam2&& arg2, _tParams&&... args)
		: value(yforward(arg1), yforward(arg2), yforward(args)...)
	{}
Beispiel #10
0
	yconstfn
	boxed_value(_tParam&& arg)
		: value(yforward(arg))
	{}