
"Thorsten Ottosen" <nesotto@cs.auc.dk> writes:
"Jens Theisen" <jens.theisen@transversal.com> wrote in message news:d1nbk5$c0q$1@sea.gmane.org... | Thorsten Ottosen wrote: | > ctor() : v( list_of(1)(2).to_container(v) ) | > { } | | What are you proposing? You don't want to write to v before it's | construction, do you? | | I see that this is somewhat anoying. Even with implicit_cast, because | then you have to give the containers type in the initialisation again.
to_container(v) is actually an existing work-around for compilers which can't even do Cont = list_of(...);
All it does is to deduce the return type; it doesn't write to v, it finds its type.
I should update the docs to make this a more used method of disambiguation
In the spirit of recent work by Eric Niebler, I think you can use: v = 0?v: list_of(...) FWIW ;-) -- Dave Abrahams Boost Consulting www.boost-consulting.com