Type traits are syntactic extensions that allow the developer to determine at compile time various characteristics of a type.
Is it possible to write a type trait, say is_callable<T> which tells if an object has …
c++ metaprogramming traits typetraitsIs there any way to check if an arbitrary variable type is iterable? So to check if it has indexed …
c++ templates typetraits iterableIn layman's terms, what's the difference between trivial types, standard layout types and PODs? Specifically, I want to determine whether …
c++ constructor initialization pod typetraitsIn https://stackoverflow.com/a/1967183/134841, a solution is provided for statically checking whether a member exists, possibly in a subclass …
c++ c++11 final template-meta-programming typetraitsI'm trying to declare a variable so that its type is the same as the return type of a member …
c++ typetraits member-function-pointers decltypeI'm trying to return an int64_t if std::is_integral<>::value is true. Otherwise, I would like …
c++ templates c++11 typetraitsEdit, in order to avoid confusion: decltype does not accept two arguments. See answers. The following two structs can be …
c++ c++11 sfinae typetraits decltypeC++14 will have functions whose return type can be deduced based on the return value. auto function(){ return "hello world"; } …
c++ template-meta-programming typetraits c++14 enable-ifI have the need to use offsetof from a template with a member selector. I've come up with a way, …
c++ c++11 typetraits offsetofC++11 provides two type trait template classes: std::is_integer and std::is_integral. However, I cannot tell the differences …
c++ c++11 language-lawyer typetraits