Linked Questions
10 questions linked to/from What are the differences between -std=c++11 and -std=gnu++11?
89
votes
7
answers
88k
views
What is the default C -std standard version for the current GCC (especially on Ubuntu)?
When I ask to see the current version of cc I get this.
$ cc --version
cc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source ...
12
votes
3
answers
12k
views
getting c++11 - compliant compiler
This all seems like a colossal mess.
All I want is a compiler that implements C++11, so I can use <chrono>. But I'm so confused from the very beginning.
Currently, I build programs by invoking ...
11
votes
1
answer
26k
views
C++ compiler: 'class std::vector<std::vector<char> >' has no member named 'emplace_back'
I'm getting error from the compiler when coding C++. Here is my code:
#include <iostream>
#include <algorithm>
#include <typeinfo>
#include <string>
#include <...
7
votes
1
answer
9k
views
How to tell scons to use the C++11 standard
I don't manage to find how to tell scons to accept c++11 standard:
the SConstruct file:
env=Environment(CPPPATH='/usr/include/boost/',
CPPDEFINES=[],
LIBS=[],
...
1
vote
1
answer
4k
views
warning: decomposition declaration only available with -std=c++1z or -std=gnu++1
I've got this warning:
warning: decomposition declaration only available with -std=c++1z or -std=gnu++1
for this code:
#include<algorithm>
#include<vector>
int main(){
std::vector<...
1
vote
2
answers
2k
views
std::vector<std::unique_ptr<int> > does not compile
When I declare a vector of unique_ptr's, I get this kind of error:
d:\qt\mingw64\include\c++\4.8.0\bits\stl_construct.h:75: error:
use of deleted function 'std::unique_ptr<_Tp, _Dp>::unique_ptr(...
0
votes
1
answer
3k
views
Compiling CImg with c++0x and MingW
I am trying to compile the following CImg sample code with std=c++0x and MingW:
#include "CImg.h"
using namespace cimg_library;
int main() {
CImg<unsigned char> img(640,400,1,3);
img....
5
votes
1
answer
627
views
unordered_multimap different behavior in gnu++11 and c++0x
I have the following program compiled at different compiler,and get different behavior ,
Source :
#include <iostream>
#include <sstream>
#include <unordered_map>
using namespace ...
1
vote
1
answer
1k
views
Is g++ different than g++ -std=c++14 when the default standard is 201402L (c++14)?
I was trying to make use of precompiled headers to speed up compilation following this link: https://codeforces.com/blog/entry/53909
I observed that pre-compilation of headers and subsequent ...
-1
votes
2
answers
596
views
Error "is_enum not declared in this scope" when trying to compile my wxWidgets program
The G++ compiler shows the following errors when I try to compile:
C:\wx\include\wx\strvararg.h|350|error: 'is_enum' in namespace 'std' does not name a template type|
C:\wx\include\wx\strvararg.h|354|...