On 1/30/19 3:56 PM, Alex wrote:
Ok... strange... it doesn't in fact... as this works:
´´´
import std.experimental.all;
void main()
{
S!42 s;
auto res = s[];
static assert(isInputRange!(typeof(res)));
res.front.writeln;
}
//static assert(isInputRange!(ReturnType!(produceS!(
On 1/30/19 1:39 PM, Ali Çehreli wrote:
On 01/30/2019 07:47 AM, Steven Schveighoffer wrote:
> On 1/30/19 12:14 AM, Sobaya wrote:
>> I want to get a mangled name of a D function by
>> `core.demangle.mangle`, but I'm in trouble because there are no ways
>> to express a type of a function, which
On Wed, 30 Jan 2019 12:56:06 -0800, Ali Çehreli wrote:
> I remember names like _add. Is that a Windows thing?
A number of functions are implemented as manually-mangled names with
preprocessor macros that forward to them. It's weird, but it happens.
On 01/30/2019 11:42 AM, H. S. Teoh wrote:
On Wed, Jan 30, 2019 at 10:39:21AM -0800, Ali Çehreli via Digitalmars-d-learn
wrote:
[...]
I wonder why the inconsistency. On the other hand, .mangleof produces
just "add" when the function is extern(C). (?)
[...]
For extern(C), this is correct behav
On Wednesday, 30 January 2019 at 20:13:56 UTC, Alex wrote:
Given this:
´´´
import std.experimental.all;
void main(){}
static assert(isInputRange!(ReturnType!(produceS!(42))[]));
auto produceS(size_t param)() { return S!param(); }
struct S(size_t param)
{
//@disable this(this);
auto op
Given this:
´´´
import std.experimental.all;
void main(){}
static assert(isInputRange!(ReturnType!(produceS!(42))[]));
auto produceS(size_t param)() { return S!param(); }
struct S(size_t param)
{
//@disable this(this);
auto opIndex() { return produceRange!(this); }
}
auto produceRange
On Wed, Jan 30, 2019 at 07:51:17PM +, Neia Neutuladh via
Digitalmars-d-learn wrote:
> On Wed, 30 Jan 2019 10:39:21 -0800, Ali Çehreli wrote:
> > import core.demangle;
> >
> > extern(C) int add(int, int);
> >
> > void main() {
> >alias F = typeof(add);
> >pragma(msg, mangle!F("add"));
On Wed, 30 Jan 2019 10:39:21 -0800, Ali Çehreli wrote:
> import core.demangle;
>
> extern(C) int add(int, int);
>
> void main() {
>alias F = typeof(add);
>pragma(msg, mangle!F("add"));
>pragma(msg, add.mangleof);
> }
>
> Output:
>
> _D3addUiiZi
> add <-- Is that correc
On Wed, Jan 30, 2019 at 10:39:21AM -0800, Ali Çehreli via Digitalmars-d-learn
wrote:
[...]
> I wonder why the inconsistency. On the other hand, .mangleof produces
> just "add" when the function is extern(C). (?)
[...]
For extern(C), this is correct behaviour, because that's how a C
function woul
On 01/30/2019 07:47 AM, Steven Schveighoffer wrote:
> On 1/30/19 12:14 AM, Sobaya wrote:
>> I want to get a mangled name of a D function by
>> `core.demangle.mangle`, but I'm in trouble because there are no ways
>> to express a type of a function, which is used for a template argument
>> of `mangl
On Mon, Jan 28, 2019 at 05:07:35PM -0500, Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 1/28/19 4:57 PM, Steven Schveighoffer wrote:
> > On 1/28/19 3:16 PM, H. S. Teoh wrote:
[...]
> > > > I use a package nearly every time because if you don't, you run
> > > > into weird quirks of the l
On 1/30/19 7:32 AM, FeepingCreature wrote:
On Monday, 28 January 2019 at 15:16:54 UTC, Steven Schveighoffer wrote:
It will inspect the allocated length from the GC if the array is
appendable from the beginning. So it's not always going to reallocate.
e.g.:
string x = "abc".idup;
auto app = x
On 1/30/19 12:14 AM, Sobaya wrote:
I want to get a mangled name of a D function by `core.demangle.mangle`,
but I'm in trouble because there are no ways to express a type of a
function, which is used for a template argument of `mangle`.
For example, it is wrong to use the type `int function(int
On 31/01/2019 3:12 AM, Pavel Vozenilek wrote:
I am interested in viability of using BetterC (and only BetterC) for a
project.
1. Is BetterC supported by GDC and LDC compilers?
LDC yes, dunno about GDC but it'll depend upon the version.
2. Is there debugger/editor/IDE support?
Not required
I am interested in viability of using BetterC (and only BetterC)
for a project.
1. Is BetterC supported by GDC and LDC compilers?
2. Is there debugger/editor/IDE support?
3. The only language specific documentation seems to be
https://dlang.org/spec/betterc.html
Is more documentation plann
On Monday, 28 January 2019 at 15:16:54 UTC, Steven Schveighoffer
wrote:
It will inspect the allocated length from the GC if the array
is appendable from the beginning. So it's not always going to
reallocate.
e.g.:
string x = "abc".idup;
auto app = x.appender;
app ~= "xyz"; // does not reall
On Monday, 28 January 2019 at 20:08:31 UTC, Suliman wrote:
If I am specifying (sic! TLS):
dependency "vibe-d:tls" version="0.8.4" in my dub.sdl I am
getting error when building simple project:
module `vibe` is in file 'vibe\vibe.d' which cannot be read
But I need to get vibed build with OpenS
On 01/29/2019 09:14 PM, Sobaya wrote:
I want to get a mangled name of a D function by `core.demangle.mangle`,
but I'm in trouble because there are no ways to express a type of a
function, which is used for a template argument of `mangle`.
For example, it is wrong to use the type `int function(
18 matches
Mail list logo