diff --git a/src/lib/meta/function-closure.hpp b/src/lib/meta/function-closure.hpp index 3c25f8042..fd5ca3926 100644 --- a/src/lib/meta/function-closure.hpp +++ b/src/lib/meta/function-closure.hpp @@ -364,32 +364,29 @@ namespace func{ /** - * Build a sequence of tr1 function argument placeholder types. - * For each of the elements of the provided reference sequence, + * Build a list of tr1 function argument placeholder types. + * For each of the elements of the provided reference list, * a Placeholder is added, numbers counting up starting with 1 (!) */ - template - class PlaceholderTuple - { - typedef typename Tuple::Type TypeSeq; - typedef typename Tuple::TailType TailSeq; - - typedef typename PlaceholderTuple::PlaceholderSeq TailPlaceholderSeq; - - public: - typedef typename Prepend<_Placeholder, TailPlaceholderSeq>::Seq PlaceholderSeq; - typedef Tuple Type; - - }; + template + struct PlaceholderTuple + : PlaceholderTuple + { }; - template - struct PlaceholderTuple, i> : PlaceholderTuple {}; + template + struct PlaceholderTuple, i> + { + using TailPlaceholders = typename PlaceholderTuple::List; + + using List = Node<_Placeholder, TailPlaceholders>; + using Type = Tuple::Seq>; + }; template struct PlaceholderTuple { - typedef Types<> PlaceholderSeq; - typedef Tuple > Type; + using List = NullType; + using Type = Tuple>; }; @@ -490,8 +487,8 @@ namespace func{ typedef typename Splice::Front RightReduced; // build a list, where each of the *remaining* arguments is replaced by a placeholder marker - typedef typename func::PlaceholderTuple::PlaceholderSeq::List LeftPlaceholders; - typedef typename func::PlaceholderTuple::PlaceholderSeq::List RightPlaceholders; + typedef typename func::PlaceholderTuple::List LeftPlaceholders; + typedef typename func::PlaceholderTuple::List RightPlaceholders; // ... and splice these placeholders on top of the original argument type list, // thus retaining the types to be closed, but setting a placeholder for each remaining argument @@ -688,8 +685,8 @@ namespace func{ typedef typename Splice::Front RemainingFront; typedef typename Splice::Back RemainingBack; - typedef typename func::PlaceholderTuple::PlaceholderSeq::List PlaceholdersBefore; - typedef typename func::PlaceholderTuple::PlaceholderSeq::List PlaceholdersBehind; + typedef typename func::PlaceholderTuple::List PlaceholdersBefore; + typedef typename func::PlaceholderTuple::List PlaceholdersBehind; typedef typename Append< typename Append< PlaceholdersBefore , ValList >::List , PlaceholdersBehind >::List PreparedArgs;