Difference between revisions of "User talk:Ctsolakis"
From crtc.cs.odu.edu
(→Extension SyntaxHighlight test) |
|||
Line 18: | Line 18: | ||
else: | else: | ||
pass | pass | ||
+ | </syntaxhighlight> | ||
+ | <syntaxhighlight lang="C++" line='line'> | ||
+ | template<typename Fn, Fn fn, typename... Args> | ||
+ | typename std::result_of<Fn(Args...)>::type | ||
+ | wrapper(Args&&... args) { | ||
+ | return fn(std::forward<Args>(args)...); | ||
+ | } | ||
+ | #define WRAPPER(FUNC) wrapper<decltype(&FUNC), &FUNC> | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 15:57, 22 September 2017
test text
test section
test text
Extension SyntaxHighlight test
https://www.mediawiki.org/wiki/Extension:SyntaxHighlight
def quickSort(arr):
less = []
pivotList = []
more = []
if len(arr) <= 1:
return arr
else:
pass
template<typename Fn, Fn fn, typename... Args>
typename std::result_of<Fn(Args...)>::type
wrapper(Args&&... args) {
return fn(std::forward<Args>(args)...);
}
#define WRAPPER(FUNC) wrapper<decltype(&FUNC), &FUNC>