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

List:       kdevelop-devel
Subject:    Re: policy on c++11 in source code
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2011-10-18 6:49:53
Message-ID: 20111018064953.GB10513 () barmbek
[Download RAW message or body]

On 17.10.11 23:11:51, Nicolás Alvarez wrote:
> 2011/10/17, Henry Miller <hank@millerfarm.com>:
> > Do we wish to allow C++11 constructs in kevelop code at this time?  This is
> > the new standard, and it has a lot of nice things, but not all systems are
> > ready for it yet, so I think we might want to hold off on requiring to for
> > our
> > source code.
> >
> > I'm trying to compile git on freebsd, which uses an old version of gcc (4.1)
> > by default, for licensing reasons: GPLv3 is not allowed.  CLang is the long
> > term replacement, but it isn't quite ready.
> >
> > I've seen a few errors where >> was used to close templates.
> > QVector<QPair<foo,bar>> for example.  Adding a space in the >> is trivial,
> > and
> > allows support for older compilers.  I can send patches, but only if they
> > are
> > likely to be accepted.
> >
> > Don't be confused, I think we should support all the features for writing
> > code.   However I think it best to wait a few years before using those new
> > features ourselves.
> 
> With gcc, KDevelop is being compiled with -std=c++0x (if supported!)
> in order to get std::unordered_map. If the compiler is old or not gcc,
> then the buildsystem disables c++0x  and uses an alternative to
> unordered_map.
> 
> The problem is that this means most of us are compiling KDevelop with
> c++0x enabled, and if someone *accidentally* uses C++0x features, such
> as >> for templates, we won't even *notice*, since the compiler won't
> complain.
> 
> Feel free to post patches to make KDevelop compilable without C++0x.
> Speaking for myself, I would accept them.
> 
> ...unless a project maintainer speaks up deciding that c++0x is
> officially allowed in the codebase.

I'm with Nicolas here (whatever my opinion counts for at this point :),
in particular I'm pretty sure that the '>>' closing was just an accident
not noticed due to not seeing an error produced by it.

Personally I wasn't even aware that C++2011 supports the closing without
the whitespace :)

Andreas
 

-- 
KDevelop-devel mailing list
KDevelop-devel@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel

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

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