Gang Of Coders
Home
About Us
Contact Us
All C++11 Solutions on Gang of Coders
Total of 724 C++11 Solutions
C++11 introduced a standardized memory model. What does it mean? And how is it going to affect C++ programming?
C++
Multithreading
C++11
Language Lawyer
Memory Model
What is a smart pointer and when should I use one?
C++
Pointers
C++11
Smart Pointers
C++ Faq
What is move semantics?
C++
C++ Faq
C++11
Move Semantics
Why should I use a pointer rather than the object itself?
C++
C++11
Pointers
C++ Faq
What is a lambda expression in C++11?
C++
Lambda
C++11
C++ Faq
What are rvalues, lvalues, xvalues, glvalues, and prvalues?
C++
Expression
C++ Faq
C++11
What is the difference between 'typedef' and 'using' in C++11?
C++
C++11
Typedef
Using Declaration
push_back vs emplace_back
C++
Visual Studio-2010
Stl
C++11
Move Semantics
What does T&& (double ampersand) mean in C++11?
C++
C++11
Rvalue Reference
C++ Faq
Perfect Forwarding
What is std::move(), and when should it be used?
C++
C++11
Move Semantics
C++ Faq
Stdmove
What's the difference between constexpr and const?
C++
C++11
Constants
Constexpr
Are the days of passing const std::string & as a parameter over?
C++
C++11
What are Aggregates and PODs and how/why are they special?
C++
C++11
Aggregate
C++17
Standard Layout
When should I really use noexcept?
C++
C++11
Exception
Noexcept
What exactly is nullptr?
C++
Pointers
C++11
Nullptr
Is it possible to print a variable's type in standard C++?
C++
Variables
C++11
Typeof
Why is list initialization (using curly braces) better than the alternatives?
C++
C++11
Syntax
Initialization
List Initialization
What are the main purposes of using std::forward and which problems it solves?
C++
C++11
Rvalue Reference
C++ Faq
Perfect Forwarding
C++11 rvalues and move semantics confusion (return statement)
C++
C++11
Move Semantics
Rvalue Reference
C++ Faq
How do I pass a unique_ptr argument to a constructor or a function?
C++
Arguments
C++11
Unique Ptr
Returning unique_ptr from functions
C++
C++11
Unique Ptr
std::unique_lock<std::mutex> or std::lock_guard<std::mutex>?
C++
Multithreading
C++11
Mutual Exclusion
Stdmutex
What is std::promise?
C++
Multithreading
C++11
Promise
Standard Library
C++ template typedef
C++
Templates
C++11
Typedef
Compiling C++11 with g++
C++
C++11
G++
Flags
Pretty-print C++ STL containers
C++
Templates
C++11
Operator Overloading
Pretty Print
const vs constexpr on variables
C++
Variables
C++11
Constants
Constexpr
How to use range-based for() loop with std::map?
C++
C++11
For Loop
Dictionary
How do I activate C++ 11 in CMake?
C++11
Cmake
What are inline namespaces for?
C++
Namespaces
C++11
Inline Namespaces
C++11 reverse range-based for-loop
C++
C++11
Ranged Loops
When should you use constexpr capability in C++11?
C++
C++11
Constexpr
Start thread with member function
C++
Multithreading
C++11
Difference in make_shared and normal shared_ptr in C++
C++
C++11
Shared Ptr
Rule-of-Three becomes Rule-of-Five with C++11?
C++
Constructor
C++11
Rvalue Reference
Rule of-Three
Should we pass a shared_ptr by reference or by value?
C++
C++11
Boost
Shared Ptr
When is std::weak_ptr useful?
C++11
Shared Ptr
Weak Ptr
C++ Faq
Differences between unique_ptr and shared_ptr
C++
Pointers
C++11
Shared Ptr
Unique Ptr
How to make my custom type to work with "range-based for loops"?
C++
For Loop
C++11
Customization
A positive lambda: '+[]{}' - What sorcery is this?
C++
C++11
Lambda
Operator Overloading
Language Lawyer
Can C++ code be valid in both C++03 and C++11 but do different things?
C++
C++11
Language Lawyer
C++03
Meaning of = delete after function declaration
C++
Function
C++11
Declaration
Delete Operator
Why does C++11's lambda require "mutable" keyword for capture-by-value, by default?
C++
Lambda
C++11
Difference between angle bracket < > and double quotes " " while including header files in C++?
C++
C
C++11
Passing capturing lambda as function pointer
C++
C++11
Lambda
Function Pointers
Why doesn't C++ have a garbage collector?
C++
Garbage Collection
C++11
Is there any use for unique_ptr with array?
C++
C++11
Smart Pointers
Unique Ptr
Is std::unique_ptr<T> required to know the full definition of T?
C++
Visual Studio-2010
C++11
Stl
Unique Ptr
How is "int main(){(([](){})());}" valid C++?
C++
C++11
Lambda
Syntax
Error "undefined reference to 'std::cout'"
C++
C++11
Gcc
Cout
Why would I ever use push_back instead of emplace_back?
C++
C++11
Std
"unpacking" a tuple to call a matching function pointer
C++
Function Pointers
C++11
Variadic Templates
Iterable Unpacking
What is the 'override' keyword in C++ used for?
C++
C++11
Overriding
Range based loop: get item by value or reference to const?
C++
C++11
What does "default" mean after a class' function declaration?
C++
C++11
Default
Declaration
Keyword
to_string is not a member of std, says g++ (mingw)
C++
C++11
G++
Mingw
Tostring
Why can I not push_back a unique_ptr into a vector?
C++
Stl
C++11
Smart Pointers
Unique Ptr
What is "rvalue reference for *this"?
C++
C++11
Move Semantics
C++ Faq
Qualifiers
Can lambda functions be templated?
C++
Templates
Lambda
C++11
Is the 'override' keyword just a check for a overridden virtual method?
C++
C++11
Overriding
Virtual Functions
C++ Faq
Does static constexpr variable inside a function make sense?
C++
Static
C++11
Constexpr
How much is too much with C++11 auto keyword?
C++
Types
C++11
Type Inference
Auto
Is it possible to use std::string in a constexpr?
C++
C++11
Constexpr
Stdstring
Which kind of pointer do I use when?
C++
Pointers
C++11
Smart Pointers
C++ Faq
What exactly is std::atomic?
C++
Multithreading
C++11
Atomic
Can the use of C++11's 'auto' improve performance?
C++
Performance
C++11
Auto
std::vector performance regression when enabling C++11
C++
Performance
Gcc
C++11
Vector
How to remove from a map while iterating it?
C++
Map
C++11
What is std::decay and when it should be used?
C++
C++11
Standard Library
What is the correct way of using C++11's range-based for?
C++
C++11
Foreach
What breaking changes are introduced in C++11?
C++
C++11
Why is conversion from string constant to 'char*' valid in C but invalid in C++
C++
C
String
C++11
Char
Is local static variable initialization thread-safe in C++11?
C++
Thread Safety
C++11
How to automatically convert strongly typed enum into int?
C++
C++11
Strongly Typed-Enum
Undefined reference to static constexpr char[]
C++
C++11
Static Members
Constexpr
make_unique and perfect forwarding
C++
C++11
Variadic Templates
Unique Ptr
Perfect Forwarding
What is the point of noreturn?
C++
C++11
Attributes
Noreturn
Using generic std::function objects with member functions in one class
C++
Function
Function Pointers
C++11
Tr1
How do I call ::std::make_shared on a class with only protected or private constructors?
C++
C++11
Shared Ptr
How is "=default" different from "{}" for default constructor and destructor?
C++
C++11
User Defined-Functions
Default Constructor
Deleted Functions
Why use non-member begin and end functions in C++11?
C++
C++11
Stl
Iterator
Container Data-Type
How to enable C++11/C++0x support in Eclipse CDT?
C++
Eclipse
C++11
Eclipse Cdt
Can modern C++ get you performance for free?
C++
Performance
C++11
Move Semantics
C++14
What is the reason behind cbegin/cend?
C++
C++11
Iterator
Const Correctness
Const Iterator
What does auto&& tell us?
C++
C++11
Auto
Forwarding Reference
Lambda capture as const reference?
C++
C++11
Lambda
C++14
std::auto_ptr to std::unique_ptr
C++
C++11
Smart Pointers
Auto Ptr
Unique Ptr
How do I typedef a function pointer with the C++11 using syntax?
C++
C++11
Typedef
c++11 Return value optimization or move?
C++
C++11
Move
Return Value-Optimization
Rvo
public friend swap member function
C++
C++11
Friend
Copy and-Swap
Which Boost features overlap with C++11?
C++
Boost
C++11
Which C++ idioms are deprecated in C++11?
C++
C++11
C++ Faq
shared_ptr to an array : should it be used?
C++
C++11
Shared Ptr
Why does std::list::reverse have O(n) complexity?
C++
C++11
Stl
Linked List
What is the logic behind the "using" keyword in C++?
C++
C++11
Recursive lambda functions in C++11
C++
C++11
Lambda
C++ auto keyword. Why is it magic?
C++
Types
C++11
Auto
Can virtual functions have default parameters?
C++
C++11
C++03
Why can lambdas be better optimized by the compiler than plain functions?
C++
Optimization
C++11
Lambda
Compiler Optimization
How well is Unicode supported in C++11?
C++
Unicode
C++11
Move capture in lambda
C++
Lambda
C++11
Rvalue Reference
Arrow operator (->) in function heading
C++
C++11
Auto
Decltype
Does C++11, 14, 17 or 20 introduce a standard constant for pi?
C++
C++11
C++14
Language Lawyer
C++17
Why would I std::move an std::shared_ptr?
C++
C++11
Shared Ptr
Smart Pointers
Move Semantics
What's the difference between std::move and std::forward
C++
C++11
Perfect Forwarding
Why would anyone use set instead of unordered_set?
C++
Algorithm
Data Structures
C++11
Is the safe-bool idiom obsolete in C++11?
C++
C++11
Deprecated
C++ Faq
Safe Bool-Idiom
Using member variable in lambda capture list inside a member function
C++
Visual Studio-2010
Lambda
C++11
std::enable_if to conditionally compile a member function
C++
Templates
G++
C++11
The new syntax "= default" in C++11
C++
C++11
What happens to a detached thread when main() exits?
C++
Multithreading
C++11
Exit
Stdthread
Thread pooling in C++11
C++
Multithreading
C++11
Threadpool
Stdthread
std::function vs template
C++
Templates
C++11
Std Function
What does iota of std::iota stand for?
C++
Naming Conventions
C++11
C++11 std::threads vs posix threads
C++
Multithreading
C++11
Pthreads
Why should I avoid std::enable_if in function signatures
C++
Templates
C++11
Sfinae
Enable If
How can I reliably get an object's address when operator& is overloaded?
C++
C++11
Operator Overloading
Memory Address
Using smart pointers for class members
C++
C++11
Shared Ptr
Smart Pointers
Unique Ptr
When should I use std::thread::detach?
C++
C++11
Stdthread
What is the type of lambda when deduced with "auto" in C++11?
C++
Lambda
C++11
Typeof
Auto
How to enable C++11 in Qt Creator?
C++
Qt
C++11
Should I use std::function or a function pointer in C++?
C++
Function
C++11
Callback
Std
What are the advantages of using nullptr?
C++
C++11
Null
C++ Faq
Nullptr
What is this crazy C++11 syntax ==> struct : bar {} foo {};?
C++
C++11
What is the purpose of the "final" keyword in C++11 for functions?
C++
C++11
Final
Should I use virtual, override, or both keywords?
C++
C++11
Differences between std::make_unique and std::unique_ptr with new
C++
C++11
C++14
Smart Pointers
Unique Ptr
How do I use a custom deleter with a std::unique_ptr member?
C++
C++11
Move Semantics
Unique Ptr
std::function and std::bind: what are they, and when should they be used?
C++
C++11
Std Function
Stdbind
Generate random numbers using C++11 random library
C++
C++11
Random
Range
When to use std::forward to forward arguments?
C++
Templates
Forwarding
C++11
How do I terminate a thread in C++11?
C++
Multithreading
C++11
Optimizing away a "while(1);" in C++0x
C++
Loops
C++11
Language Lawyer
Undefined Behavior
What is the difference between packaged_task and async
C++
Multithreading
C++11
Stdasync
Packaged Task
How does std::tie work?
C++
C++11
Tuples
Check if a class has a member function of a given signature
C++
C++11
Templates
Sfinae
How do I expand a tuple into variadic template function's arguments?
C++
C++11
Arguments
Tuples
Is it smart to replace boost::thread and boost::mutex with c++11 equivalents?
C++
Multithreading
C++11
Boost
Mutex
error: use of deleted function
C++
Gcc
G++
C++11
Deleted Functions
What does the thread_local mean in C++11?
C++
Multithreading
C++11
Thread Local
Thread Local-Storage
Conveniently Declaring Compile-Time Strings in C++
C++
String
C++11
Metaprogramming
User Defined-Literals
How does std::forward work?
C++
C++11
What are the differences between -std=c++11 and -std=gnu++11?
C++
Gcc
C++11
Clang
initialize a vector to zeros C++/C++11
C++
C++11
How does #include <bits/stdc++.h> work in C++?
C++
Gcc
C++11
G++
Is returning by rvalue reference more efficient?
C++
C++11
Rvalue Reference
Is #pragma once part of the C++11 standard?
C++
C++11
Macros
Header Files
C++14
What can I do with a moved-from object?
C++
C++11
Variable Assignment
Swap
Move Semantics
Futures vs. Promises
C++
C++11
Promise
Future
Is there a downside to declaring variables with auto in C++?
C++
C++11
Type Inference
Auto
Why can I use auto on a private type?
C++
C++11
Auto
Private Members
Why can we use `std::move` on a `const` object?
C++
C++11
What is the advantage of using forwarding references in range-based for loops?
C++
Performance
For Loop
C++11
Move Semantics
When should std::move be used on a function return value?
C++
C++11
Move Semantics
C++0x has no semaphores? How to synchronize threads?
C++
Multithreading
Synchronization
C++11
Boost Thread
Is effective C++ still effective?
C++
C++11
Coding Style
Effective C++
What new capabilities do user-defined literals add to C++?
C++
C++11
User Defined-Literals
Is pass-by-value a reasonable default in C++11?
C++
Coding Style
C++11
Is a `=default` move constructor equivalent to a member-wise move constructor?
C++
C++11
Constructor
Default
Move Semantics
How to emulate C array initialization "int arr[] = { e1, e2, e3, ... }" behaviour with std::array?
C++
Arrays
Templates
Initialization
C++11
Is it possible to figure out the parameter type and return type of a lambda?
C++
Lambda
Metaprogramming
C++11
Traits
How can you iterate over the elements of an std::tuple?
C++
C++11
Iteration
Template Meta-Programming
Stdtuple
How can I efficiently select a Standard Library container in C++11?
C++
C++11
C++ Faq
Iterator Loop vs index loop
C++
Loops
C++11
Indexing
Iterator
Why does C++11 not support designated initializer lists as C99?
C++
C
C++11
Initialization
C99
How much is the overhead of smart pointers compared to normal pointers in C++?
C++
Performance
C++11
Smart Pointers
Is it safe to link C++17, C++14, and C++11 objects
C++
C++11
Linker
C++14
Abi
Choosing between std::map and std::unordered_map
C++
C++11
Hash
Map
Unordered Map
Is there actually a reason why overloaded && and || don't short circuit?
C++
C++11
Operator Overloading
Logical Operators
Short Circuiting
How can I pass std::unique_ptr into a function
C++
C++11
Unique Ptr
Move assignment operator and `if (this != &rhs)`
C++
C++11
Move Semantics
Move Assignment-Operator
Why do std::shared_ptr<void> work
C++
C++11
Shared Ptr
Do c++11 lambdas capture variables they don't use?
C++
Lambda
C++11
What's the best way to iterate over two or more containers simultaneously
C++
C++11
Iterator
Containers
Does constexpr imply inline?
C++
C++11
Inline
Standards Compliance
Constexpr
Modern way to filter STL container?
C++
C++11
Stl
Why is `std::move` named `std::move`?
C++
C++11
Move Semantics
Rvalue Reference
C++ Faq
What does static_assert do, and what would you use it for?
C++
Debugging
C++11
Assert
Static Assert
How would one call std::forward on all arguments in a variadic function?
C++
C++11
Variadic Templates
Rvalue Reference
Perfect Forwarding
using extern template (C++11)
C++
Templates
C++11
Extern
Does async(launch::async) in C++11 make thread pools obsolete for avoiding expensive thread creation?
C++
Multithreading
Asynchronous
C++11
Threadpool
Copy constructor for a class with unique_ptr
C++
C++11
Unique Ptr
Passing a std::array of unknown size to a function
C++
C++11
Stdarray
Why does this C++ snippet compile (non-void function does not return a value)
C++
Visual Studio-2012
C++11
Methods
Enforcing statement order in C++
C++
C++11
Operator Precedence
When to make a type non-movable in C++11?
C++
C++11
Move Semantics
C++ Faq
How do I enable C++11 in gcc?
C++11
G++
Using this pointer causes strange deoptimization in hot loop
C++
C++11
Optimization
Compiler Optimization
Strict Aliasing
Sequence-zip function for c++11?
C++
C++11
Sequences
std::shared_ptr thread safety explained
C++
C++11
Shared Ptr
Default initialization of std::array?
C++11
Initialization
Default Constructor
Stdarray
std::array vs array performance
C++
C++11
Stdarray
How can I output the value of an enum class in C++11
C++
C++11
Templates
Enums
Enum Class
Legality of COW std::string implementation in C++11
C++
String
C++11
Stdstring
Copy on-Write
Lambda capture and parameter with same name - who shadows the other? (clang vs gcc)
C++
C++11
Lambda
Language Lawyer
Shadowing
Does const mean thread-safe in C++11?
C++
C++11
Thread Safety
Constants
C++ Faq
How to succinctly, portably, and thoroughly seed the mt19937 PRNG?
C++
C++11
Random
Avoiding if statement inside a for loop?
C++
C++11
For Loop
Design Patterns
Is 1.0 a valid output from std::generate_canonical?
C++
C++11
Random
Constexpr vs macros
C++
C++11
Macros
Constexpr
std::next_permutation Implementation Explanation
C++
C++11
Permutation
Stl Algorithm
Lexicographic
Passing shared_ptr<Derived> as shared_ptr<Base>
C++
Casting
C++11
Shared Ptr
Smart Pointers
What is the difference between std::reference_wrapper and a simple pointer?
C++
Pointers
C++11
Reference
Reference Wrapper
c++0x: proper way to receive a lambda as parameter by reference
C++
Lambda
C++11
Function Prototypes
Function Parameter
Does C++11 unique_ptr and shared_ptr able to convert to each other's type?
C++
C++11
Shared Ptr
Unique Ptr
What does "return {}" statement mean in C++11?
C++
C++11
Return
Return Value
List Initialization
Is cout synchronized/thread-safe?
C++
Gcc
C++11
C++ terminate called without an active exception
C++
Multithreading
Deadlock
C++11
How to properly check if std::function is empty in C++11?
C++
C++11
Std Function
Explicit Return Type of Lambda
C++
Visual C++
Lambda
C++11
Visual C++-2012
Can an enum class be converted to the underlying type?
C++
C++11
What is the meaning of "... ..." token? i.e. double ellipsis operator on parameter pack
C++
C++11
Variadic Templates
Variadic Functions
What differences, if any, between C++03 and C++11 can be detected at run-time?
C++
C++11
C++03
Language Detection
Why is there no std::stou?
C++
String
C++11
Std
Removing item from vector, while in C++11 range 'for' loop?
C++
Vector
For Loop
C++11
Is it intended by the C++ standards committee that in C++11 unordered_map destroys what it inserts?
C++
Gcc
C++11
Clang
Standards
How to specialize std::hash<Key>::operator() for user-defined type in unordered containers?
C++
Hash
C++11
Unordered Map
Unordered Set
What exception classes are in the standard C++ library
C++
Exception
C++11
Stl
How do I write a maintainable, fast, compile-time bit-mask in C++?
C++
C++11
Bit Manipulation
Initializing a member array in constructor initializer
C++
C++11
Initializer List
Ctor Initializer
Aggregate Initialization
How does std::move() transfer values into RValues?
C++
C++11
Move Semantics
Can I list-initialize a vector of move-only type?
C++
C++11
Initializer List
Move Semantics
Random number generation in C++11: how to generate, how does it work?
C++
C++11
Random
C++ lambda with captures as a function pointer
C++
Lambda
Function Pointers
C++11
How to pass parameters correctly?
C++
C++11
How is std::function implemented?
C++
C++11
Lambda
How do I properly use std::string on UTF-8 in C++?
C++
String
C++11
C++ Modules - why were they removed from C++0x? Will they be back later on?
C++
C++11
Module
Standards
Language Extension
How to get duration, as int milli's and float seconds from <chrono>?
C++
C++11
Timer
Chrono
How can I avoid "for" loops with an "if" condition inside them with C++?
C++
C++11
C++14
Implementing comparison operators via 'tuple' and 'tie', a good idea?
C++
C++11
Operators
Tuples
Strict Weak-Ordering
initializer_list and move semantics
C++
Templates
C++11
Move Semantics
Initializer List
Member initialization while using delegated constructor
C++
Gcc
C++11
Ctor Initializer
C++11 emplace_back on vector<struct>?
C++
C++11
Why are preprocessor macros evil and what are the alternatives?
C++
C++11
C Preprocessor
error::make_unique is not a member of ‘std’
C++
C++11
Compiler Errors
C++14
Unique Ptr
C++0x lambda capture by value always const?
C++
Lambda
Constants
C++11
The new keyword "auto"; When should it be used to declare a variable type?
C++
C++11
Auto
Type Safety
Is there a range class in C++11 for use with range based for loops?
C++
C++11
Range
Std
Ranged Loops
Compile time string hashing
C++
Metaprogramming
C++11
Hash
Where is shared_ptr?
C++
Boost
C++11
Shared Ptr
Smart Pointers
In C++, is it still bad practice to return a vector from a function?
C++
C++11
Coding Style
Return Value-Optimization
How do I check for C++11 support?
C++
C++11
When to use std::begin and std::end instead of container specific versions
C++
C++11
When do I really need to use atomic<bool> instead of bool?
C++
C++11
Atomic
Stdatomic
C++ How do I convert a std::chrono::time_point to long and back
C++
C++11
Chrono
Difference between std::result_of and decltype
C++
C++11
Decltype
Result Of
Do rvalue references to const have any use?
C++
C++11
Constants
Rvalue Reference
Difference between C++03 throw() specifier C++11 noexcept
C++
Exception
C++11
Throw
Noexcept
Resolving ambiguous overload on function pointer and std::function for a lambda using + (unary plus)
C++
C++11
Lambda
Overloading
Can I implement an autonomous `self` member type in C++?
C++
C++11
Difference between std::system_clock and std::steady_clock?
C++
C++11
Timer
Chrono
Does C++11 have C#-style properties?
C#
C++
Class
C++11
C++11 lambda implementation and memory model
C++
Memory
Lambda
C++11
Is gcc 4.8 or earlier buggy about regular expressions?
C++
Regex
Gcc
C++11
Libstdc++
Is there a non-atomic equivalent of std::shared_ptr? And why isn't there one in <memory>?
C++
C++11
Smart Pointers
When to use the brace-enclosed initializer?
C++
C++11
Initializer List
How to get integer thread id in c++11
C++
Multithreading
C++11
How to enforce move semantics when a vector grows?
C++
Vector
C++11
Resize
Move Semantics
Is C++14 adding new keywords to C++?
C++
C++11
Keyword
C++14
Efficiency of C++11 push_back() with std::move versus emplace_back() for already constructed objects
C++11
Move Semantics
Push Back
Emplace
Visual Studio support for new C / C++ standards?
C++
Visual Studio
Visual C++
C++11
C99
What is a subnormal floating point number?
C++
C++11
Floating Point
Ieee 754
Should the trailing return type syntax style become the default for new C++11 programs?
C++
C++11
Auto
Trailing Return-Type
Is gcc std::unordered_map implementation slow? If so - why?
C++
Stl
C++11
Hashmap
Concurrenthashmap
Is it possible to determine the number of elements of a c++ enum class?
C++
C++11
Cardinality
Enum Class
Why do we copy then move?
C++
C++11
Move Semantics
How to check if a std::thread is still running?
C++
Multithreading
C++11
Stdthread
Get the status of a std::future
C++
Multithreading
C++11
Future
Why isn't std::initializer_list a language built-in?
C++
C++11
Std
Initializer List
What are the rules for the "..." token in the context of variadic templates?
C++
C++11
Variadic Templates
Why is auto_ptr being deprecated?
C++
C++11
Smart Pointers
Auto Ptr
What are the differences between concepts and template constraints?
C++
C++11
D
C++ Concepts
Why can't I capture this by-reference ('&this') in lambda?
C++
C++11
Lambda
Understanding std::atomic::compare_exchange_weak() in C++11
C++
Multithreading
C++11
Atomic
What does [=] mean in C++?
C++
C++11
Lambda
Function returning a lambda expression
C++
Function
C++11
Lambda
C++11: Number of Variadic Template Function Parameters?
C++
C++11
Variadic Templates
Variadic Functions
Passing shared pointers as arguments
C++
C++11
Shared Ptr
C++ Faq
Memory alignment : how to use alignof / alignas?
C++
C++11
X86 64
Memory Alignment
Computing length of a C string at compile time. Is this really a constexpr?
C++
C++11
Standards
Constexpr
String Literals
What would a std::map extended initializer list look like?
C++
C++11
Dictionary
Initializer List
Are C++11 thread_local variables automatically static?
C++
C++11
Thread Local-Storage
How do I combine hash values in C++0x?
C++
C++11
Boost
Hash
Std
How to declare a function that accepts a lambda?
C++
Lambda
C++11
Deprecation of the static keyword... no more?
C++
Static
C++11
Standards
Why can't I create a vector of lambdas (of the same type) in C++11?
C++
Vector
Lambda
C++11
cc1plus: error: unrecognized command line option "-std=c++11" with g++
C++
C++11
Compiler Errors
G++
Std
When is a private constructor not a private constructor?
C++
C++11
Language Lawyer
Default Constructor
Aggregate Initialization
Why do C++11-deleted functions participate in overload resolution?
C++
C++11
How can I sort two vectors in the same way, with criteria that uses only one of the vectors?
C++
C++11
Why is ++x a lvalue and x++ a rvalue?
C++
C++11
does `const auto` have any meaning?
C++
C++11
Constants
C++11 features in Visual Studio 2012
C++
Visual C++
C++11
Visual C++-2012
std::thread calling method of class
C++
Multithreading
C++11
How to pass std::unique_ptr around?
C++
C++11
Unique Ptr
How to display a progress indicator in pure C/C++ (cout/printf)?
C++
C
User Interface
C++11
Io
How to store variadic template arguments?
C++
C++11
Variadic Templates
unique_ptr to a derived class as an argument to a function that takes a unique_ptr to a base class
C++
Visual Studio-2012
C++11
Unique Ptr
When do extra parentheses have an effect, other than on operator precedence?
C++
C++11
Language Lawyer
Parentheses
C++ Faq
Does this code from "The C++ Programming Language" 4th edition section 36.3.6 have well-defined behavior?
C++
C++11
Language Lawyer
Operator Precedence
Unspecified Behavior
Default, value and zero initialization mess
C++
C++11
C++14
C++03
C++98
Pretty-print std::tuple
C++
C++11
Tuples
Variadic Templates
How does the range-based for work for plain arrays?
C++
Arrays
Foreach
C++11
Reusing a moved container?
C++
C++11
Move Semantics
Default member values best practice
C++
Constructor
C++11
Header Files
Default Value
C++11 allows in-class initialization of non-static and non-const members. What changed?
C++
Class
C++11
Initialization
Class Members
How to make a conditional typedef in C++
C++
C++11
What is the purpose of std::function, and how to use it?
C++
C++11
Lambda
Function Pointers
Std Function
Why does a lambda have a size of 1 byte?
C++
C++11
Lambda
C++14
Sizeof
What is const void?
C++
C++11
C++14
Using std::vector as view on to raw memory
C++
C++11
Vector
Stdvector
Why no default move-assignment/move-constructor?
C++
C++11
Move Semantics
Does C++11 allow vector<const T>?
C++
Vector
C++11
Constants
Error when using in-class initialization of non-static data member and nested class constructor
C++
C++11
Language Lawyer
Are the experimental features of modern C++ reliable for long-term projects?
C++
C++11
Portability
C++17
C++ Standard-Library
Narrowing conversions in C++0x. Is it just me, or does this sound like a breaking change?
C++
C++11
Survey
Aggregate Initialization
Now that we have std::array what uses are left for C-style arrays?
C++
Arrays
C++11
Initialization
What is the difference between C++0x and C++11?
C++
C++11
Is 'auto const' and 'const auto' the same?
C++
C++11
Language Lawyer
Constants
Auto
How std::unordered_map is implemented
C++
C++11
Hashmap
Unordered Map
Need iterator when using ranged-based for loops
C++
C++11
For Loop
Iterator
What are the correct link options to use std::thread in GCC under linux?
C++
Multithreading
G++
C++11
Set precision of std::to_string when converting floating point values
C++
String
C++11
Double
Floating
Proper way to create unique_ptr that holds an allocated array
C++
Linux
Gcc
C++11
Unique Ptr
Unicode encoding for string literals in C++11
C++
Unicode
C++11
Utf
String Literals
Is this a known pitfall of C++11 for loops?
C++
For Loop
C++11
Language Lawyer
Foreach
Outputting Date and Time in C++ using std::chrono
C++
Date
C++11
Time
Chrono
Can't use enum class as unordered_map key
C++
C++11
Map
Enums
Enum Class
Variadic template pack expansion
C++
Templates
C++11
Variadic Templates
Pass by value vs pass by rvalue reference
C++
C++11
C++14
If statement vs if-else statement, which is faster?
C++
Performance
C++11
Assembly
Microbenchmark
How to code a modulo (%) operator in C/C++/Obj-C that handles negative numbers
C++
C
C++11
Operator Overloading
Modulo
Does the C++ volatile keyword introduce a memory fence?
C++
Multithreading
C++11
Volatile
Unused parameter in c++11
C++
C++11
Unused Variables
Why can a const member function modify a static data member?
C++
Function
C++11
Static
Constants
Can I use C++11 with Xcode?
C++
Xcode
Gcc
C++11
Clang
Allow for Range-Based For with enum classes?
C++
For Loop
C++11
Enums
Is signed integer overflow still undefined behavior in C++?
C++
C++11
Undefined Behavior
Integer Overflow
Is 'float a = 3.0;' a correct statement?
C++
C++11
C++ chrono system time in milliseconds, time operations
C++
Time
C++11
Chrono
C++11 make_pair with specified template parameters doesn't compile
C++
Templates
G++
C++11
Rvalue Reference
Why is the C++ initializer_list behavior for std::vector and std::array different?
C++
Stl
C++11
Has the new C++11 member initialization feature at declaration made initialization lists obsolete?
C++
C++11
Constructor
Initialization
Declaration
Passing object by reference to std::thread in C++11
C++
Multithreading
C++11
Pass by-Reference
Stdthread
Why don't the official Qt examples and tutorials use smart pointers?
C++
Qt
C++11
How to detect C++11 support of a compiler with CMake
C++
C++11
Cmake
Enum vs Strongly typed enum
C++
C++11
Enums
Getting "source type is not polymorphic" when trying to use dynamic_cast
C++
C++11
What is the difference between an empty and a null std::shared_ptr in C++?
C++
C++11
Shared Ptr
Why is the new random library better than std::rand()?
C++
C++11
Random
c++11 regex slower than python
C++
Python
Regex
Performance
C++11
Can lambda functions be recursive?
C++
Recursion
C++11
Lambda
Using OpenMP with C++11 range-based for loops?
C++11
Openmp
Why does std::array not have an constructor that takes a value for the array to be filled with?
C++
C++11
Stdarray
What is the rationale for parenthesis in C++11's raw string literals R"(...)"?
C++
C++11
Standards
String Literals
Usage of std::forward vs std::move
C++
C++11
Move
Forward
shared_ptr and weak_ptr differences
C++
C++11
Shared Ptr
Weak Ptr
Cyclic Reference
How to typedef a template class?
C++
Templates
C++11
Typedef
C++11 auto: what if it gets a constant reference?
C++
Reference
C++11
Auto
C++11 thread-safe queue
C++
Multithreading
C++11
Queue
Condition Variable
C++11 When clearing shared_ptr, should I use reset or set to nullptr?
C++
C++11
Shared Ptr
Reset
Nullptr
Why should I use std::async?
C++
C++11
Asynchronous
Future
Stdasync
Correct way of looping through C++ arrays
C++
Arrays
Loops
C++11
Capturing a reference by reference in a C++11 lambda
C++
C++11
Lambda
Language Lawyer
How to iterate through a list of objects in C++?
C++
For Loop
C++11
Stl
Iterator
Is it possible to declare constexpr class in a header and define it in a separate .cpp file?
C++
C++11
Constexpr
Is there any case where a return of a RValue Reference (&&) is useful?
C++
C++11
Move Semantics
Rvalue Reference
C++11: why does std::condition_variable use std::unique_lock?
C++
Multithreading
C++11
Mutex
Does the range-based 'for' loop deprecate many simple algorithms?
C++
Algorithm
Stl
C++11
Foreach
How do I pass multiple ints into a vector at once?
C++
C++11
Vector
Push Back
why is `std::initializer_list` often passed by value?
C++
C++11
Is Bjarne wrong about this example of ADL, or do I have a compiler bug?
C++
C++11
Argument Dependent-Lookup
Is the default Move constructor defined as noexcept?
C++
C++11
Constructor
Move Semantics
Is unique_ptr guaranteed to store nullptr after move?
C++
C++11
Move Semantics
Unique Ptr
Error: variable "cannot be implicitly captured because no default capture mode has been specified"
C++
C++11
Lambda
Does 'auto' type assignments of a pointer in c++11 require '*'?
C++
Pointers
C++11
Auto
C++11 std::set lambda comparison function
C++
Stl
C++11
Lambda
Std Function
What is the difference between std::transform and std::for_each?
C++
C++11
Stl Algorithm
Using 'auto' type deduction - how to find out what type the compiler deduced?
C++
C++11
Auto
Chrono
Where is the lock for a std::atomic?
C++
C++11
X86
Atomic
Stdatomic
Why do I need to explicitly write the 'auto' keyword?
C++
C++11
Auto
How does one downcast a std::shared_ptr?
C++
C++11
Shared Ptr
Downcast
C++11 "auto" semantics
C++
C++11
C++11: How to alias a function?
C++
Linux
Gcc
C++11
Is the pass-by-value-and-then-move construct a bad idiom?
C++
C++11
Move Semantics
Pass by-Value
Rvalue Reference
Converting std::__cxx11::string to std::string
C++
String
C++11
Types
Std
Idiom for iterating "between each consecutive pair of elements"
C++
C++11
Idioms
Separator
Duplicate code using c++11
C++
C++11
Templates
Obtaining list of keys and values from unordered_map
C++
Vector
C++11
Std
Unordered Map
C++11: Correct std::array initialization?
C++
Arrays
C++11
Initialization
C++14
Should I assign or reset a unique_ptr?
C++
C++11
Smart Pointers
Unique Ptr
Is there a more efficient implementation for a bidirectional map?
C++
C++11
Data Structures
Map
Bimap
What do each memory_order mean?
C++
C++11
Thread Safety
Atomic
Memory Model
How to make generic computations over heterogeneous argument packs of a variadic template function?
C++
C++11
Iteration
Variadic Templates
Template Meta-Programming
What would be a "Hello, World!" example for "std::ref"?
C++
C++11
Std
Ref
When to use std::async vs std::threads?
C++
Multithreading
C++11
Stdasync
C++ view types: pass by const& or by value?
C++
C++11
Parameter Passing
Pass by-Reference
Pass by-Value
const& , & and && specifiers for member functions in C++
C++
C++11
Constants
Type of `this` in static member function?
C++
C++11
Language Lawyer
Why does unique_ptr take two template parameters when shared_ptr only takes one?
C++
C++11
Std
Shared Ptr
Unique Ptr
How to ensure that every method of a class calls some other method first?
C++
C++11
Is it possible to "store" a template parameter pack without expanding it?
C++
Templates
C++11
Variadic Templates
What is the lifetime of a C++ lambda expression?
C++
Lambda
C++11
Why doesn't emplace_back() use uniform initialization?
C++
Vector
C++11
Uniform Initialization
Difference between std::function<> and a standard function pointer?
C++
C++11
How to compile C++ with C++11 support in Mac Terminal
C++
Macos
C++11
Terminal
G++
Enable C++11 support on Android
Android
C++
C++11
How do you print a C++11 time_point?
C++
Templates
Time
C++11
Chrono
How to use bitmask?
C++
C++11
Bitmask
A lambda's return type can be deduced by the return value, so why can't a function's?
C++
Function
C++11
Lambda
Auto
enum vs constexpr for actual static constants inside classes
C++
C++11
Constexpr
Why would the behavior of std::memcpy be undefined for objects that are not TriviallyCopyable?
C++
C++11
Language Lawyer
Memcpy
Object Lifetime
Configuring the GCC compiler switches in Qt, QtCreator, and QMake
C++
Qt
C++11
Qt Creator
Split a string using C++11
C++
String
Split
C++11
How can I have multiple parameter packs in a variadic template?
C++
C++11
Variadic Templates
Create N-element constexpr array in C++11
C++
C++11
Constexpr
Array Initialization
Refactoring with C++ 11
C++
C++11
Refactoring
Why is value taking setter member functions not recommended in Herb Sutter's CppCon 2014 talk (Back to Basics: Modern C++ Style)?
C++
C++11
Stl
Clang doesn't see basic headers
C++
C++11
Clang
Clang++
Llvm Clang
Are there downsides to using std::string as a buffer?
C++
C++11
Stdstring
Why is the volatile qualifier used through out std::atomic?
C++
C++11
Atomic
Volatile
Initializing container of unique_ptrs from initializer list fails with GCC 4.7
C++
Compiler Errors
Initialization
C++11
Does moving a vector invalidate iterators?
C++
Iterator
C++11
Using libstdc++ compiled libraries with clang++ -stdlib=libc++
C++
C++11
Clang
Libstdc++
Libc++
std::fstream buffering vs manual buffering (why 10x gain with manual buffering)?
C++
File
C++11
Buffer
Fstream
C++11 std::to_string(double) - No trailing zeros
C++
Stl
C++11
Destructor called after throwing from a constructor
C++
Exception
C++11
What's the difference between std::advance and std::next?
C++
C++11
Std
Convert a vector<T> to initializer_list<T>
C++
C++11
Stl
Initializer List
When is it necessary to use the flag -stdlib=libstdc++?
C++
Gcc
C++11
Std
Libstdc++
How the new range-based for loop in C++17 helps Ranges TS?
C++
C++11
For Loop
C++17
Why do some people use swap for move assignments?
C++
C++11
Rvalue Reference
Move Semantics
Copy and-Swap
Is string::c_str() no longer null terminated in C++11?
C++
String
C++11
What is the performance penalty of C++11 thread_local variables in GCC 4.8?
C++
Linux
Multithreading
Gcc
C++11
How std::function works
C++
C++11
C++ Lambdas: Difference between "mutable" and capture-by-reference
C++
C++11
Lambda
What is decltype and how is it used?
C++
C++11
Decltype
Portable way of setting std::thread priority in C++11
C++
C++11
Portability
Stdthread
Thread Priority
What is the default hash function used in C++ std::unordered_map?
C++
C++11
Hash
Stl
Unordered Map
Extension methods in c++
C++
C++11
Should I switch from using boost::shared_ptr to std::shared_ptr?
C++
Boost
Stl
C++11
Shared Ptr
Concurrency: Atomic and volatile in C++11 memory model
C++
Multithreading
Concurrency
C++11
Parallel Processing
How to update GCC in MinGW on Windows?
C++
Gcc
C++11
Mingw
Difference between C++11 std::bind and boost::bind
C++
C++11
Boost
Boost Bind
Stdbind
How to implement multithread safe singleton in C++11 without using <mutex>
C++
Multithreading
C++11
Singleton
Atomic
How to convert a lambda to an std::function using templates
C++
Function
Templates
C++11
Lambda
C++ local variable destruction order
C++
C++11
Destructor
Local Variables
Why do I get the same sequence for every run with std::random_device with mingw gcc4.8.1?
C++
C++11
Random
Stl
What is the recommended way to align memory in C++11
C++
C++11
Dynamic Memory-Allocation
Memory Alignment
Strange code that compiles with g++
C++
Gcc
C++11
G++
C++11 initializer list fails - but only on lists of length 2
C++
C++11
Initializer List
Get Apple clang version and corresponding upstream LLVM version
C++11
Clang
C++14
Llvm Clang
C++17
constexpr vs. static const: Which one to prefer?
C++
C++11
Constants
Constexpr
Where can I learn more about C++0x?
C++
C++11
Reference Manual
Lambda expressions as class template parameters
C++
Templates
Lambda
C++11
GCC worth using on Windows to replace MSVC?
C++
Windows
Visual C++
Gcc
C++11
Using C++ base class constructors?
C++
Inheritance
Constructor
C++11
How to convert std::chrono::time_point to calendar datetime string with fractional seconds?
C++
Datetime
C++11
Std
Chrono
Why does std::map not have a const accessor?
C++
C++11
Std
What are the differences between C-like, constructor, and uniform initialization?
C++
C++11
Initialization
C++03
Variable Initialization
Why not call nullptr NULL?
C++
C++11
Language Design
Can using a lambda in header files violate the ODR?
C++
C++11
Lambda
Language Lawyer
One Definition-Rule
When does a constexpr function get evaluated at compile time?
C++
C++11
Runtime
Compile Time
Constexpr
Are lambdas inlined like functions in C++?
C++
C++11
Lambda
Stl
Lambda functions as base classes
C++
C++11
Lambda
In a lambda, does a by-value capture of a reference copy the underlying object?
C++
C++11
Lambda
void_t "can implement concepts"?
C++
Templates
C++11
Template Meta-Programming
C++ Concepts
Is this std::ref behaviour logical?
C++
C++11
Ref
Integrate type name in static_assert output?
C++
Templates
C++11
Custom Errors
Static Assert
C++11 lambda as member variable?
C++
C++11
Lambda
How can I iterate over a packed variadic template argument list?
C++
C++11
Variadic Templates
What is constructor inheritance?
C++
Inheritance
Constructor
C++11
what's the point of std::unique_ptr::get
C++
C++11
Pointers
Unique Ptr
😃 (and other Unicode characters) in identifiers not allowed by g++
C++
Gcc
Unicode
C++11
G++
std::put_time implementation status in GCC?
C++
Gcc
C++11
Std
Chrono
Extract year/month/day etc. from std::chrono::time_point in C++
C++
Time
C++11
Chrono
Must I call atomic load/store explicitly?
C++
C++11
Atomic
Pass multiple arguments into std::thread
C++
Multithreading
C++11
std::thread - naming your thread
C++
Multithreading
C++11
How can I use C++ 11 features in Clang?
C++
C++11
Clang
Workarounds for no 'rvalue references to *this' feature
C++
C++11
Move Semantics
Rvalue Reference
How do I get a const_iterator using auto?
C++
C++11
Auto
Correct usage of rvalue references as parameters
C++
C++11
Rvalue Reference
C++11 Range-based for-loop efficiency "const auto &i" versus "auto i"
C++
For Loop
C++11
Auto
Iterating through vector<unique_ptr<mytype>> using C++11 for() loops
C++
C++11
Vector
Unique Ptr
Capturing perfectly-forwarded variable in lambda
C++
C++11
Lambda
C++14
Perfect Forwarding
Parallel Loops in C++
C++
C++11
For Loop
Concurrency
C++14
How can I use Standard Library (STL) classes in my dll interface or ABI?
C++
Dll
C++11
Stl
Std
Is constexpr supported with lambda functions / expressions?
C++
C++11
Lambda
Constexpr
Why isn't there a std::shared_ptr<T[]> specialisation?
C++
C++11
Shared Ptr
Why do you use std::move when you have && in C++11?
C++
C++11
Move Semantics
Override identifier after destructor in C++11
C++
C++11
Overriding
Virtual Destructor
Overload resolution between object, rvalue reference, const reference
C++
C++11
Overloading
Rvalue Reference
C++14
Is it a premature optimization to use std::move()?
C++
C++11
I cannot pass lambda as std::function
C++
C++11
Lambda
default override of virtual destructor
C++
C++11
C++14
Functional programming in C++. Implementing f(a)(b)(c)
C++
C++11
Functional Programming
Currying
Std Function
Is there a C++11 syntax file for vim?
C++
Vim
C++11
lambdas require capturing 'this' to call static member function?
C++
Lambda
C++11
What happens when an exception goes unhandled in a multithreaded C++11 program?
C++
Multithreading
Exception
C++11
C++ Faq
Lambda as function parameter
C++
Lambda
C++11
Constexpr Math Functions
C++
C++11
Constexpr
Cmath
C++11 range-based for loops without loop variable
C++
C++11
"Downcasting" unique_ptr<Base> to unique_ptr<Derived>
C++
C++11
Smart Pointers
Factory Pattern
Unique Ptr
Move-only version of std::function
C++
C++11
Move Semantics
Iterating over different types
C++
C++11
C++14
Why isn't this 'for' loop valid?
C++
Arrays
C++11
Bind Vs Lambda?
C++
Functional Programming
Lambda
C++11
Bind
Is there some ninja trick to make a variable constant after its declaration?
C++
C++11
Const Correctness
Exceptions with Unicode what()
C++
C++11
Whyever **not** declare a function to be `constexpr`?
C++
C++11
Constants
Constexpr
Function Declaration
Perfect forwarding - what's it all about?
C++11
Terminology
Perfect Forwarding
Why can't clang with libc++ in c++0x mode link this boost::program_options example?
C++
Boost
C++11
Clang
Libc++
How do I use unique_ptr for pimpl?
C++
C++11
Pimpl Idiom
Unique Ptr
Is there a standard way of moving a range into a vector?
C++
C++11
Insert
Stdvector
Can I typically/always use std::forward instead of std::move?
C++
C++11
Move Semantics
Rvalue Reference
Perfect Forwarding
Should all/most setter functions in C++11 be written as function templates accepting universal references?
C++
C++11
Move Semantics
Perfect Forwarding
Universal Reference
Using std::bind with member function, use object pointer or not for this argument?
C++
C++11
Language Lawyer
std::shared_ptr initialization: make_shared<Foo>() vs shared_ptr<T>(new Foo)
C++
C++11
Shared Ptr
Smart Pointers
How do "acquire" and "consume" memory orders differ, and when is "consume" preferable?
C++
C++11
Atomic
Memory Model
constexpr const vs constexpr variables?
C++
C++11
Constants
Constexpr
Why do the C++ language designers keep re-using keywords?
C++
C++11
Keyword
Language Design
Should I default virtual destructors?
C++
C++11
Destructor
Virtual Functions
Why is std::function not equality comparable?
C++
Function
Boost
C++11
Tr1
Why was std::pow(double, int) removed from C++11?
C++
C++11
C++ Standard-Library
C++ priority_queue with lambda comparator error
C++
Stl
Lambda
C++11
Priority Queue
Will (and should) there be sockets in C++11?
C++
Sockets
C++11
What's the difference between sizeof and alignof?
C++
C++11
Sizeof
Alignof
What's the point of a final virtual function?
C++
C++11
Inheritance
Final
Virtual Functions
How to convert errno to exception using <system_error>
C++
Exception
C++11
Remove reference in decltype (return T instead of T& where T& is the decltype)
C++
Templates
C++11
Type Deduction
reinterpret_cast between char* and std::uint8_t* - safe?
C++
C++11
Language Lawyer
Strict Aliasing
Uint8t
Redefining lambdas not allowed in C++11, why?
C++
C++11
Lambda
Language Lawyer
Has C++ standard changed with respect to the use of indeterminate values and undefined behavior in C++14?
C++
C++11
Language Lawyer
Undefined Behavior
C++14
How to emplace object with no-argument constructor into std::map?
C++
C++11
difference between standard's atomic bool and atomic flag
C++
Multithreading
C++11
Thread Safety
Atomic
Adding smallest possible float to a float
C++
C++11
Floating Point
What C++11 features does Visual Studio 2010 support?
C++
Visual Studio-2010
Visual Studio
C++11
My enum is not a class or namespace
C++
Enums
G++
C++11
How do I initialize a member array with an initializer_list?
C++
Arrays
C++11
Initializer List
Do we really need "enum class" in C++11?
C++
Enums
C++11
Language Lawyer
How do static variables in lambda function objects work?
C++
C++11
Static
Lambda
What can and can't I specialize in the std namespace?
C++
C++11
Std
Explicit Specialization
what is the difference between set and unordered_set in C++?
C++
Algorithm
Data Structures
C++11
error: ‘unique_ptr’ is not a member of ‘std’
C++
C++11
G++
Unique Ptr
How can I add C++11 support to Code::Blocks compiler?
C++11
Codeblocks
Why does std::move prevent RVO (return value optimization)?
C++
C++11
Move Semantics
Return Value-Optimization
std::map emplace without copying value
C++
C++11
Dictionary
Stl
Emplace
Are new and delete still useful in C++14?
C++
C++11
New Operator
C++14
Dynamic Memory-Allocation
Differences between Conditional variables, Mutexes and Locks
C++
Multithreading
C++11
Mutex
Condition Variable
Are there any concurrent containers in C++11?
C++
Visual Studio-2010
Concurrency
C++11
Blockingqueue
Iterating over a QMap with for
C++
Qt
C++11
Qmap
Does [=] imply that all local variables will be copied?
C++
C++11
Lambda
Capture
Are int8_t and uint8_t intended to be char types?
C++
C++11
Iostream
Language Lawyer
Standard Library
How can Boost be used to achieve C++14-style auto return types?
C++
C++11
Boost
Why does auto x{3} deduce an initializer_list?
C++
C++11
Auto
Initializer List
Type Deduction
Is x = std::move(x) undefined?
C++
C++11
Language Lawyer
C++14
Why does C++11 contain an odd clause about comparing void pointers?
C++
C++11
Pointers
Language Lawyer
Comparison Operators
Preferred standard use: range based for or std::for_each
C++
Coding Style
C++11
Does new char actually guarantee aligned memory for a class type?
C++
C++11
Language Lawyer
std::this_thread::yield() vs std::this_thread::sleep_for()
C++
Multithreading
C++11
remove unique_ptr from queue
C++
C++11
Unique Ptr
The precision of std::to_string(double)
C++
C++11
why do I need std::condition_variable?
C++
C++11
Concurrency
Should custom containers have free begin/end functions?
C++
C++11
Iterator
Containers
Argument Dependent-Lookup
Writing Universal memoization function in C++11
C++
C++11
Memoization
Does `sizeof` *really* evaluate to a `std::size_t`? Can it?
C++
C++11
Std
Language Lawyer
Why is there not an std::is_struct type trait?
C++
C++11
Typetraits
C++11 auto declaration with and without pointer declarator
C++
C++11
Auto
Variable Declaration
Why does using a temporary object in the range-based for initializer result in a crash?
C++
C++11
Why don't compilers merge redundant std::atomic writes?
C++
Multithreading
C++11
Compiler Optimization
Stdatomic
Initializing std::tuple from initializer list
C++
C++11
Format specifiers for uint8_t, uint16_t, ...?
C++
C++11
Scanf
What does `std::kill_dependency` do, and why would I want to use it?
C++
Multithreading
Memory Model
C++11
c++11 foreach syntax and custom iterator
C++
Iterator
C++11
With explicitly deleted member functions in C++11, is it still worthwhile to inherit from a noncopyable base class?
C++
C++11
Noncopyable
C++ Threads, std::system_error - operation not permitted?
C++
Multithreading
C++11
Std System-Error
When is a const reference better than pass-by-value in C++11?
C++
C++11
std::unique_ptr for C functions that need free
C++
C++11
When I should use std::map::at to retrieve map element
C++
C++11
Stdmap
How can I make a variable always equal to the result of some calculations?
C++
C++11
What is the rationale behind decltype behavior?
C++
C++11
C++14
Decltype
Type Deduction
C++0x thread interruption
C++
Multithreading
C++11
Move constructor on derived object
C++
C++11
Move Semantics
smart pointers and arrays
C++
C++11
Smart Pointers
Is this C++11 regex error me or the compiler?
C++
Regex
Gcc
C++11
C++11: Replace all non-owning raw pointers with std::shared_ptr()?
C++
Memory
C++11
Smart Pointers
Why are anonymous namespaces not a sufficient replacement for namespace-static, according to the standards committee?
C++
C++11
How can I store a lambda expression as a field of a class in C++11?
C++
Class
Lambda
C++11
Field
C++11 does not deduce type when std::function or lambda functions are involved
C++
Templates
Lambda
C++11
How to create timer events using C++ 11?
C++
C++11
Random Engine Differences
C++
Random
C++11
C++ Qt - How to add "-std=c++11" to the makefile which is generated by qmake?
Qt
C++11
Makefile
Qmake
Qt Slots and C++11 lambda
C++
Qt
C++11
Type safe physics operations in C++
C++
C++11
Type Safety
Different results between gcc and clang when compiling a rather simple c++11 program
C++
Gcc
C++11
Clang
Why does the order of template argument substitution matter?
C++
Templates
C++11
Language Lawyer
C++14
What changes introduced in C++14 can potentially break a program written in C++11?
C++
C++11
C++14
Language Lawyer
C++ Faq
std::shared_ptr: reset() vs. assignment
C++
C++11
Shared Ptr
std::tuple get() member function
C++
Boost
C++11
Tuples
Variadic template templates and perfect forwarding
C++
C++11
Variadic Templates
Template Templates
How does the custom deleter of std::unique_ptr work?
C++
C++11
Unique Ptr
Delete Operator
C++11 - static_assert within constexpr function?
C++
C++11
Static Assert
Constexpr
What are the incompatible differences between C(99) and C++(11)?
C++
C
C++11
C99
What is "Expression SFINAE"?
C++
Templates
Visual C++
C++11
Sfinae
How to enforce the 'override' keyword?
C++
Visual C++
C++11
Visual Studio-2012
Overriding
C++11 equivalent to boost shared_mutex
C++
Boost
C++11
Mutex
static constexpr variable vs function
C++
Templates
C++11
Constexpr
shared_ptr<> is to weak_ptr<> as unique_ptr<> is to... what?
C++
C++11
Unique Ptr
creating a shared_ptr from unique_ptr
C++
C++11
G++
Smart Pointers
Clang++
When would I use std::integral_constant over constexpr?
C++
Templates
C++11
Constants
Constexpr
Why can't std::ostream be moved?
C++
C++11
Iostream
Unicode in C++11
C++
C++11
Unicode
Utf 8
Utf 16
C++11 member initializer list vs in-class initializer?
C++
C++11
Initialization
Why is derived class move constructible when base class isn't?
C++
C++11
Language Lawyer
Move Semantics
Move Constructor
reinterpret_cast creating a trivially default-constructible object
C++
C++11
Language Lawyer
C++17
unique_ptr boost equivalent?
C++
Boost
C++11
Unique Ptr
How does the template parameter of std::function work? (implementation)
C++
Templates
C++11
Function Pointers
Function Object
Why was pair range access removed from C++11?
C++
Foreach
C++11
Range
Std Pair
Using std::array with initialization lists
C++
C++11
Libstdc++
Get time since epoch in milliseconds, preferably using C++11 chrono
C++
C++11
Chrono
What's the best way to lock multiple std::mutex'es?
C++
Multithreading
C++11
How is Meyers' implementation of a Singleton actually a Singleton
C++
Design Patterns
C++11
Singleton
Why no emplacement iterators in C++11 or C++14?
C++
C++11
Stl
Iterator
C++14
What does the single ampersand after the parameter list of a member function declaration mean?
C++
C++11
Strange "->* []" expression in C++ source code of cpp.react library
C++
C++11
Language Lawyer
Operator Arrow-Star
What is the difference between MinGW, MinGW-w64 and MinGW-builds?
C++
Eclipse
Gcc
C++11
Mingw
Make custom type "tie-able" (compatible with std::tie)
C++
C++11
Tuples
Std
Using C++11 futures: Nested calls of std::async crash: Compiler/Standard library bug?
C++
C++11
Gcc
Future
Mingw W64
Avoiding implicit conversion in constructor. The 'explicit' keyword doesn't help here
C++
C++11
How to get the address of a C++ lambda function within the lambda itself?
C++
C++11
Lambda
C++14
C++17
Why does an object returned by value have the same address as the object inside the method?
C++
C++11
Should I use shared_ptr or unique_ptr
C++
C++11
Shared Ptr
Pimpl Idiom
Unique Ptr
Debugging template instantiations
C++
C++11
Dynamic casting for unique_ptr
C++
Casting
C++11
Smart Pointers
Unique Ptr
Move with vector::push_back
C++
C++11
Google Test in Visual Studio 2012
C++
Visual C++
C++11
Visual Studio-2012
Googletest
Delegate Constructor C++
C++
C++11
What does the 'void()' in 'auto f(params) -> decltype(..., void())' do?
C++
C++11
Sfinae
Decltype
Trailing Return-Type
Does a C++11 range-based for loop condition get evaluated every cycle?
C++
Performance
For Loop
C++11
Foreach
char vs wchar_t vs char16_t vs char32_t (c++11)
C++
C++11
Waiting for multiple futures?
C++
Multithreading
C++11
What is the difference between std::atoi() and std::stoi?
C++11
Atoi
Why are std::shuffle methods being deprecated in C++14?
C++
C++11
Deprecated
C++14
Stl Algorithm
How does Eric Niebler's implementation of std::is_function work?
C++
C++11
Templates
C++14
Typetraits
Why are std::begin and std::end "not memory safe"?
C++
C++11
Iterator
Std
Member template in local class
C++
Templates
C++11
Local Class
std::vector, default construction, C++11 and breaking changes
C++
Stl
Vector
C++11
Backwards Compatibility
Real life examples of xvalues, glvalues, and prvalues?
C++
C++11
Where can I find the C++11 standard papers?
C++
C++11
Why is C++11 constexpr so restrictive?
C++
C++11
Constexpr
C++ Linker Error With Class static constexpr
C++
Linker
C++11
Constexpr
std::to_string - more than instance of overloaded function matches the argument list
C++
Visual Studio-2010
Visual C++
C++11
Is it wise to ignore gcc/clang's "-Wmissing-braces" warning?
C++
C++11
Compiler Warnings
Why do we need to mark functions as constexpr?
C++
C++11
Constexpr
std::mutex vs std::recursive_mutex as class member
C++
C++11
Mutex
Object Design
Recursive Mutex
How to call a function on all variadic template args?
C++
C++11
Variadic Templates
C++11 variable number of arguments, same specific type
C++
C++11
Variadic
template parameter packs access Nth type and Nth element
C++
C++11
Variadic Templates
How to parse a date string into a c++11 std::chrono time_point or similar?
C++
C++11
Date Parsing
Datetime Parsing
How to determine programmatically if an expression is rvalue or lvalue in C++?
C++
C++11
Lvalue
Rvalue
Did the author make a mistake in explaining stack and heap in C++ or am I misreading something?
C++
C++11
Is there any point in using `override` when overriding a pure virtual function?
C++
C++11
Overriding
Pure Virtual
decltype and parentheses
C++
C++11
Type Inference
Decltype
C++11 static_assert and template instantiation
C++
C++11
When will C++0x be finished?
C++
C++11
Move or Named Return Value Optimization (NRVO)?
C++
Optimization
C++11
Move Semantics
Return Value-Optimization
constexpr overloading
C++
C++11
Overloading
Compile Time-Constant
Constexpr
C++11 - declaring non-static data members as 'auto'
C++
C++11
Auto
Variable Declaration
Cleanest way to copy a constant size array in c++11
C++
Arrays
Optimization
C++11
Copy
How do memory_order_seq_cst and memory_order_acq_rel differ?
C++
C++11
Memory Model
Stdatomic
Why can't simple initialize (with braces) 2D std::array?
C++
Stl
C++11
Initialization
Get index of current element in C++ range-based for-loop
C++
For Loop
C++11
Iteration
Implementation C++14 make_integer_sequence
C++
Gcc
C++11
C++14
how to add c++11 support to syntastic vim plugin?
Vim
C++11
Syntastic
Can I use std::async without waiting for the future limitation?
C++
Multithreading
C++11
Asynchronous
Stdasync
Why is there no C++11 threadsafe alternative to std::localtime and std::gmtime?
C++
C++11
Thread Safety
Chrono
error: anachronistic old-style base class initializer
C++
C++11
Gcc
C++14
C++03
Is final used for optimization in C++?
C++
C++11
Virtual
Final
Get size of std::array without an instance
C++
C++11
Stdarray
Can the 'type' of a lambda expression be expressed?
C++
Stl
Lambda
C++11
How to capture a unique_ptr into a lambda expression?
C++
Lambda
C++11
Unique Ptr
What's the difference between notify_all() and notify_one() of std::condition_variable?
C++
Multithreading
C++11
Condition Variable
Why does C++11 have `make_shared` but not `make_unique`
C++
C++11
Is it possible to manually define a conversion for an enum class?
C++
Enums
C++11
Enum Class
What is decltype with two arguments?
C++
C++11
Sfinae
Typetraits
Decltype
Is a moved-from vector always empty?
C++
C++11
Vector
Language Lawyer
Move Semantics
Why do constant expressions have an exclusion for undefined behavior?
C++
C++11
Undefined Behavior
Sfinae
Constexpr
How true is "Want Speed? Pass by value"
C++
C++11
Why is the destructor of a future returned from `std::async` blocking?
C++
Multithreading
C++11
Asynchronous
Std
In f(x), can x be evaluated before f?
C++
C++11
Move semantics and function order evaluation
C++
C++11
Initialization
Move Semantics
Unspecified Behavior
What is shared_ptr's aliasing constructor for?
C++
C++11
Overload on reference, versus sole pass-by-value + std::move?
C++
C++11
Move Semantics
Rvalue Reference
Specifying one type for all arguments passed to variadic function or variadic template function w/out using array, vector, structs, etc?
C++
Templates
Parameters
C++11
Variadic Functions
Will std::string always be null-terminated in C++11?
C++
String
C++11
Language Lawyer
Null Terminated
Why can't we have automatically deduced return types?
C++
C++11
How does one iterate through an unordered set in C++?
C++
C++11
Iteration
Unordered Set
When can outer braces be omitted in an initializer list?
C++
C++11
Visual C++-2010
What does an ampersand after this assignment operator mean?
C++
C++11
Assignment Operator
Default Implementation
What does the standard library guarantee about self move assignment?
C++
Stl
C++11
Move Semantics
Why can I not brace initialize a struct derived from another struct?
C++
C++11
Struct
List Initialization
std::remove_reference explained?
C++
Templates
C++11
Template Specialization
Windows C++ compiler with full C++11 support (should work with Qt)
C++
Windows
Qt
C++11
Delayed start of a thread in C++ 11
C++
Multithreading
C++11
Is the "lazy man's enable_if" legal C++?
C++
C++11
Visual C++
Language Lawyer
Sfinae
What do you need to install to use Clang on windows to build c++14 for 64 bit?
Windows
C++11
Gcc
Clang++
Llvm Clang
What are unevaluated contexts in C++?
C++
C++11
Can't a class have static constexpr member instances of itself?
C++
C++11
Constexpr
Static Members
Incomplete Type
C++ - Why is boost::hash_combine the best way to combine hash-values?
C++
C++11
Boost
Hash
What is the name of this unusual C++ template feature used by Boost.Spirit?
C++
Templates
C++11
Language Lawyer
Boost Spirit
Moving a member function from base class to derived class breaks the program for no obvious reason
C++
C++11
Templates
Namespaces
Uses of destructor = delete;
C++
C++11
Destructor
c++ {*this} inside curly braces
C++
C++11
Best way to declare an interface in C++11
C++
Interface
C++11
Polymorphism
Abstract
How to deal with "exit-time destructor" warning in clang?
C++
C++11
Warnings
Clang
Destructor
How to make the for each loop function in C++ work with a custom class
C++
List
C++11
Foreach
Using decltype to get an expression's type, without the const
C++
C++11
Decltype
Why vector access operators are not specified as noexcept?
C++
Exception
C++11
Stl
Noexcept
What is the difference between unordered_map::emplace and unordered_map::insert in C++?
C++
C++11
Insert
Unordered Map
Emplace
Include )" in raw string literal without terminating said literal
C++
C++11
Delimiter
String Literals
Rawstring
C++ std::tuple order of destruction
C++
C++11
Std
Stdtuple
Segmentation fault when using a shared_ptr for private_key
C++
C++11
Segmentation Fault
Shared Ptr
Botan