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
Get typename of a variable without any c
Get typename of a variable without any common libraries?
May 22, 2017 at 2:15pm UTC
Varscott11
(3)
This may be asking much, but is it at all possible to get the typename of a variable without using common libraries? The reason is that I am writing an OS, and need to write all of these basic functions from scratch. Any ideas?
May 22, 2017 at 2:24pm UTC
JLBorges
(13770)
No.
#include <typeinfo>
is required if we want to use the
typeid
operator.
http://coliru.stacked-crooked.com/a/ea69a0ac886630f2
Note: with g++ (-freestanding), we would still get <typeinfo> support with libsupc++
Topic archived. No new replies allowed.