typetraits
C++ Idiomatic Type Traits
I have a system of type traits that resides in a namespace, like so: namespace my_namespace { template <typename T>[详细]
2023-03-17 08:28 分类:问答C++ templates: how to determine if a type is suitable for subclassing
Let\'s say I have some templated class depending on type T.T could be almost anything: int, int*, pair <int, int> or struct lol; it cannot be void, a reference or anything cv-qualified though.开[详细]
2023-03-17 01:07 分类:问答trivial vs. standard layout vs. POD
In layman\'s terms, what\'s the difference between trivial types, standard layout types and POD开发者_高级运维s?[详细]
2023-03-15 22:27 分类:问答Are conditional typedef's possible in C++?
this question is related to c++ there is a library which declares a class named Solver < TS,FS >. Solver is a member of another class Domain (written by me)[详细]
2023-03-13 10:41 分类:问答Is there a type-trait to remove top-level cv and reference at once?
I just want to know if there is already one provided by the standard. I know it\'s easy to make one yourself[详细]
2023-03-10 08:19 分类:问答Extract variadic template parameter pack and use it in another variadic template in a type traits meta-function?
I want to determine if any variadic class template is the base of another class.Typically I\'d use std::is_base_of, but I don\'t think my use case fits, and I\'m not sure if there\'s already something[详细]
2023-03-07 04:12 分类:问答distinguish a pointer to an overloaded member-function in C++
I want to distinguish between an overloaded member-function in a C++ template struct. The static method get_pointer from specialized struct distinguish_foo should return a pointer to derived::foo if t[详细]
2023-03-01 02:59 分类:问答C++ enable_if (or workaround) for member operator
template<typen开发者_运维知识库ame T> struct foo { T* p; foo(T* x) : p(x) {} ~foo() { if(p) delete p; }[详细]
2023-02-24 03:50 分类:问答Remove un-/signedness of char type
I want to specialize a class template for char, short, long and long long. This specializations should also holds good for the signed and unsigned variants of the integral types.[详细]
2023-02-13 09:03 分类:问答How to typedef the iterator of a nested container?
What is the proper way to declare the iterator i in the following code? #include <iostream> #include <vector>[详细]
2023-02-07 07:01 分类:问答
加载中,请稍侯......