Re: gtkmm-extras



У сре, 02. 05 2007. у 22:38 +0200, Niko Demmel пише:

<snip>

> On the wiki you propose a general purpose shared pointer. What about
> boost::shared_ptr?

I assume you mean that the library could use it.
That's one possibility. In that case, the library would either
need to depend on boost completely, or pick all the dependancy
files necessary for shared_ptr and carry them along.

Boost as a dependency may sound ok, because this is a C++ library
after all and Boost is not just another library. However [*], I
don't see another need for Boost besides this ATM. We must also
take into account that GNOME application developers will want to
use this library, and may wish to propose the app as a GNOME
module one day. While we can hope that this lib may be acknowledged
as as an ok dependency, it will quite certainly not be the case
with Boost. On top of my head, I can say that Glom, Regexxer and
Nemiver have their own shared pointer implementation.

OTOH we can say that we require gcc 4.x+ which ships the version
of libstdc++ which includes tr1::shared_ptr. Not sure how good
would such a decision be for a library.

In any case, I think that no part of this API should expose
a function which requires or returns a shared pointer. We may use
it internally though, but that is where we can use our own.
We can then also offer it to the users to decide whether they'd
like to use it in their programs.

    Marko


[*] Btw I'd very much prefer to use something that's standard and
available everywhere but despite all the effort and talk and 
because of C++'s status as well boost, although available for easy
installation on most platforms / OS's / distros is *not* a standard
library. Practically until C++0X becomes reality Boost will remain
a choice only for application developers.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]