1 |
On Tue, 30 Jan 2007 11:11:20 -0500 (EST) "Caleb Tennis" |
2 |
<caleb@g.o> wrote: |
3 |
| > * Hard dep upon boost. This sucks for g++-4.1 users. |
4 |
| > |
5 |
| > * Hard dep upon g++-4.1, which isn't available for all archs. This |
6 |
| > doesn't even work because there's no guarantee that >=4.1 is being |
7 |
| > used even if it's installed. |
8 |
| |
9 |
| I don't think these are necessarily compatible. tr1 is implemented |
10 |
| in the std::tr1, while I think everything in boost is just in the |
11 |
| boost namespace (unless this has changed since I've used boost). |
12 |
| This would mean that the project code itself would have to have the |
13 |
| logic to decide which set of headers to use. I'm guessing most |
14 |
| probably won't have the compatibility code to make that accessment, |
15 |
| though some may. |
16 |
|
17 |
Everything I've seen that uses tr1 can also use boost. The |
18 |
compatibility code is just something like: |
19 |
|
20 |
#include <boost/shared_ptr.hpp> |
21 |
|
22 |
namespace std |
23 |
{ |
24 |
namespace tr1 |
25 |
{ |
26 |
using boost::shared_ptr; |
27 |
using boost::enable_shared_from_this; |
28 |
using boost::static_pointer_cast; |
29 |
// and anything else that's necessary |
30 |
} |
31 |
} |
32 |
|
33 |
It's not exactly difficult to do... |
34 |
|
35 |
-- |
36 |
Ciaran McCreesh |
37 |
Mail : ciaranm at ciaranm.org |
38 |
Web : http://ciaranm.org/ |
39 |
Paludis, the secure package manager : http://paludis.pioto.org/ |