
25 Aug
2007
25 Aug
'07
7:27 p.m.
On 8/25/07, Steven Watanabe <steven@providere-consulting.com> wrote:
AMDG
Ion GaztaƱaga <igaztanaga <at> gmail.com> writes:
-> Someone knows have to make a function static or not depending on a compile-time boolean.
static typename boost::enable_if_c<should_be_static, result_type>::type f(); typename boost::disable_if_c<should_be_static, result_type>::type f();
Does this actually work? Shouldn't enable/disable_if depend on some template arguments of f (and f is not templated here)? I think that, at least under gcc, this doesn't work. GCC will complain (rightly IMHO) that 'type' is not a nested type of disable_if *or* enable_if. gpd gpd