
4 May
2010
4 May
'10
5:17 p.m.
On 5/4/2010 10:13 AM, Chad Nelson wrote:
On 05/04/2010 10:27 AM, Stewart, Robert wrote:
_______________________ integer.hpp
Your use of enable_if could be simplified into a single argument for the integer constructors by using mpl::and_.
Thanks for the suggestion, but I'd like to keep the dependencies and compile times at a minimum. I'm also not familiar with mpl yet... I'll look at it at some point, but I'd rather concentrate on XInt itself for now. The time I can devote to it is limited.
IMHO, using multiple "typename enable_if<...>::type* = 0" in a constructor is just fine. It makes the clauses line up a little more uniformly (to me). Just remember, you'll have to use boost::mpl::and_ (or similar) if you need short-circuiting. - Jeff