Windyland serving my blog

Compiler Support on Modern C++

Foreword

In my previous post , I listed the C++11 and C++14 status of some common compilers. Here I am coming to do a more practical and complete study on C++11 (and C++14 if possible).

Okay, Let’s begin

Compilers

Notably, GCC C++, Clang C++, IBM C++, and Microsoft C++ already implement most or all C++11 features:

In additions, their belonging library:

  • libstdc++ status
  • libc++ status page is removed for the support is completed

C++11 Features

There are two parts making a complete C++11 support, namely compiler support and library one.

A detailed table for similar purpose inf different C++11 Features of c++ compiler is made at wiki.appache.org last updated at 2013, or visit cpprocks one

C++11 STL Support

  • libstdc++4.8 has incomplete and buggy std::regex, which is completed in 4.9.
  • libc++ has been completed for a quite a long time (about a year).

  • to be completed

Projects in C++11

  • CAF https://github.com/actor-framework
  • boost https://github.com/boostorg/boost

Projects coworks under both of C++03 and C++11

  • boost https://github.com/boostorg/boost
  • intel tbb

C++14 and its succeeder, C++17

C++14

A detailed table for similar purpose inf different C++14 Features of c++ compiler is made or visit italiancpp.org one, or visit cpprocks one

Although clang 3.4 has c++14 features complete, some c++14 users claims that clang 3.4 has full support for C++14, it has several C++14-related bugs that are fixed in 3.5. view more

C++17

clang has named experimental c++17 support to c++1z, and gcc follows

  • ISO Roadmap https://isocpp.org/std/status

Some words on c++11

you might wanna use -std=c++11 instead of -std=c++0x for a real C++11 support (gcc 4.8+, clang 3.3+ and etc)

you might wanna use -std=c++14 instead of -std=c++1y for a real C++14 support (gcc 5.0+, clang 3.5+ and etc)

TL’DR

For a complete c++11-feature support, please use:

  • gcc 4.8.1 or later, (for regex library please use gcc 4.9)
  • clang 3.3 or later
  • MSVC 2014 CTP1+ or latest
  • Inter C++ 15.0 or later

How to start up with a project

  1. Take a glimpse at READMEs, HACKINGs, documents and wikis
  2. Grep the bug list, and see if anything interests you.Also you can look for easy diagnostic bugs. Pick one or two, learn how to reproduce a bug, understand it and try to fix it.

If a bug has been assigned and you’re interested, I suggest contacting the assignee. They might be happy to offload the work and assist you with the fix.

  1. Read through header files, test cases and then source files

Thanks to the discussion of cfe-dev

llvm.cc is up

A new site, namely llvm.cc, is up now.

However I cannot affort a authored SSL certificate currently. If you prefer to HTTPS, please add an exception for https://llvm.cc or visit http://ssl.llvm.cc to grab our self-signed CA certificate. Thanks!

Why TDD? A draft

Reasoning:

  • Pro: Why TDD

    • A significant advantage of TDD is that it enables you to take small steps when writing software.
  • Con: Less is More

    • The tests are code. Developers write code. When developers write code they insert about three system-affecting bugs per thousand lines of code.

Different Kinds of tests

References:

Some notes on swift

##Use it

  • Download Xcode 6 Beta 3 link

Edited: Requirement of a valid iOS/Mac Developer Program is not needed see more

  • Soft link swift program to your PATH

    ln -sf /Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift /usr/local/bin/swift

####Switch to Xcode 6 as default (optional)

  • You can xcode-select /Applications/Xcode6-Beta.app/Contents/Developer, if you want
  • and you would use xcrun swift instead of the soft link after that.

##Quicklook

##Deeplook

##Document

  • The Swift Programming Language Book online iBook
  • Using Swift with Cocoa and Objective-C pdf iBook

##Community