On Sunday 20 April 2014 21:46:34 Mostafa wrote:
3. Implementation 3.1) Why not reuse boost::static_unsigned_max in max_align? 3.2) Why not the more readable "boost::integer_traitsstd::size_t::const_max" instead of the less readable "~static_caststd::size_t(0)"?
Since that was my suggestion, I'll comment on that. I'm aware of Boost.Integer but still suggested the "~static_caststd::size_t(0)" variant to avoid the dependency and integer_traits template instantiation cost. integer_traits.hpp header is considerably heavier to include than the max_count_of.hpp. I believe static_unsigned_max is not used in max_align.hpp for the same reasons. IMO the current code in Boost.Align is quite readable as it is and using Boost.Integer primitive wouldn't improve readability too much to justify the costs.