bearophile:
> struct Vec(T=float, size_t N=3) {
> static assert(N > 0);
Sorry. Better to use:
> struct Vec(T=float, int N=3) {
> static assert(N > 0);
>From experience using D I have seen that using unsigned types is very unsafe
>in the current D language. In Delphi using unsigned types
Robert Jacques:
> struct Vec(T = float,size_t N = 3) {
> T[N] _data;
> alias _data this;
> string toString() { std.conv.return text(_data); }
> }
Very nice.
> plus functions as array properties which apparently got upgraded at some
> point to the extra () isn't needed anymore.
On Tue, 28 Apr 2009 05:06:23 -0400, bearophile
wrote:
bearophile:
struct Vec(T=float, size_t N=3) {
static assert(N > 0);
Sorry. Better to use:
struct Vec(T=float, int N=3) {
static assert(N > 0);
From experience using D I have seen that using unsigned types is very
unsafe in