On 11/21/14 2:25 AM, Sergei Nosov wrote:
On Friday, 21 November 2014 at 04:08:52 UTC, Steven Schveighoffer wrote:
Can anyone figure out a good solution to this problem? I like template
constraints, but they are just too black-boxy. Would we have to
signify that some enum is actually a trait and
OK, so I'm writing some traits that I'd like my objects to satisfy. And
I'm having the worst time debugging them.
Most of the traits in D look like this:
enum isSomeType(T) = __traits(compiles, (T t){
// some statements using t
// some asserts
// some static asserts
});
All good.
On Friday, 21 November 2014 at 04:08:52 UTC, Steven Schveighoffer
wrote:
OK, so I'm writing some traits that I'd like my objects to
satisfy. And I'm having the worst time debugging them.
Most of the traits in D look like this:
enum isSomeType(T) = __traits(compiles, (T t){
// some
On Friday, 21 November 2014 at 04:08:52 UTC, Steven Schveighoffer
wrote:
Can anyone figure out a good solution to this problem? I like
template constraints, but they are just too black-boxy. Would
we have to signify that some enum is actually a trait and so
the compiler would know to spit out
On Friday, 21 November 2014 at 04:08:52 UTC, Steven Schveighoffer
wrote:
This is one area that D's templates are very user-unfriendly.
-Steve
+1, Well said!
---
Paolo