The c++11 tag has no wiki summary.
2
votes
2answers
234 views
New C++11 analogous to python 2 ->3?
I'm a Python2 developer and I just ordered The C++ programming language, 4th edition, from Bjarne Stroustrup's, to learn C++11. But right after I ordered it, I started to wonder if I made a mistake. ...
-1
votes
0answers
50 views
How do I have a user cin an integer and convert it to binary so that the appropriate 0's and 1's are stored in a vector? [closed]
I'm trying to create a BinaryInteger class that mimics the way integers are stored in a computer, but which represents negative numbers in the ‘sign and magnitude’ form (i.e., the binary ...
6
votes
2answers
210 views
Would Task-based programming in C++ require new language standard features?
So I saw this video on Youtube with all these C++ masters on GoingNative 2012 : Interactive panel where everybody could ask the questions.
This is the video I was talking about: GoingNative 2012 - ...
0
votes
3answers
200 views
Two-Dimensional vector in C++ – inefficient with dynamic-sized sub vectors?
I know that std::vector uses a contiguous block of memory, but I often see people use vectors of vectors, even when they modify the number of elements in these vectors contained within an outer ...
-2
votes
1answer
265 views
How can I learn to like C++? [closed]
I'm a wimpy web programmer by trade -- I enjoy programming in JavaScript, CoffeeScript, TypeScript, and Ruby.
I have to program in C++ for my computer science degree, and it frustrates me. I don't ...
21
votes
3answers
2k views
Is GCC dying without threads support on Windows?
I need some opinion. GCC was always a very good compiler, but recently it is losing "appeal".
I have just found that on Windows GCC does not have std::thread support, forcing Windows users to use ...
7
votes
2answers
382 views
Using scoped enums for bit flags in C++
An enum X : int (C#) or enum class X : int (C++11) is a type that has a hidden inner field of int that can hold any value. In addition, a number of predefined constants of X are defined on the enum. ...
14
votes
1answer
930 views
Motivation and pitfalls (?) of the auto keyword in C++11
I was recently wondering why the keyword auto was chosen in C++11 to mark a variable whose type must be inferred by the compiler, like in
auto x = 1;
Since
var seems more common in other ...
65
votes
12answers
5k views
Does auto make C++ code harder to understand?
I saw a conference by Herb Sutter where he encourages every C++ programmer to use auto.
I had to read C# code some time ago where var was extensively used and the code was very hard to ...
3
votes
2answers
281 views
How do .so files avoid problems associated with passing header-only templates like MS dll files have?
Based on the discussion around this question. I'd like to know how .so files/the ELF format/the gcc toolchain avoid problems passing classes defined purely in header files (like the std library). ...
13
votes
3answers
808 views
Did C++11 address concerns passing std lib objects between dynamic/shared library boundaries? (ie dlls and so)?
One of my major complaints about C++ is how hard in practice it is to pass std library objects outside of dynamic library (ie dll/so) boundaries.
The std library is often header-only. Which is great ...
3
votes
2answers
251 views
Simplifying C++11 optimal parameter passing when a copy is needed
It seems to me that in C++11 lots of attention was made to simplify returning values from functions and methods, i.e.: with move semantics it's possible to simply return heavy-to-copy but ...
27
votes
4answers
3k views
How to make the switch to C++11?
I've been programming in C++ for a while now, but mostly things centered around the low-level features of C++. By that I mean mostly working with pointers and raw arrays. I think this behavior is ...
5
votes
1answer
471 views
C++11 support for higher-order list functions
Most functional programming languages (e.g. Common Lisp, Scheme / Racket, Clojure, Haskell, Scala, Ocaml, SML) support some common higher-order functions on lists, such as map, filter, takeWhile, ...
8
votes
5answers
961 views
How do you pronounce the '…' operator [closed]
Now, in c++ '...' became a first class operator.
In speech, how do you pronounce it?
So far I've heard:
dot dot dot
triple dot
ellipsis
related: Is it OK to replace ... with ellipsis in writing?
...
3
votes
3answers
481 views
How to setup the c++ rule of three in a virtual base class
I am trying to create a pure virtual base class (or simulated pure virtual)
my goal:
User can't create instances of BaseClass.
Derived classes have to implement default constructor, copy ...
3
votes
3answers
428 views
What is use of universal character names in identifiers in C++
The C++ standard (I noticed it in the new one, but it did already exist in C++03) specifies universal character names, written as \uNNNN and \UNNNNNNNN and representing the characters with unicode ...
9
votes
5answers
2k views
I am a beginner. Can I directly start learning C++11? or I have to learn old C++?
I am a beginner and have only little knowledge about programming.
Would it be good if I directly learn C++ from books which cover new C++11 or should I study through the old best C++ books?
Should I ...
1
vote
2answers
443 views
Can a compiled C++11 library (lib,dll,etc.) be linked in older C++ compilers?
Could older C++ compilers (e.g. VS2008 and gcc3.4) link with external libraries written in C++11?
My thought is that the C++11 .lib files are just byte code at this stage, and it shouldn't bother the ...
2
votes
1answer
384 views
Using captured non-local variables in C++ closures
On this wikipedia page I have found the following sentence regarding closures in C++11:
C++11 closures can capture non-local variables by copy or by reference, but without extending their ...
3
votes
5answers
231 views
What tool sets and applications have affinity with multiprocessor programming?
In grad school I took a class in multiprocessor and distributed operating systems. I think multiprocessor software development will become increasingly important and will be driven by the need to ...
2
votes
4answers
537 views
C++ Iterator lifetime and detecting invalidation
Based on what's considered idiomatic in C++11:
should an iterator into a custom container survive the container itself being destroyed?
should it be possible to detect when an iterator becomes ...
6
votes
5answers
2k views
Should I use the new C++11 'auto' feature, especially in loops?
What are the pros/cons to using the auto keyword, especially in for loops?
for(std::vector<T>::iterator it = x.begin(); it != x.end(); i++)
{
it->something();
}
...
8
votes
1answer
982 views
C++11 includes std::stoi, why not std::itos?
I noticed to my glee that C++11 has a std stoX family of functions for easily unpacking ints/floats/longs whatever from strings. I'm surprised however, that the opposite isn't implemented. Why didn't ...
7
votes
5answers
641 views
What is a good way to represent a many-to-many relationship between two classes?
Let's say I have two object types, A and B. The relationship between them is many-to-many, but neither of them is the owner of the other.
Both A and B instances need to be aware of the connection; ...
10
votes
2answers
793 views
Best overview to modern C++ paradigms?
I used to write C++ extensively between 8 and 10 years ago. I have since moved on to C# for professional reasons. However, from time to time I see statements like
"If you're still manually ...
10
votes
2answers
10k views
What are good books for learning C++11? [closed]
I'm just starting to get interested in C++11 (late I know). Does anyone have any recommendations for books available that cover the new features in depth?
7
votes
3answers
666 views
Achieving forward compatibility with C++11
I work on a large software application that must run on several platforms. Some of these platforms support some features of C++11 (e.g. MSVS 2010) and some don't support any (e.g. GCC 4.3.x). I ...
4
votes
6answers
670 views
Why is C++ backward compatibility important / necessary? [closed]
As far as I understand it is a wide-spread opinion within the C++ community that certain features of C++ (including some features inherited directly from C), while still usable in themselves, do not ...
45
votes
3answers
4k views
Is C++11 Uniform Initialization a replacement for the old style syntax?
I understand that C++11's uniform initialization solves some syntactical ambiguity in the language, but in a lot of Bjarne Stroustrup's presentations (particularly those during the GoingNative 2012 ...
23
votes
9answers
8k views
std::shared_ptr as a last resort?
I was just watching the "Going Native 2012" streams and I noticed the discussion about std::shared_ptr. I was a bit surprised to hear Bjarne's somewhat negative view on std::shared_ptr and his comment ...
2
votes
1answer
218 views
Is it good design to require class users to use Rvalue reference
I have the following situation where I have a base class and multiple polymorphics derived classes:
#include <iostream>
class Base {
public:
virtual void foo() = 0;
};
class ...
15
votes
9answers
11k views
Why would I learn C++11, having known C and C++?
I am a programmer in C and C++, although I don't stick to either language and write a mixture of the two. Sometimes having code in classes, possibly with operator overloading, or templates and the oh ...
26
votes
6answers
4k views
What does the latest “C++ Renaissance” mean?
There's recently some voice about C++ renaissance, among which the most noteworthy one is from Herb Sutter, Chairman of the C++ Standard Committee. You can search for "C++ renaissance" on Google and ...
13
votes
1answer
8k views
Which compilers support what C++11 features?
If one wanted to start using C++11 features, where would one find detailed information on the features supported by the major compilers? Like "In version X we support move semantics now, but haven't ...
5
votes
3answers
985 views
Will there be any official LINQ like lambda based library for C++?
Given C++('11) has lambdas now, will there be any LINQ like higher order function library officially supported later? Is there any such library now being used in any production level code?
Obviously ...
2
votes
3answers
454 views
Is C++0x Compatible with C?
I have heard that there will be a lot of changes done in C++ because of the new standard (C++0x). My question is: What are the major changes, and will C++0x be compatible with C++ 98 and C ?
39
votes
12answers
2k views
Philosophy behind Undefined Behavior
C\C++ specifications leave out a large number of behaviors open for compilers to implement in their own way. There are a number of questions that always keep getting asked here about the same and we ...
3
votes
3answers
544 views
What is the necessity to go for lambda functions and expressions in C++?
What is the necessity to use lambda functions and expressions in C++?
Can you explain or show through examples how to use lambda functions and expressions?
I already gone through the related ...
6
votes
4answers
1k views
Will all compilers start supporting C++0x as soon as it is officially out?
It's sometimes frustrating to know that one particular feature is working in one compiler and not in another. Even after downloading latest gcc4.6 few weeks back some C++0x features are not working.
...
2
votes
1answer
143 views
Will the portions of Boost that are incorporated into the new C++ standard continue to be developed?
What will happen to the portions of the Boost library that are incorporated into the new C++ standard?
Will they continue to evolve and any changes be reincorporated into the standard which follows ...
17
votes
7answers
1k views
Deprecation considered harmful?
I've just been compiling some of my own code with the -std=c++0x flag in GCC, as I want to vaguely keep up with what all the young folks are doing (provided they stay of my lawn), and I ended up with ...
6
votes
3answers
781 views
Recommendations for C++ refresh? [closed]
As a seasoned C programmer, with some experience of C++ from way back (1990s), I've decided I'd like to get back up to speed with C++ again. Of course a lot has changed in the last 15 years or so ...


