#ifndef TEMP_ABS_HPP_INCLUDED_19JUN08 #define TEMP_ABS_HPP_INCLUDED_19JUN08 #include #include #include #include namespace temp { template struct abs { private: // save instantiating this twice typedef boost::mpl::integral_c n_type; public: typedef typename boost::mpl::if_c< (N < 0) , boost::mpl::negate , n_type >::type type; BOOST_STATIC_CONSTANT(boost::intmax_t, value = type::value); }; } // namespace temp #endif // TEMP_ABS_HPP_INCLUDED_19JUN08