digitalmars.D.learn - [D1] capitalize cannot be interpreted at CT
- strtr (14/14) Jul 21 2010 Could somebody please explain this error to me.
- Ellery Newcomer (5/6) Jul 21 2010 evidently ctfe can't eat
- strtr (4/10) Jul 21 2010 Thanks,
- Don (3/12) Jul 21 2010 CTFE currently doesn't work on *any* functions which are implemented in
- BCS (4/19) Jul 22 2010 Why don't they have access?
- Jonathan M Davis (7/23) Jul 22 2010 All you have for druntime are .di files (so basically header files rathe...
- Steven Schveighoffer (7/33) Jul 22 2010 Well, it's somewhat different than that. For something like foreach(i, ...
Could somebody please explain this error to me. ---- import std.uni : toUniUpper; import std.string : capitalize; void main() { const char[] name = `test`; // C:\dmd\src\phobos\std\string.d(983): Error: _aApplycd2 cannot be interpreted at compile time, because it has no available source code const char[] name_c = capitalize(name); // my partial solution const char[] name_c2 = cast(char)toUniUpper(name[0]) ~ name[1..$]; } ----
Jul 21 2010
On 07/21/2010 09:09 PM, strtr wrote:Could somebody please explain this error to me.evidently ctfe can't eat foreach(i, dchar d; s){ } Bleach. Make sure it's in bugzilla.
Jul 21 2010
== Quote from Ellery Newcomer (ellery-newcomer utulsa.edu)'s articleOn 07/21/2010 09:09 PM, strtr wrote:Thanks, found it: http://d.puremagic.com/issues/show_bug.cgi?id=3512Could somebody please explain this error to me.evidently ctfe can't eat foreach(i, dchar d; s){ } Bleach. Make sure it's in bugzilla.
Jul 21 2010
Ellery Newcomer wrote:On 07/21/2010 09:09 PM, strtr wrote:CTFE currently doesn't work on *any* functions which are implemented in druntime, because it doesn't have access to their source code.Could somebody please explain this error to me.evidently ctfe can't eat foreach(i, dchar d; s){ } Bleach. Make sure it's in bugzilla.
Jul 21 2010
Hello Don,Ellery Newcomer wrote:Why don't they have access? -- ... <IXOYE><On 07/21/2010 09:09 PM, strtr wrote:CTFE currently doesn't work on *any* functions which are implemented in druntime, because it doesn't have access to their source code.Could somebody please explain this error to me.evidently ctfe can't eat foreach(i, dchar d; s){ } Bleach. Make sure it's in bugzilla.
Jul 22 2010
On Thursday, July 22, 2010 06:53:30 BCS wrote:Hello Don,All you have for druntime are .di files (so basically header files rather than full-on source files) and the library file with the compiled source, so you don't have the source. Now, as to _why_ that's all you have, I don't know (the .d files come with phobos). But you need the .d files for the full source, and without them, you won't be able to use CTFE with the functions in them. - Jonathan M DavisEllery Newcomer wrote:Why don't they have access?On 07/21/2010 09:09 PM, strtr wrote:CTFE currently doesn't work on *any* functions which are implemented in druntime, because it doesn't have access to their source code.Could somebody please explain this error to me.evidently ctfe can't eat foreach(i, dchar d; s){ } Bleach. Make sure it's in bugzilla.
Jul 22 2010
On Thu, 22 Jul 2010 13:25:04 -0400, Jonathan M Davis <jmdavisprog gmail.com> wrote:On Thursday, July 22, 2010 06:53:30 BCS wrote:Well, it's somewhat different than that. For something like foreach(i, dchar d; s), the compiler recognizes this as a special runtime function and replaces it with a call to the special function that handles that. I don't think the code for running it is any .di file in druntime. -SteveHello Don,All you have for druntime are .di files (so basically header files rather than full-on source files) and the library file with the compiled source, so you don't have the source. Now, as to _why_ that's all you have, I don't know (the .d files come with phobos). But you need the .d files for the full source, and without them, you won't be able to use CTFE with the functions in them.Ellery Newcomer wrote:Why don't they have access?On 07/21/2010 09:09 PM, strtr wrote:CTFE currently doesn't work on *any* functions which are implemented in druntime, because it doesn't have access to their source code.Could somebody please explain this error to me.evidently ctfe can't eat foreach(i, dchar d; s){ } Bleach. Make sure it's in bugzilla.
Jul 22 2010