Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-01-03 13:44:43


"Pavel Vozenilek" <pavel_vozenilek_at_[hidden]> wrote in message news:cr6ga4
| Attached is file which works on VC6 / Intel 7 / BCB6.4.
| Only tiny changes were needed.

Thanks.

| This boost::make_pair would be very useful.

ok, it was not meant as a proposal, but just as an example of where it would
be
useful.

| Questions:
|
| - maybe other name than decayed could be found
|
| - isn't parameter passing suboptimal for e.g.
| boost::make_pair(0, 0)?

by suboptimal you mean performance-wise?

| - following compiles:
|
| struct ABC {
| explicit ABC(int) {}
| };
| std::pair<ABC, ABC> p5 = boost::make_pair(1, 2);
| std::pair<ABC, ABC> p5 = std::make_pair(1, 2); // also compiles
|
| Maybe the boost::make_pair could be coded
| somehow to disable this behavior (ABC constructor
| is explicit).

maybe, I do think a new make_pair() should be backwards compatible.

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk