[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: branches/KDE/4.8/kdemultimedia/kmix/core
From:       Christian Esken <christian () esken ! de>
Date:       2012-04-24 22:20:51
Message-ID: 1335306051.5766.19.camel () localhost
[Download RAW message or body]

Am Dienstag, den 24.04.2012, 23:22 +0200 schrieb André Wöbbeking:
> On Tuesday 24 April 2012 23:19:18 Christian Esken wrote:
> > Am Dienstag, den 24.04.2012, 23:05 +0200 schrieb André Wöbbeking:
> > > On Tuesday 24 April 2012 22:54:56 Christian Esken wrote:
> > > > SVN commit 1291545 by esken:
> > > > 
> > > > Fix crash after multiple volume changes
> > > > Backport to KDE4.8 branch (checking in last 2 files)
> > > > 
> > > >  M  +16 -16    ControlPool.cpp
> > > >  M  +11 -3     ControlPool.h
> > > > 
> > > > --- branches/KDE/4.8/kdemultimedia/kmix/core/ControlPool.h
> > > > #1291544:1291545
> > > > @@ -22,6 +22,13 @@
> > > > 
> > > >  #ifndef CONTROL_POOL_H
> > > >  #define CONTROL_POOL_H
> > > > 
> > > > +
> > > > +// std::shared_ptr
> > > > +#include <memory>
> > > > +#include <tr1/memory>
> > > 
> > > Did you really want to commit this?
> > 
> > Yes.
> 
> Is that portable? If not you could use Boost's shared_ptr.

Summary:
a) KDE requires GCC/G++ >= 4.2 [1]
b) std::tr1::shared_ptr is implemented since G++ 4.1 [2]
So I think, yes - it is portable in the context of KDE development.


Detailed explanation and references:
[1] http://techbase.kde.org/Archive:Getting_Started/Build/Requirements

AFAIK it is in the C++03 standard. The question is, is C++03 or boost
more portable (thinking of e.g. Solaris or FreeBSD). As [1] does not
specify a version for boost we cannot be sure about boost. 

[2] Actually it is very hard to find hard facts (gnu.org only specifies
tr1 implementation status of newest version and not when it was
implemented first). The best I found is an excerpt from
http://anteru.net/2008/09/01/260/ :
--- cut here ---
std::tr1::shared_ptr is part of the TR1 additions to the C++ STL. With
GCC, it is available either through #include <tr1/memory> (GCC 4.1) or
#include <memory> (GCC 4.3), the latter form works also on Windows (with
VS2008 SP1). If you want to be portable, try Boost, which uses the
vendor-provided solution if possible and falls back to a custom one if
no vendor solution was found. To use this, just include
<boost/tr1/memory.hpp>
--- cut again ---




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic