On 08/01/2012 23:30, Murray Cumming wrote: > On Sat, 2012-01-07 at 22:15 +0800, Chow Loong Jin wrote: >> On 06/01/2012 21:21, Murray Cumming wrote: >>> Instead of checking for particular compiler versions, we would generally >>> add a test that is run during configure time. That would test for the >>> compiler capability. There are already several tests like this in >>> libsigc++. >> >> That's not quite enough -- the type_trait specialization is supposed to go into >> a header (sigc++/functors/functor_trait.h looks appropriate) that users of the >> library will be including. >> >> If we add C++11-specific code there, we will break compilation for everyone who >> uses sigc++ and doesn't compile their application/library with -std=c++0x. > > And I guess that it's onsidered acceptable to use -std=c++0x with a > library that was not compiled with that option? Then, yes, that does > mean that a configure check won't be enough. I think it's acceptable as long as we're not passing C++ std:: classes between the header and the library, or to the user. Does sigc++ do that? At least one case where the std::class is binary incompatible is std::list, which apparently gets a data member added so that size() becomes O(1). This change is apparently in GCC 4.7. -- Kind regards, Loong Jin
Attachment:
signature.asc
Description: OpenPGP digital signature