c++11
C++11 Pointer Uniquify Helper Function
In C++11, I\'m missing a syntatic sugar for uniquifying a pointer into std::unique_ptr. I therefore wrote the following litte helper function 开发者_开发技巧std::uniquify_ptr typically used to easy (n[详细]
2023-04-10 15:25 分类:问答C++11 File Streams
Has开发者_Go百科 C++11 move semantics made the use of std::ifstream and std::ofstream easier or safer with regards to exceptions? I guess it depends on the standard library aswell. Any differences the[详细]
2023-04-10 15:17 分类:问答Doesn't std::piecewise_construct cause a ODR violation?
std::piecewise_construct, defined in <utility>, has internal linkage since it is declared constexpr. I wonder if use of std::piecewise_construct in a header can violate ODR. For example:[详细]
2023-04-10 11:59 分类:问答Restrict passed parameter to a string literal
I have a class to wrap string literals and calculate the size at compile time. The constructor looks like this:[详细]
2023-04-10 08:29 分类:问答Proper named temporaries and rvalue-reference/move
Prior to C++11, and as a standard programming idiom, temporaries are often assigned to variables to make the code cleaner. For small types a copy is typically made, and for larger types perhaps a refe[详细]
2023-04-10 07:14 分类:问答What is a lambda expression in C++11?
What is a lambda expression in C++11? When would I use one? What class of problem do they solv开发者_如何学Goe that wasn\'t possible prior to their introduction?[详细]
2023-04-10 06:33 分类:问答C++ : how do I use type_traits to determine if a class is trivial?
In C++0x, I would like to determine if a class is trivial/has standard layout so I can use memcpy(), memset(), etc...[详细]
2023-04-10 05:28 分类:问答Updating Apple g++/gcc
What is the difference between Apple gcc and GNU gcc? Is Apple gcc a superset of the standard one? The g++ version information in my OSX shows:[详细]
2023-04-10 04:59 分类:问答Enlightening Usage of C++11 decltype
I\'ve just seen this really nice talk Rock Hard: C++ Evolving by Boris Jabes. In the section of the talk concerning Higher-Order Generic Programming he says that the following is an example of a funct[详细]
2023-04-10 04:50 分类:问答C++11 resources and compilers [closed]
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reaso开发者_运维问答nably answered in its current form.[详细]
2023-04-10 04:47 分类:问答