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

Re: [sc-dev] c++11 in sc



> "Range-based for loops" sounds like a very minor issue: it doesn't
> seem to me to be a strong justification for cutting off gcc-4.5. It
> might be prudent to stay more widely compatible if possible.

well, they make code more compact when iterating over stl containers:

for (auto const & element: container)
   process(element);

compared to

for (typename Container::iterator it = container.begin();
    it != container.end(); ++it)
   process(*it);


> I guess the crucial question is whether it would make life hard for
> any mac folks.

i've asked the llvm people on irc, who mentioned that for 10.6 we might
have to ship our own libc++, for >=10.7 they should be fine ... but
there is always 3.6, which will run on older versions ... however
building libc++ doesn't seem to be hard [1] ... in a way, i doubt that
apple updates their toolchain for 10.6, as of course they have an
interest that people buy their newest kitten ...

otoh, it really simplifies a lot of code as we can throw away a lot of
platform-specific code ...


> (Also it should be checked that it doesn't cause pain on windows, even
> if the compiler is said to handle it.)

victor is already compiling supernova, on win32

tim

[1]
http://thejohnfreeman.com/blog/2012/11/07/building-libcxx-on-mac-osx-10.6.html

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/