cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
type tyarit?
type tyarit?
Jul 4, 2016 at 1:16pm UTC
Wu zhen hai
(112)
How to implement is_class is_union is_enum?
Help!!!!
Jul 4, 2016 at 1:28pm UTC
coder777
(8439)
You need to
#include <type_traits>
. For example is_enum see:
http://www.cplusplus.com/reference/type_traits/is_enum/?kw=is_enum
Jul 4, 2016 at 1:45pm UTC
JLBorges
(13770)
For a possible implementation of
std::is_class
, see:
http://en.cppreference.com/w/cpp/types/is_class
Also see:
http://stackoverflow.com/a/11317409
Jul 4, 2016 at 1:58pm UTC
Wu zhen hai
(112)
@coder777, not'how to use', but 'how to implement'?
Jul 4, 2016 at 2:37pm UTC
coder777
(8439)
'how to implement'?
You can't. These are basically compiler internals exposed. There might be other compiler internals (which depends of course on the compiler) used by these traits, but it makes not too much sense to use them non standard as they are.
Topic archived. No new replies allowed.