Thread overview | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 05, 2021 Broken examples | ||||
---|---|---|---|---|
| ||||
Basically none of the examples on here compile: https://dlang.org/library/std/conv/parse.html Any idea why? |
March 05, 2021 Re: Broken examples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imperatorn | On Friday, 5 March 2021 at 22:01:37 UTC, Imperatorn wrote: > Basically none of the examples on here compile: > https://dlang.org/library/std/conv/parse.html > > Any idea why? Output: onlineapp.d(10): Error: template `std.conv.parse` cannot deduce function from argument types `!(bool, string, cast(Flag)false)(string)`, candidates are: /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2183): `parse(Target, Source)(ref Source source)` /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2280): `parse(Target, Source)(ref Source s)` with `Target = bool, Source = string` must satisfy the following constraint: ` isIntegral!Target` /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2651): `parse(Target, Source)(ref Source source, uint radix)` /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2793): `parse(Target, Source)(ref Source s)` with `Target = bool, Source = string` must satisfy the following constraint: ` is(Target == enum)` /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2883): `parse(Target, Source)(ref Source source)` with `Target = bool, Source = string` must satisfy the following constraint: ` isFloatingPoint!Target` onlineapp.d(10): ... (6 more, -v to show) ... onlineapp.d(13): Error: template `std.conv.parse` cannot deduce function from argument types `!(bool, string, cast(Flag)true)(string)`, candidates are: /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2183): `parse(Target, Source)(ref Source source)` /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2280): `parse(Target, Source)(ref Source s)` /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2651): `parse(Target, Source)(ref Source source, uint radix)` /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2793): `parse(Target, Source)(ref Source s)` /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2883): `parse(Target, Source)(ref Source source)` onlineapp.d(13): ... (6 more, -v to show) ... onlineapp.d(16): Error: template `std.conv.parse` cannot deduce function from argument types `!(bool, string, cast(Flag)true)(string)`, candidates are: /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2183): `parse(Target, Source)(ref Source source)` /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2280): `parse(Target, Source)(ref Source s)` /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2651): `parse(Target, Source)(ref Source source, uint radix)` /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2793): `parse(Target, Source)(ref Source s)` /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(2883): `parse(Target, Source)(ref Source source)` onlineapp.d(16): ... (6 more, -v to show) ... |
March 05, 2021 Re: Broken examples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imperatorn | On Fri, Mar 05, 2021 at 10:01:37PM +0000, Imperatorn via Digitalmars-d-learn wrote: > Basically none of the examples on here compile: https://dlang.org/library/std/conv/parse.html > > Any idea why? File a bug. T -- By understanding a machine-oriented language, the programmer will tend to use a much more efficient method; it is much closer to reality. -- D. Knuth |
March 06, 2021 Re: Broken examples | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On Friday, 5 March 2021 at 22:59:09 UTC, H. S. Teoh wrote:
> On Fri, Mar 05, 2021 at 10:01:37PM +0000, Imperatorn via Digitalmars-d-learn wrote:
>> Basically none of the examples on here compile: https://dlang.org/library/std/conv/parse.html
>>
>> Any idea why?
>
> File a bug.
>
>
> T
Sad that there's such an uninviting space for outsiders coming in.
|
March 06, 2021 Re: Broken examples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imperatorn | On Friday, 5 March 2021 at 22:01:37 UTC, Imperatorn wrote:
> Any idea why?
The examples are compiled using an older host compiler (__VERSION__ is 2.093) but use features introduced in a later version. This will be fixed by upgrading the compiler (the examples are checked using current master IIRC).
|
March 06, 2021 Re: Broken examples | ||||
---|---|---|---|---|
| ||||
Posted in reply to MoonlightSentinel | On Saturday, 6 March 2021 at 01:30:35 UTC, MoonlightSentinel wrote:
> On Friday, 5 March 2021 at 22:01:37 UTC, Imperatorn wrote:
>> Any idea why?
>
> The examples are compiled using an older host compiler (__VERSION__ is 2.093) but use features introduced in a later version. This will be fixed by upgrading the compiler (the examples are checked using current master IIRC).
Are you sure? 🤔
I tried switching to dmd-beta, dmd-nightly, ldc and ldc-beta and none of them worked.
|
March 06, 2021 Re: Broken examples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imperatorn | On 3/6/21 12:15 AM, Imperatorn wrote: > On Saturday, 6 March 2021 at 01:30:35 UTC, MoonlightSentinel wrote: >> On Friday, 5 March 2021 at 22:01:37 UTC, Imperatorn wrote: >>> Any idea why? >> >> The examples are compiled using an older host compiler (__VERSION__ is 2.093) but use features introduced in a later version. This will be fixed by upgrading the compiler (the examples are checked using current master IIRC). > > Are you sure? 🤔 > > I tried switching to dmd-beta, dmd-nightly, ldc and ldc-beta and none of them worked. Are you getting the same errors with those dmd versions? My locally installed compiler is dmd 2.094.2, which seems to be too old for parse's new doCount template parameter. (I look inside /usr/include/dmd/phobos/std/conv.d on my Linux installation to be sure.) Ali |
March 06, 2021 Re: Broken examples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ali Çehreli | On Saturday, 6 March 2021 at 09:38:54 UTC, Ali Çehreli wrote:
> On 3/6/21 12:15 AM, Imperatorn wrote:
>> On Saturday, 6 March 2021 at 01:30:35 UTC, MoonlightSentinel wrote:
>>> [...]
>>
>> Are you sure? 🤔
>>
>> I tried switching to dmd-beta, dmd-nightly, ldc and ldc-beta and none of them worked.
>
> Are you getting the same errors with those dmd versions?
>
> My locally installed compiler is dmd 2.094.2, which seems to be too old for parse's new doCount template parameter. (I look inside /usr/include/dmd/phobos/std/conv.d on my Linux installation to be sure.)
>
> Ali
I'll check when I'm at my computer again.
|
March 09, 2021 Re: Broken examples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imperatorn | On Saturday, 6 March 2021 at 08:15:16 UTC, Imperatorn wrote:
> Are you sure? 🤔
>
> I tried switching to dmd-beta, dmd-nightly, ldc and ldc-beta and none of them worked.
Yes. All of those were stuck at 2.093 due to some issues with Travis. We've resolved those issues over the last few days and automatically updated the host compilers today.
Note that the output of doc examples is apparently cached, so you might need to make some changes to get the actual output (until the cache invalidates(?) ).
|
March 09, 2021 Re: Broken examples | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ali Çehreli | On Saturday, 6 March 2021 at 09:38:54 UTC, Ali Çehreli wrote: > Are you getting the same errors with those dmd versions? > > My locally installed compiler is dmd 2.094.2, which seems to be too old for parse's new doCount template parameter. (I look inside /usr/include/dmd/phobos/std/conv.d on my Linux installation to be sure.) > > Ali The new template parameter was introduced in 2.095.0. See https://dlang.org/changelog/2.095.0.html#conv_parse_count |
Copyright © 1999-2021 by the D Language Foundation