News for hackers. Stuff that matters.
Re:Fearless concurrency with Rust by sjolsen on Friday April 10, 2015 @11:25PM (#9358327)
>I haven't investigated it but variadic template template arguments might help there, though.

They do:

    template <template <typename...> class Container, typename T>
    Container <T> fin (T n) {
        Container <T> set;
        for (T i = 0; i < n; ++i)
            set.push_back (i);
        return set;
    }
    
    int main () {
        for (int i : fin <std::vector> (10))
            std::cout << i << std::endl;
    }

There are no comments on this comment yet.