[Nfd-dev] Using (some features of) C++11

Junxiao Shi shijunxiao at email.arizona.edu
Sun Oct 19 08:50:51 PDT 2014


Hi Davide

C++03 code can be compiled with C++11 compiler. Forcing dependent projects
to use C++11 only requires them to change Makefile or wscript, which is
trivial; there's no code change needed.

There's major performance benefit to make ndn-cxx compile in C++11
exclusively. The benefit mainly comes from move constructors, either used
directly or used indirectly from STL.

Yours, Junxiao

On Sun, Oct 19, 2014 at 8:45 AM, Davide Pesavento <davide.pesavento at lip6.fr>
wrote:

> On Sun, Oct 19, 2014 at 5:28 PM, Junxiao Shi
> <shijunxiao at email.arizona.edu> wrote:
> > Hi Davide
> >
> > I would say: ndn-cxx, NFD, and all other projects depending on ndn-cxx
> > should be compiled exclusively in C++11 mode.
> > We have never used C++98 mode. Currently we are using C++03 mode.
>
> C++98 and C++03 are the same thing.
>
> >
> > It's unnecessary for ndn-cxx to keep C++03 compatibility, for the
> following
> > reasons:
> >
> > ndn-cxx and projects depending on it are almost useless without NFD
> running
> > on the same machine.
> >
> > "almost": ndn-cxx's Face needs NFD. Few applications don't use Face:
> tlvdump
> > is an example.
> >
> > When NFD is running on the same machine, the platform must have a C++11
> > compiler, so ndn-cxx and other projects can be compiled in C++11 mode.
> > Performance benefits of C++11 (mainly from move constructor) are severely
> > limited when ndn-cxx wants to keep C++03 compatibility.
> >
>
> Personally, I agree. However I believe we were concerned about
> third-party applications compiling and linking against ndn-cxx, and
> that we didn't want to force C++11 onto them.
>
> >
> > Yours, Junxiao
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20141019/8a29a9eb/attachment.html>


More information about the Nfd-dev mailing list