$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] Boost TraitsType Question
From: Rawate, Vishal CIV NAVAIR-WD-5-2-7-1-1-0-E., 527110E (vishal.rawate_at_[hidden])
Date: 2012-10-04 13:58:49
Hello,
I am writing a function using templates in C++.I want to find the type of variable that is being to the function. I was wondering if I could use the Boost TypeTraits library or is there another library that I can use.
I would highly appreciate any help.
Thanking in advance.
Vishal
CodeSnipet:
Template<typename T>
Void setTag(T myVariable)
{
If(T == short)
{
Do something;
}
If(T == long)
{
Do something;
}
}