Re: [Boost-users] [lambda] Should the code compile?
Hello Watanabe,
It seems to be a problem of my mail editor.
I have used the correct static_cast grammar but some characters were
silently eaten. :-(
Sorry for misleading.
At last, I've found the problem and the working code is as follows:
#define DECLARE_PTR_AUTO_DELETOR_CONDITIONAL(CLASS, VAR_PTR, CONDITION)\
boost::scoped_ptr<CLASS> auto__deletor__for__ ## VAR_PTR (\
(boost::lambda::if_then_else_return(boost::lambda::_1, VAR_PTR,\
static_cast
I have the following simple code, but doesn't get compiled:
#define DECLARE_PTR_AUTO_DELETOR_CONDITIONAL(CLASS, VAR_PTR, CONDITION)\ boost::scoped_ptr auto__deletor__for__ ## VAR_PTR (\ boost::lambda::ret(boost::lambda::if_then_else(_1,\ VAR_PTR, static_cast(0)))(static_cast(CONDITION)))
That's not the correct syntax for static_cast In Christ, Steven Watanabe ------------------------------------------------------------------- 新浪空间——与朋友开心分享网络新生活!(http://space.sina.com.cn/ )
participants (1)
-
Max