I want to insert elements into a STL container (whose type is a template parameter). If the container allows for back_insertion, I want to use that, otherwise just any inserter.
I would like to avoid having to implement my own trait just for this, I'm pretty sure there must be someway I could say "instantiate a back_inserter if possible, and an inserter otherwise".
How do I do that?