Can I alias the following template?

I wind up using the following signature pretty often:

template <typename ValT, template <typename, typename = std::allocator<ValT> >
          class ContainerT>
void foo(const ContainerT<ValT>& rasInParams)

— not exactly this signature, but variants of it where I have other paramters but need to accept containers of a few different types and a few differnent value tyeps. It works, and I’m okay with it, but it is a lot of boilerplate. Is there some way to define a template alias, or some other simplification, to make it a little easier to read?

Source: c++

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.