$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: sj_at_[hidden]
Date: 2008-01-13 09:40:51
Hello,
I'd like to provide a function with an unique identifier:
void f(size_t UniqueId);
This function is going to be called from within class member functions
like that:
class a {
a() { f((size_t)this); }
};
Right now the old style cast works. The question is how do I make
conversion using numeric_cast? If I use:
f(boost::numeric_cast<size_t>(this));
I get a compilation error:
error C2665: 'ceil' : none of the 3 overloads could convert all the
argument types
I guess another question is: should I bother replacing this old-style
cast, maybe there is a better way to approach this situation in general?
Thanks.