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). According to Jan in that answer, the dynamic linker/loader only picks one version of such a class to load if its defined in two .so files. So if two .so files have two definitions, perhaps with different compiler options/etc, the dynamic linker can pick one to use.
Does auto make C++ code harder to understand?
I saw a conference by Herb Sutter where he encourages every C++ programmer to use auto
.
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
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. It is possible to cast the enum to its integer value and vice versa. This is all true in both C# and C++11.
Is GCC dying without threads support on Windows? [closed]
Closed 9 years ago.
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 vector. Won’t this lead to efficiency problems when an inner vector need to be resized as all the following vectors will have to have their elements moved as well?
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.
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. Are the changes made to C++ in C++11 analogous to how Python moved from 2 to 3 insofar as code significantly breaking and not being backwards compatible? Or is learning C++11 safe to do?
C++11 Header-only Library: in-class body vs. out-class body code?
This is an important question for me because it’s a one way road. I can’t refactor it the other way later on so any feedback matters and is appreciated…
C++11 Header-only Library: in-class body vs. out-class body code?
This is an important question for me because it’s a one way road. I can’t refactor it the other way later on so any feedback matters and is appreciated…