Supported compilers

cpplinq supports all major compilers that have implemented several key C++11 features: lambdas, auto, rvalue-refs, decltype, static_assert.

Unit tests pass for:

Unit tests don't compile but CppLinq seems to work

Unit tests problems with clang++ (v3.1)

Note: clang++ (v3.2) works fine. Unit tests don't pass with clang++ (v3.1). There is a known issue with the <chrono> header. However there is a fix for the problem, as described here.
  • Open the file /usr/include/c++/4.7/type_traits (this file is probably read-only so you first have to make it writable)
  • Go to line 1749
  • Change the line from
{ typedef decltype(true ? declval<_Tp>() : declval<_Up>()) type; };
{ typedef typename decay<decltype(true ? declval<_Tp>() : declval<_Up>())>::type type; };

How to install the compilers


You probably already have g++ on your Linux machine. If you don't have it you could use the apt-get tool to automatically install (or update it). Use the following command to get it on Ubuntu and Mint.
sudo apt-get install g++


You can use the apt-get tool, just like with g++. For clang++ the command would be:
sudo apt-get install clang++
If you want to build it yourself from sources, you could either use the current trunk or the last release.

To get the sources for clang v3.1:
tar -xzf llvm-3.1.src.tar.gz
cd llvm-3.1.src/tools
tar -xzf clang-3.1.src.tar.gz
mv clang-3.1.src clang
cd ../projects/
tar -xzf compiler-rt-3.1.src.tar.gz
mv compiler-rt-3.1.src compiler-rt
cd ../../
To build the sources
mkdir build
cd build
../llvm-3.1.src/configure -disable-assertions -enable-optimized
To install the builds
sudo make install

Last edited Mar 23, 2014 at 9:23 PM by marten_range, version 7


No comments yet.