
Sorry for being dense, but why is this different than the following: lcaminiti wrote
template< typename T > void assign ( T& x, T const& y ) { x = y; if(boost::has_equal_to<T>::value){ assert(x == y); std::cout << "asserted for: " << typeid(T).name() << std::endl; } else { std::cout << "cannot assert for: " << typeid(T).name() << std::endl; } }
since the condition is known at compile time, can't the optimizer be counted on to compile only the corresponding code? Why doesn't this give the same effect as the proposal? Robert Ramey -- View this message in context: http://boost.2283326.n4.nabble.com/static-if-Is-there-interest-in-a-static-i... Sent from the Boost - Dev mailing list archive at Nabble.com.