Articles contenant le tag C++11

Moving an object that wraps a vector and an iterator on that vector

I recently stumbled upon code that looked very suspicious to me. Basically, it was a class which amongst other things held a vector and some iterators from that vector. Something like this: struct Wrapper {     typedef std::vector<int> Data;     Data data;     Data::iterator active;     Wrapper() :         data(),         active(data.end())     { } […]

, ,

Pas de commentaire

Installing GCC 4.7 in Ubuntu 12.04

Ubuntu 12.04 provides only GCC 4.6. To get GCC 4.7 (and its more advanced C++11 support), you need either to use Ubuntu 12.10 or you need to add a toolchain test repository. This page summarizes the latter option. To install GCC 4.7 in Ubuntu 12.04, do the following: sudo -s add-apt-repository ppa:ubuntu-toolchain-r/test apt-get update apt-get […]

, , ,

Pas de commentaire