c++11
C++ Templates variadic but static
I am training my template skills in C++ and want to implement a vector class. The class is defined by the vector dimension N and t开发者_如何学Gohe type T.[详细]
2023-04-12 00:05 分类:问答what are the difference in memory_order_seq_cst with other memory order?
Is there a table to summarize the difference in memory order? such as which situation to use each memory order[详细]
2023-04-11 23:00 分类:问答calling more than one function in STL algorithm
The classical example using STL algorithms: void foo(int){}; vector<int> collection; collection.push_back(3);[详细]
2023-04-11 21:15 分类:问答Haskell style "Maybe" type & *chaining* in C++11
I repeatedly find myself requiring Haskell style Maybe (especially Maybe chaining) in my project at work.E.g. withdrawal request from customer and we are given the customer ID...lookup customer in cac[详细]
2023-04-11 18:07 分类:问答lambda with templates
I am currently doing some exercises with templated functions. I had the task to write a implementation of the transform algorithm.[详细]
2023-04-11 17:11 分类:问答undefined reference to std::hash<string>
I\'m trying to write a simple factory function for st开发者_开发百科d::unordered_map. The function takes in an iterable which has a begin and end method and whose value_type is a std::pair. The follow[详细]
2023-04-11 16:53 分类:问答static constexpr method implementation causes gcc bug?
Here is a piece of code: class Class { static constexpr int getBug(); }; constexpr int Class::getBug() { return 0;[详细]
2023-04-11 12:51 分类:问答Templates don't always guess initializer list types
#include <initializer_list> #include <utility> void foo(std::initializer_list<std::pair<int,int>>) {}[详细]
2023-04-11 12:24 分类:问答About strongly typed enumerations forward declaration
I\'ve a set of classes in my namespace and want to group forward declaration in a define.hpp file. I\'ve already achieve this in others projects, here is an example :[详细]
2023-04-11 11:58 分类:问答Regular Expressions misunderstanding or just broken implementation?
I tried a very simple use of regex_search and can not understand w开发者_运维知识库hy I do not get a match:[详细]
2023-04-11 09:31 分类:问答