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; };
to
{ typedef typename decay<decltype(true ? declval<_Tp>() : declval<_Up>())>::type type; };

How to install the compilers

g++

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++

clang++

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:
wget http://llvm.org/releases/3.1/llvm-3.1.src.tar.gz
tar -xzf llvm-3.1.src.tar.gz
cd llvm-3.1.src/tools
wget http://llvm.org/releases/3.1/clang-3.1.src.tar.gz
tar -xzf clang-3.1.src.tar.gz
mv clang-3.1.src clang
cd ../projects/
wget http://llvm.org/releases/3.1/compiler-rt-3.1.src.tar.gz
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
make
To install the builds
sudo make install

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

Comments

No comments yet.