Eli Bendersky
2013-Jan-11 19:08 UTC
[LLVMdev] Using C++'11 language features in LLVM itself
>> I suppose this tradeoff can be evaluated by looking at the delta >> between 4.5 and 4.6 which is actually supported by MSVC 2010 and Clang >> 3.1 > > Makes perfect sense to me. > > -ChrisAccording to http://gcc.gnu.org/projects/cxx0x.html, these features are available from 4.6 (language features only): - Null pointer constant - Forward declarations for enums - Generalized constant expressions - Unrestricted unions - Range-based for - Defining move special member functions - Allowing move constructors to throw Eli
Justin Holewinski
2013-Jan-11 19:15 UTC
[LLVMdev] Using C++'11 language features in LLVM itself
On Fri, Jan 11, 2013 at 2:08 PM, Eli Bendersky <eliben at google.com> wrote:> >> I suppose this tradeoff can be evaluated by looking at the delta > >> between 4.5 and 4.6 which is actually supported by MSVC 2010 and Clang > >> 3.1 > > > > Makes perfect sense to me. > > > > -Chris > > According to http://gcc.gnu.org/projects/cxx0x.html, these features > are available from 4.6 (language features only): > > - Null pointer constant > - Forward declarations for enums > - Generalized constant expressions > - Unrestricted unions > - Range-based for > - Defining move special member functions > - Allowing move constructors to throw >Of those, looks like only null_ptr is reasonably supported in MSVC 2010. Oh well...> > Eli >-- Thanks, Justin Holewinski -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130111/c3007e05/attachment.html>
Sebastian Redl
2013-Jan-11 19:32 UTC
[LLVMdev] Using C++'11 language features in LLVM itself
On 11.01.2013, at 20:08, Eli Bendersky wrote:>>> I suppose this tradeoff can be evaluated by looking at the delta >>> between 4.5 and 4.6 which is actually supported by MSVC 2010 and Clang >>> 3.1 >> >> Makes perfect sense to me. >> >> -Chris > > According to http://gcc.gnu.org/projects/cxx0x.html, these features > are available from 4.6 (language features only): > > - Null pointer constantThis is the only one fully supported by VS 2010.> - Forward declarations for enumsThis is partially supported. I don't know the exact extent.> - Generalized constant expressions > - Unrestricted unions > - Range-based for > - Defining move special member functions > - Allowing move constructors to throwThese are all unsupported. So the question is, is nullptr worth requiring 4.6. Sebastian
Michael Spencer
2013-Jan-11 19:38 UTC
[LLVMdev] Using C++'11 language features in LLVM itself
On Fri, Jan 11, 2013 at 11:32 AM, Sebastian Redl <sebastian.redl at getdesigned.at> wrote:> > On 11.01.2013, at 20:08, Eli Bendersky wrote: > >>>> I suppose this tradeoff can be evaluated by looking at the delta >>>> between 4.5 and 4.6 which is actually supported by MSVC 2010 and Clang >>>> 3.1 >>> >>> Makes perfect sense to me. >>> >>> -Chris >> >> According to http://gcc.gnu.org/projects/cxx0x.html, these features >> are available from 4.6 (language features only): >> >> - Null pointer constant > > This is the only one fully supported by VS 2010. > >> - Forward declarations for enums > > This is partially supported. I don't know the exact extent. > >> - Generalized constant expressions >> - Unrestricted unions >> - Range-based for >> - Defining move special member functions >> - Allowing move constructors to throw > > These are all unsupported. > > So the question is, is nullptr worth requiring 4.6. > > Sebastiannullptr fixes a bug with 2010's implementation of std::pair. std::pair<int*, int*> a = std::make_pair(0, 0); That doesn't work in 2010 :( (It was actually a bug in the standard draft at the time 2010 came out) - Michael Spencer