import core.thread;
import std.concurrency;
import std.stdio : w = writeln;
void w2(shared(bool) *done)
{
while (*done == false)
{
Thread.sleep(100.msecs);
w("print done? ", *done);
}
}
void s2()
{
shared(bool) i
Hi,
I'm new to D so can someone explain to me what is happening here?
void func(const char* s, char** e) {
import core.stdc.stdlib;
auto result = strtod(s, e);
}
Error: function core.stdc.stdlib.strtod (scope inout(char)* nptr,
scope inout(char)** endptr) is not callable using argumen
Why does std.math.signbit only work for floating point types?
Is there an analogue function for integer types? what is the best
way to compare the sign of a float with the sign of an integer?
Thanks in advance
I tried using htod but got errors as it could not handle the std
C header files (Visual C++). How do people work around this?
Thanks and Regards
Dibyendu
Are the functions lastSocketError() and wouldHaveBlocked() from
std.socket thread-safe? i.e. can they be reliably used to see the
status of the last socket call when sockets are being
read/written in multiple threads?
Suppose a program contains several points that control should not
get to.
So each such point is blocked by assert(0).
What is the recommended way of identifying which assert has been
triggered?
Is one allowed anything like 'assert(0,"Crashed at point A");',
where the message goes to stderr?
Hi all,
I was looking at D as the next language to use in my hobby
projects, but the
"conservative GC" part in the language spec
(http://dlang.org/spec/garbage.html) looks a bit concerning. I'm
wondering what
are the implications of the fact that current GC is a Boehm-style
conservative
GC ra
Is there a mechanism for declaring something pure when it's built from
parts which individually aren't?
string foo(string s)
{
// do something arbitrarily complex with s that doesn't touch
globals or change global state except possibly state of the heap or gc
return s;
}
Hello,
i wanted to ask why this isnt working:
struct Text(T : char)
{
size_t _len;
T* _ptr;
}
Thanks :)
Trying to manipulate 'typeof' return strings, preferably at
compile-time.
e.g. to produce struct B below (intended to have an A
sub-struct), from A_Ptr alone.
```
struct A {
int AFld1;
}
A* A_Ptr;
struct B {
int BFld2;
typeof(A_Ptr)[0..($-1)] ASUB; // Idea is ASUB of type A, from
A_
On Wednesday, 13 December 2023 at 12:49:14 UTC, fred wrote:
[...]
a bug ?
thanks anyway
Try to define the flag as static
```d
static shared(bool) isDone = false;
```
I dont know if that should be a compiler error to have local
shared (I tend to think yes as locals are specific to a frame,
i
On Wednesday, 13 December 2023 at 12:49:14 UTC, fred wrote:
a bug ?
It helps if you explain what you're talking about so we don't
have to guess.
I tried the code on my computer and it worked fine. But then
figuring, you must be saying something doesn't work right, I
tried it on another com
I have question here. Is there a difference between .sizeof and
.length(of a char[])? For example, let's say you have the
following array: char[2][] members.
Is it possible for members[0].sizeof == members[1].sizeof but
members[0].length != members[1].length? Thanks in advance.
Do not understand why one line is not considered @safe, but the
other is.
//
module test;
import std;
@safe void main()
{
immutable string[] strings = ["one", "one", "two"];
immutable(string)*[] pointers = null;
foreach(size_t i, ref str; strings)
{
if(str == "on
I have a line of code, that I do NOT want executed when -debug is
passed in.
enforce(!exists(fname), "Oop! That file already exists!");
Is this even possible? (with using -version ..)
trying to make sense of the below:
// ---
module test;
import std;
void main()
{
auto rnd = Random(unpredictableSeed);
int howManyTimes = 5;
// ok - using 'e =>' makes sense
writeln(howManyTimes.iota.map!(e => rnd.dice(0.6,
1.4)).format!"%(%s,%)");
// ok - though using
If I declare a function as extern(C) inside a DLL, I have also to
cast the function pointer as extern(C) or it fails calling, eg.
```d
// --- my.dll
export extern (C) void log(int mode, string a, string b, string
c) {
/* stuff */
}
// --- main.d
alias T = extern (C) void function(int, strin
I have simple test program:
import core.stdc.stdio : printf;
void test() {
int* a;
printf("a == null %d\n", a == null);
}
int function() fp = test;
extern (C) void main() {
fp();
}
Why do I get:
\d\dmd-2.092.1\windows\bin64\dmd.exe -betterC tests.d
tests.d(5): Error: printf canno
.property = "test";
.method = "test";
.method("test");
What does -property exactly do?
If you had like a dynamic where you don't know if it's
member is a property or a method. You would choose
method right?
scratch the invalid ones below.
---
.property="test";
.pr
I'm trying to write a range-based template that iterates over a range
and returns one of its elements according to some criterion:
ElementType!R choose(R, E)(R range)
if (isInputRange!R)
{
ElementType!R e;
while (!range.empty) {
I'm having a problem with regexes.
The following code gives a compilation error. If I comment out
the regex outside of main and comment in the regex inside of main
then it does compile.
I'm using DMD v2.058
Any ideas what is going on?
--
import std.regex;
Regex!(char) testRegex = rege
I have the following code:
import std.stdio;
import std.metastrings;
pure int[] testCTFE(){
int[] r;
pragma(msg, "Testing CTFE");
foreach(i; 0 .. 360){
r ~= i;
pragma(msg, Format!("Loop: %d",i));
}
pragma(msg, "Done CTFE test");
return r;
y understanding daemons will
survive the termination of the main-thread and be killed by
a signal (KILL, SIGTERM etc) or finish itself.
I think that is the case here too. Is that true ?
Another question: I cannot find a reference how D deals with
OS SIGNALS, especially about differences betwe
Why do the commented out calls to goo fail?
Thanks
Dan
-
import std.stdio;
struct S {
}
void goo(const ref S s) {
writeln(s);
}
struct T {
S s;
void foo(const ref T other) const {
goo(s);
// Error: function fdsaf.goo (ref const(S) s) is
//
I have a style question, because a friend of mine has a similar
problem currently and I have no good advice for him.
Let's assume we have this classes:
class MyClass {
public:
enum A {
Foo = 0,
Bar = 1
}
private:
A _a;
p
Hi,
The following does not compile, and I do not understand what I am
doing wrong.
import std.base64;
ubyte[] s0 = ['H','e','l','l','o'];
char[40] s1;
void main () {
Base64.encode (s0, s1);
}
The compile error is:
[snip]/src/phobos/std/range.d(614): Error: static assert "Cannot
put a im
I'd like to create an empty heap, and then add to it an arbitrary (and
statically unknown) number of items, keeping the heap invariant valid all the
time (this means the heap invariant is valid after each item is added to the
heap, so I am free to pop items in any moment). Do you know if this is
does D compatibility with C restrict D from evolving ?
and if D drop this will that prevent complexity?
consider the follwoing:
import tango.io.Stdout, tango.io.Path, tango.text.Util;
import std.algorithm, std.string , std.stdio, std.array,
std.conv, std.regex, std.typecons;
//i know al imports are not necessary for this example, just ^c^v
from my actual code
alias string[] surSegments
void
I would like to use enums with elements that are either a struct
type
or a class type. However, using struct type seems inefficient
because
structs are pass by value. Apparently you can't pass an enum as
a reference,
so eliminating the pass by value for enums does not seem
possible. I have
Hello!
I'm trying to generate documentation for a library.
I like result of DDOX generation - nice navigation by modules and
classes.
But I cannot figure out how to generate custom pages (e.g. from
.dd .d Ddoc), and how to add links to custom pages to all
generated pages, e.g. like on Vibe.d d
Feels pretty silly, but I can't compile this:
import std.random;
auto i = uniform(0, 10);
DMD spits this:
/usr/include/dmd/phobos/std/random.d(1188): Error: static
variable initialized cannot be read at compile time
/usr/include/dmd/phobos/std/random.d(1231):called from
here: rndGen
Hello. In object.di rt_finalize calls for class objects in
destroy func.
I not found it in dmd source on github and not found in druntime
sources.
I think rt_finalize must call dtors for object and base classes,
but I think that's not all. Or if it all has it code logic
problems?
void myDestr
Are there any cases where the following cases both compile but are not
identical?
A a;
B b;
a = b;
a.Foo();
and
A a;
B b;
a = b;
b.Foo();
The reason I ask is I'm wondering if making the type (and value) of an assignment
expression the right hand side rather than the left hand side wou
Does to! (uint) recognize hexadecimal strings?
Cause if i put
int by = to!(int)("0x0FFF");
throws an exception saying;
std.conv.ConvError: Can't convert value `x0FFF' of type const(char)[] to type
int
dmd 2.031;
Does to! (uint) recognize hexadecimal strings?
Cause if i put
int by = to!(int)("0x0FFF");
throws an exception saying;
std.conv.ConvError: Can't convert value `x0FFF' of type const(char)[] to type
int
dmd 2.031;
Does to! (uint) recognize hexadecimal strings?
Cause if i put
int by = to!(int)("0x0FFF");
throws an exception saying;
std.conv.ConvError: Can't convert value `x0FFF' of type const(char)[] to type
int
dmd 2.031;
hi im noob here and try learn D language, i try make this example but when run
have 2 problems.
1) when i show name and lastname show me in two lines and i wanna make in the
same line.
2) can´t validate option si ( yes ) or no ( no ) and always show the else line.
what happend?
thx
---
const char[] re1 = `(re)1`;
const char[] re2 = `(re)2`;
char[] matchWrite(RegExp re)
{
writefln(re.match(1),`,`,re.match(2));
return "";
}
std.regexp.sub(`re1 re2`, re1~'|'~re2, &matchWrite, "g");
--- prints
re,
re,re // shouldn't this be `,re`?
Given below code(Win32 SDK):
int /*LRESULT*/ wndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch(msg)
{
case WM_LBUTTONDOWN:
{
Hi folks,
I'd like to wrap a family of C functions that look like this:
gboolean fooXXX(arg1, ..., argN, GError** err)
Their signatures and arities vary, but they all have a GError** as
their last argument. If a function returns false, then 'err' will be
set to a relevant Error struct.
I
vartmpl.d
```
import std.stdio : writeln;
import decimal : decimal32;
template F(T) {
immutable T c = 3;
}
void foo (T) ()
{
immutable T t = 1;
}
void main ()
{
// immutable decimal32 i = 1; // Error: none of the overloads
of '__ctor' are
callable using a immutable object
// foo!dec
Hello everyone.I'm a newbie on the D language.When i use the
library 'std.conv' ,i met some problem.
This is what I have:
static import std.conv;
string aaa = "123456789";
uint idx = 5;
string bbb = aaa[0 .. idx];
uint work = std.conv.parse!(uint)(bbb); // this works
ui
Norm wrote:
Hi,
I'm new to D so can someone explain to me what is happening here?
void func(const char* s, char** e) {
import core.stdc.stdlib;
auto result = strtod(s, e);
}
Error: function core.stdc.stdlib.strtod (scope inout(char)* nptr, scope
inout(char)** endptr) is not callab
On Monday, 12 February 2018 at 05:33:16 UTC, Norm wrote:
I thought inout was supposed to take const or non-const
variants, so expected the original const char* s to work.
The problem is in argument e: it's mutable, and strtod stores
there a part of s, if s is const you end up with const data
On Monday, 12 February 2018 at 05:37:23 UTC, ketmar wrote:
Norm wrote:
Hi,
I'm new to D so can someone explain to me what is happening
here?
void func(const char* s, char** e) {
import core.stdc.stdlib;
auto result = strtod(s, e);
}
Error: function core.stdc.stdlib.strtod (scope
lobo wrote:
sure, i meant that you have to modify the second parameter accordingly. ;-)
anyway, it's good that you fixed it.
On 2/12/18 12:33 AM, Norm wrote:
Hi,
I'm new to D so can someone explain to me what is happening here?
void func(const char* s, char** e) {
import core.stdc.stdlib;
auto result = strtod(s, e);
}
Error: function core.stdc.stdlib.strtod (scope inout(char)* nptr, scope
inout(char)** e
On Thursday, 15 March 2018 at 15:28:16 UTC, Miguel L wrote:
Why does std.math.signbit only work for floating point types?
Is there an analogue function for integer types?
I guess because for integers you don't need to distinguish
between +0.0 and -0.0, so no one bother until now to add it to
On Thursday, 15 March 2018 at 15:28:16 UTC, Miguel L wrote:
Why does std.math.signbit only work for floating point types?
Integers are stored in an entirely different way, twos-complement
instead of having a sign bit.
You probably shouldn't be using the sign bit function at all, it
is for d
On Thursday, 15 March 2018 at 15:28:16 UTC, Miguel L wrote:
Why does std.math.signbit only work for floating point types?
Is there an analogue function for integer types? what is the
best way to compare the sign of a float with the sign of an
integer?
Thanks in advance
integers don't have a
faster you have to experiment.
Thanks. Just one more question:
Is this code correct? I don't care about +0 or -0 as the
calculations on f guarantee it cannot be 0 at all.
int a;
float f;
if((a<0)==signbit(f)) {}
else {...}
On Thursday, 15 March 2018 at 16:31:56 UTC, Stefan Koch wrote:
On Thursday, 15 March 2018 at 15:28:16 UTC, Miguel L wrote:
Why does std.math.signbit only work for floating point types?
Is there an analogue function for integer types? what is the
best way to compare the sign of a float with the
lt; (sizeof(var)*8 - 1));
though I cannot tell which one is faster you have to
experiment.
Thanks. Just one more question:
Is this code correct? I don't care about +0 or -0 as the
calculations on f guarantee it cannot be 0 at all.
int a;
float f;
if((a<0)==signbit(f)) {...
they are not necessarily singed.
However if an integer is signed and using 1-complement
you can either do sign = var < 0 or
sign = (var & (1 << (sizeof(var)*8 - 1));
though I cannot tell which one is faster you have to
experiment.
Thanks. Just one more question:
Is this code correct?
:
[...]
integers don't have a sign-bit.
since they are not necessarily singed.
However if an integer is signed and using 1-complement
you can either do sign = var < 0 or
sign = (var & (1 << (sizeof(var)*8 - 1));
though I cannot tell which one is faster you have to experiment.
Thanks. Just
Miguel L wrote:
as the calculations on f guarantee it cannot be 0 at all.
than `f` will become zero very soon. something that "cannot happen" is the
most probable thing to happen.
otherwise, LGTM.
On Thursday, 15 March 2018 at 17:30:48 UTC, Seb wrote:
They generate the same assembly: https://godbolt.org/g/4ohTJx
import std.stdio;
void main()
{
writeln("hello");
}
this generate error for dmd there.
On Friday, 16 March 2018 at 07:00:36 UTC, ashit axar wrote:
On Thursday, 15 March 2018 at 17:30:48 UTC, Seb wrote:
They generate the same assembly: https://godbolt.org/g/4ohTJx
import std.stdio;
void main()
{
writeln("hello");
}
this generate error for dmd there.
`writeln` is not sup
On Friday, 16 March 2018 at 08:35:58 UTC, Radu wrote:
On Friday, 16 March 2018 at 07:00:36 UTC, ashit axar wrote:
On Thursday, 15 March 2018 at 17:30:48 UTC, Seb wrote:
They generate the same assembly: https://godbolt.org/g/4ohTJx
import std.stdio;
void main()
{
writeln("hello");
}
th
Hi.
Dll or shared library is important feature of software
development.
So why most d library still static link.
I am sorry for my stupid question.
Thanks.
How to generate temporary files so compilation time speeds up.
Normal compilation only produce obj, exe.
If what i mean is that if we compile the files that unchanged,
dmd will look for that temporary files instead of .d files.
Hi,
I have a maybe trivial question on how to insert or update a
given entry in a multidimensional AA. So I have this AA:
/// language, chapter, section. Content is a magic struct
Content[int][string][string] contentAA;
In some part of my code I want to either add a complete new entry
ork around this?
Thanks and Regards
Dibyendu
They don't.
Counter question: What's so bad about the D std library ?
On Friday, 22 January 2016 at 01:03:09 UTC, Dibyendu Majumdar
wrote:
On Friday, 22 January 2016 at 00:52:59 UTC, W.J. wrote:
Counter question: What's so bad about the D std library ?
I am trying to create bindings for existing C library so I was
trying to use htod for that.
The li
On Friday, 22 January 2016 at 00:52:59 UTC, W.J. wrote:
Counter question: What's so bad about the D std library ?
I am trying to create bindings for existing C library so I was
trying to use htod for that.
On Friday, 22 January 2016 at 01:04:50 UTC, Dibyendu Majumdar
wrote:
On Friday, 22 January 2016 at 01:03:09 UTC, Dibyendu Majumdar
wrote:
On Friday, 22 January 2016 at 00:52:59 UTC, W.J. wrote:
Counter question: What's so bad about the D std library ?
I am trying to create binding
On 2016-01-22 01:31, Dibyendu Majumdar wrote:
I tried using htod but got errors as it could not handle the std C
header files (Visual C++). How do people work around this?
You could try DStep [1]. Although I'm not entirely sure if it works on
Windows. It uses libclang, so if Clang can handle t
Hi
I am trying to create a simple shared library that exports a D
function, but when I try to link to it I get errors such as:
error LNK2001: unresolved external symbol _D7xxx12__ModuleInfoZ
Here xxx is the module inside the shared library.
I am using DMD and MS LINKER (Windows 64-bit) to c
On Friday, 22 January 2016 at 01:04:50 UTC, Dibyendu Majumdar
wrote:
On Friday, 22 January 2016 at 01:03:09 UTC, Dibyendu Majumdar
wrote:
On Friday, 22 January 2016 at 00:52:59 UTC, W.J. wrote:
Counter question: What's so bad about the D std library ?
I am trying to create binding
On Thursday, 4 February 2016 at 06:40:15 UTC, sanjayss wrote:
Are the functions lastSocketError() and wouldHaveBlocked() from
std.socket thread-safe? i.e. can they be reliably used to see
the status of the last socket call when sockets are being
read/written in multiple threads?
Not directly
suppose I have a forward or random access range. what's the best
way to compare each element with the element 4 elements prior to
that element? I could map each element to a tuple of the element
and the element 4 bars previously and do it that way. any neater
way ?
On 7/26/16 8:13 AM, DLearner wrote:
Suppose a program contains several points that control should not get to.
So each such point is blocked by assert(0).
What is the recommended way of identifying which assert has been triggered?
Is one allowed anything like 'assert(0,"Crashed at point A");', wh
On Tuesday, 26 July 2016 at 12:13:02 UTC, DLearner wrote:
What is the recommended way of identifying which assert has
been triggered?
If you compile with -g, run the program in a debugger. It will
tell you.
If you compile and do NOT use -release, the error message
automatically printed by t
It's seems that __treats is language keyword that help to get
info from compile-time. But there is also lib named std.traits
and I can't understand difference
https://dlang.org/spec/traits.html
https://dlang.org/phobos/std_traits.html
Could you explain the difference?
This is probably so simple that there's no example anywhere.
Basically, I've got a huge array definition (see below) which I
reuse over and over again in different projects.
GLfloat[] vertices =
[
// Positions // Texture Coords
-0.5f, -0.5f, -0.5f, 0.0f, 0.0f,
0.5f, -0.5
I need to see errors from dsfml.system.err, but it doesn't write
to terminal as I expected.
The general problem is that I cannot listen any port by
tcplistener. And listen method is:
Status accept(TcpSocket socket)
{
import dsfml.system.string;
Hi,
I'm a very experienced C++ programmer, looking at a program
written in D. D is similar enough to C++ and Java that I have no
problem understanding it - except for one thing. I think I may
have figured it out, but I want to confirm my understanding.
What does it mean when a variable name
void foo(T)(T t){writeln("a");}
void foo(T...)(T t){writeln("b");}
foo(1);
Compiles? If so, which prints out?
I was surprised by the answer. I can't find docs for it. Is the behavior
intended?
-Steve
Hi,
I am using DUB with the SDL language and I have two questions:
1. How can I add some text file to my project? I want to add shaders
in my Visual Project.
2. How to make a compiler option depending on the platform and debug
mode at the same time?
Thanks.
On Wednesday, 1 February 2017 at 06:58:43 UTC, osa1 wrote:
I'm wondering what
are the implications of the fact that current GC is a
Boehm-style conservative
GC rather than a precise one, I've never worked with a
conservative GC before.
The GC isn't competitive with the ones you find in GC lan
On Wednesday, 1 February 2017 at 09:40:17 UTC, Ola Fosheim
Grøstad wrote:
On Wednesday, 1 February 2017 at 06:58:43 UTC, osa1 wrote:
I'm wondering what
are the implications of the fact that current GC is a
Boehm-style conservative
GC rather than a precise one, I've never worked with a
conserva
On Wednesday, 1 February 2017 at 09:50:42 UTC, osa1 wrote:
Thanks for the answer. Could you elaborate on the lacklustre
part? It's fine if I have to do manual memory management, but I
don't want any leaks. Ideally I'd have a precise GC + RAII
style resource management when needed.
Rust, Go, J
On Wednesday, 1 February 2017 at 06:58:43 UTC, osa1 wrote:
Are there any disallowed memory operations?
Currently can't touch GC from destructor during collection.
Another concern is interoperability with C-allocated memory: GC
knows nothing about C heap.
How often does it leak?
Leaks are
On Friday, 3 February 2017 at 10:49:00 UTC, Kagamin wrote:
Leaks are likely in 32-bit processes and unlikely in 64-bit
processes. See e.g.
https://issues.dlang.org/show_bug.cgi?id=15723
This looks pretty bad. I think I'll consider something else until
D's memory management story gets better.
On Friday, 3 February 2017 at 11:36:26 UTC, osa1 wrote:
On Friday, 3 February 2017 at 10:49:00 UTC, Kagamin wrote:
Leaks are likely in 32-bit processes and unlikely in 64-bit
processes. See e.g.
https://issues.dlang.org/show_bug.cgi?id=15723
This looks pretty bad. I think I'll consider someth
On Wednesday, 1 February 2017 at 06:58:43 UTC, osa1 wrote:
I'm wondering what
are the implications of the fact that current GC is a
Boehm-style conservative
GC rather than a precise one, I've never worked with a
conservative GC before.
Are there any disallowed memory operations? Can I break thi
On Saturday, 4 February 2017 at 11:09:21 UTC, thedeemon wrote:
On Wednesday, 1 February 2017 at 06:58:43 UTC, osa1 wrote:
I'm wondering what
are the implications of the fact that current GC is a
Boehm-style conservative
GC rather than a precise one, I've never worked with a
conservative GC bef
On Saturday, 4 February 2017 at 12:56:55 UTC, osa1 wrote:
I'm surprised that D was able to come this far with this.
It's used mostly for server software. Things are moving to 64
bit, so this will be less of an issue.
On Saturday, 4 February 2017 at 12:56:55 UTC, osa1 wrote:
- Automatic but conservative. Can leak at any time.
All GCs are prone to leak, including precise ones. The point of
garbage collection is not to prevent leaks, but rather to prevent
use-after-free bugs.
Granted, the D 32 bit GC is mo
All GCs are prone to leak, including precise ones. The point of
garbage collection is not to prevent leaks, but rather to
prevent use-after-free bugs.
Of course I can have leaks in a GC environment, but having
non-deterministic leaks is another thing, and I'd rather make
sure to delete my ref
On Saturday, 4 February 2017 at 12:56:55 UTC, osa1 wrote:
- Automatic but conservative. Can leak at any time. You have to
implement manual management (managed heaps) to avoid leaks.
Leaks are hard to find as any heap value may be causing it.
By "managed heap" I just meant the GC heap, the one
On 05/02/2017 5:02 PM, thedeemon wrote:
snip
It may look so from a distance. But in my experience it's not that bad.
In most software I did in D it did not matter really (it's either 64-bit
or short lived programs) and the control D gives to choose how to deal
with everything makes it all quite
On Sunday, 5 February 2017 at 04:22:30 UTC, rikki cattermole
wrote:
On 05/02/2017 5:02 PM, thedeemon wrote:
snip
It may look so from a distance. But in my experience it's not
that bad.
In most software I did in D it did not matter really (it's
either 64-bit
or short lived programs) and the co
On Saturday, 4 February 2017 at 15:23:53 UTC, Adam D. Ruppe wrote:
On Saturday, 4 February 2017 at 12:56:55 UTC, osa1 wrote:
- Automatic but conservative. Can leak at any time.
All GCs are prone to leak, including precise ones. The point of
garbage collection is not to prevent leaks, but rath
On Sunday, May 28, 2017 16:49:16 Brad Roberts via Digitalmars-d-learn wrote:
> Is there a mechanism for declaring something pure when it's built from
> parts which individually aren't?
>
> string foo(string s)
> {
> // do something arbitrarily complex with s that doesn't touch
> globals or cha
On 5/28/2017 5:34 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
On Sunday, May 28, 2017 16:49:16 Brad Roberts via Digitalmars-d-learn wrote:
Is there a mechanism for declaring something pure when it's built from
parts which individually aren't?
string foo(string s)
{
// do something
On Monday, 29 May 2017 at 00:53:25 UTC, Brad Roberts wrote:
On 5/28/2017 5:34 PM, Jonathan M Davis via Digitalmars-d-learn
wrote:
On Sunday, May 28, 2017 16:49:16 Brad Roberts via
Digitalmars-d-learn wrote:
Is there a mechanism for declaring something pure when it's
built from
parts which indi
On 5/28/2017 6:01 PM, Stefan Koch via Digitalmars-d-learn wrote:
On Monday, 29 May 2017 at 00:53:25 UTC, Brad Roberts wrote:
On 5/28/2017 5:34 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
On Sunday, May 28, 2017 16:49:16 Brad Roberts via
Digitalmars-d-learn wrote:
Is there a mechanism f
On Monday, 29 May 2017 at 01:01:46 UTC, Stefan Koch wrote:
There is
void[] myPureMalloc(uint size) pure @trusted nothrow @nogc
{
import core.stdc.stdlib : malloc;
alias pure_malloc_t = @nogc pure nothrow void* function(size_t
size);
return (cast(pure_malloc_t)&malloc)(size)[0 .. siz
1 - 100 of 1824 matches
Mail list logo