From 397264a5e0046d9c84d8de41b9683ae695c516e0 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 19 Feb 2015 21:07:57 +0100 Subject: Moved `Apply`'s placeholder into separate detail header * separate actual `Apply` specializations in `detail/apply.h` from placeholder details --- src/function/detail/placeholder.h | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/function/detail/placeholder.h (limited to 'src/function/detail/placeholder.h') diff --git a/src/function/detail/placeholder.h b/src/function/detail/placeholder.h new file mode 100644 index 0000000..8105de5 --- /dev/null +++ b/src/function/detail/placeholder.h @@ -0,0 +1,42 @@ +#ifndef TYPEASVALUE_SRC_FUNCTION_DETAIL_PLACEHOLDER_H_ +#define TYPEASVALUE_SRC_FUNCTION_DETAIL_PLACEHOLDER_H_ + +#include + +#include "list/list.h" +#include "list/operation/nth.h" +#include "list/operation/higher/query.h" + +namespace tav { + +namespace detail { + +struct placeholder_tag { }; + +template +struct placeholder : placeholder_tag { }; + +template +using is_placeholder = Eval>; + +template +using count_placeholders = Count>; + +template +struct resolve_placeholder { + typedef Argument type; +}; + +template < + typename Partials, + int Index +> +struct resolve_placeholder> { + typedef Nth, Partials> type; +}; + +} + +} + +#endif // TYPEASVALUE_SRC_FUNCTION_DETAIL_PLACEHOLDER_H_ -- cgit v1.2.3