Skip to content

Commit

Permalink
(trivial) (ddoc) more descriptive Typedef doc.
Browse files Browse the repository at this point in the history
Based on Andrei Alexandrescu's post: http://forum.dlang.org/post/lvj17a$78k$1@digitalmars.com

`MoneyEuros` makes use of the cookie more obvious than `TypeFloat1`.
  • Loading branch information
kiith-sa committed Sep 20, 2014
1 parent 64e2233 commit 886c536
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions std/typecons.d
Expand Up @@ -4461,11 +4461,11 @@ alias TypeInt2 = Typedef!int;
// The two Typedefs are the same type.
static assert(is(TypeInt1 == TypeInt2));
alias TypeFloat1 = Typedef!(float, float.init, "a");
alias TypeFloat2 = Typedef!(float, float.init, "b");
alias MoneyEuros = Typedef!(float, float.init, "euros");
alias MoneyDollars = Typedef!(float, float.init, "dollars");
// The two Typedefs are _not_ the same type.
static assert(!is(TypeFloat1 == TypeFloat2));
static assert(!is(MoneyEuros == MoneyDollars));
----
Note: If a library routine cannot handle the Typedef type,
Expand Down

0 comments on commit 886c536

Please sign in to comment.