[Issue 11110] Variant.convertsTo doesn't work like isImplicitlyConvertible

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 3 22:59:27 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11110


blm768 at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |blm768 at gmail.com


--- Comment #1 from blm768 at gmail.com 2013-10-03 22:59:26 PDT ---
This also applies to arrays:

import std.traits;
import std.variant;

void main() {
  assert(isImplicitlyConvertible!(string, const(char)[])); //passes
  Variant var = "some_string";
  assert(var.convertsTo!(const(char)[])); //fails
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list