[phobos] [dlang/phobos] 0a685f: Ensure std.file.exists(StringEnum.name) compiles.

GitHub via phobos phobos at puremagic.com
Sat Nov 5 05:50:39 PDT 2016


  Branch: refs/heads/master
  Home:   https://github.com/dlang/phobos
  Commit: 0a685f1daf22181c375043c392e9c4bedf6aaf8f
      https://github.com/dlang/phobos/commit/0a685f1daf22181c375043c392e9c4bedf6aaf8f
  Author: Ryan Roden-Corrent <ryan at rcorre.net>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M std/file.d
    M std/traits.d

  Log Message:
  -----------
  Ensure std.file.exists(StringEnum.name) compiles.

A string-typed enum passes isSomeString but not isConvertibleToString.
Because isConvertibleToString is used as a template constraint for
std.file.exists, it could not be passed a string-typed enum.

Resolves #16573.


  Commit: 5f346e49dc2c51bbb578473707f1faebd5615a5d
      https://github.com/dlang/phobos/commit/5f346e49dc2c51bbb578473707f1faebd5615a5d
  Author: Ryan Roden-Corrent <ryan at rcorre.net>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M std/traits.d

  Log Message:
  -----------
  Document isConvertibleToString.

It was public but undocumented.


  Commit: 10cd84a5c04387facde3d94475b50bb386fbf7ec
      https://github.com/dlang/phobos/commit/10cd84a5c04387facde3d94475b50bb386fbf7ec
  Author: Ryan Roden-Corrent <ryan at rcorre.net>
  Date:   2016-10-30 (Sun, 30 Oct 2016)

  Changed paths:
    M std/traits.d

  Log Message:
  -----------
  Improve isConvertibleToString docs.

Clarify that it works for enums and add more unittest examples.


  Commit: 607a7558c24e8b3a335efba4f4ec0c14cc6227ba
      https://github.com/dlang/phobos/commit/607a7558c24e8b3a335efba4f4ec0c14cc6227ba
  Author: Jonathan M Davis <jmdavis at users.noreply.github.com>
  Date:   2016-11-05 (Sat, 05 Nov 2016)

  Changed paths:
    M std/file.d
    M std/traits.d

  Log Message:
  -----------
  Merge pull request #4833 from rcorre/exists_enum

Ensure std.file.exists(StringEnum.name) compiles.


Compare: https://github.com/dlang/phobos/compare/bf2550fbc51c...607a7558c24e


More information about the phobos mailing list