On Saturday, 10 February 2018 at 07:47:58 UTC, Nicholas Wilson
wrote:
On Saturday, 10 February 2018 at 06:32:43 UTC, German Diago
Alternatively you could do something like
auto opDispatch(string name)()
if(hasMember!(HeaderData,name){
readHeader();
return mixin("head
I know that according to language spec
(https://dlang.org/spec/arrays.html#static-init-static) you can
skip declaring all your elements in a fixed size array.
I'm just recovering from a bug which took me one day to discover
because of this.
I have a large static initialized array, let's say
On Saturday, 10 February 2018 at 10:55:30 UTC, rumbu wrote:
I know that according to language spec
(https://dlang.org/spec/arrays.html#static-init-static) you can
skip declaring all your elements in a fixed size array.
I'm just recovering from a bug which took me one day to
discover because o
https://issues.dlang.org/show_bug.cgi?id=481#c40
Do I overlook something?
/// --- code --- ///
import std.typecons;
void main(){}
static assert(!__traits( compiles, E()));
static assert(!__traits( compiles, MyE())); // line 6
struct E
{
size_t dummy;
@disable this();
this(size_t val) { dummy = val; }
}
alias MyE = T
On Saturday, 10 February 2018 at 12:28:16 UTC, b2.temp wrote:
On Saturday, 10 February 2018 at 10:55:30 UTC, rumbu wrote:
I know that according to language spec
(https://dlang.org/spec/arrays.html#static-init-static) you
can skip declaring all your elements in a fixed size array.
I'm just rec
On Saturday, 10 February 2018 at 14:35:52 UTC, rumbu wrote:
On Saturday, 10 February 2018 at 12:28:16 UTC, b2.temp wrote:
On Saturday, 10 February 2018 at 10:55:30 UTC, rumbu wrote:
I know that according to language spec
(https://dlang.org/spec/arrays.html#static-init-static) you
can skip decl
On Saturday, 10 February 2018 at 14:55:49 UTC, b2.temp wrote:
On Saturday, 10 February 2018 at 14:35:52 UTC, rumbu wrote:
In this case, it there any way to be sure that I declared all
the elements I intended? Obviously, without counting them by
hand.
At the level of the library use a templa
On Saturday, 10 February 2018 at 15:54:03 UTC, rumbu wrote:
On Saturday, 10 February 2018 at 14:55:49 UTC, b2.temp wrote:
On Saturday, 10 February 2018 at 14:35:52 UTC, rumbu wrote:
In this case, it there any way to be sure that I declared all
the elements I intended? Obviously, without count
Hi,
I've got an immutable string declared in module scope, and I
attempted to get a pointer to its characters through both &str[0]
and str.ptr. However, it appears to me that the string is
behaving like a manifest constant, in that the pointer is null.
The language reference indicates that i
On 02/10/2018 11:26 PM, David Zhang wrote:
I've got an immutable string declared in module scope, and I attempted
to get a pointer to its characters through both &str[0] and str.ptr.
However, it appears to me that the string is behaving like a manifest
constant, in that the pointer is null.
T
On Saturday, 10 February 2018 at 22:36:41 UTC, ag0aep6g wrote:
On 02/10/2018 11:26 PM, David Zhang wrote:
I've got an immutable string declared in module scope, and I
attempted to get a pointer to its characters through both
&str[0] and str.ptr. However, it appears to me that the string
is beh
Building with Visual Studio seems to be fine. This isn't an
OptLink issue, is it?
On 02/10/2018 11:46 PM, David Zhang wrote:
This is what I'm talking about:
void createWindow( ... ) {
assert( wndclassName.ptr ); //This fails
HWND hwnd = CreateWindowW(
wndclassName.ptr, //This too
null,
0,
CW_USEDEFAULT, CW_USEDEFAULT,
C
On Saturday, 10 February 2018 at 22:59:18 UTC, ag0aep6g wrote:
But there is a recent regression on Windows that might be
related. Do you also have a static constructor (`static this`)
that uses `wndclassName`? If so, you might be hitting issue
18412.
https://issues.dlang.org/show_bug.cgi?id=1
On Saturday, 10 February 2018 at 13:18:28 UTC, Alex wrote:
Do I overlook something?
/// --- code --- ///
import std.typecons;
void main(){}
static assert(!__traits( compiles, E()));
static assert(!__traits( compiles, MyE())); // line 6
struct E
{
size_t dummy;
@disable this()
On Saturday, 10 February 2018 at 10:55:30 UTC, rumbu wrote:
I have a large static initialized array, let's say int[155],
and I forgot to declare the last element:
int[155] myarray = [
a,
b,
c,
...
//forgot to declare the 155th element
];
Well, in C.. I can do:
int arr[2] = { [0]
On Sunday, 11 February 2018 at 00:54:07 UTC, Simen Kjærås wrote:
Typedef explicitly initializes the wrapped value to T.init,
thus circumventing the disabled default constructor. Filed a
bug:
https://issues.dlang.org/show_bug.cgi?id=18415
--
Simen
Thanks!
On Sunday, 11 February 2018 at 01:13:00 UTC, psychoticRabbit
wrote:
Well, in C.. I can do:
int arr[2] = { [0]=10, [1]=20 };
I cannot work out how to do that in D yet (anyone know??)
Oh. just worked it out after reading this thread ;-)
int[2] arr = [ 0:10, 1:20 ];
On Saturday, 10 February 2018 at 02:55:26 UTC, Alex wrote:
bug filed
https://issues.dlang.org/show_bug.cgi?id=18416
On Sunday, 26 November 2017 at 11:15:58 UTC, Jacob Carlborg wrote:
On 2017-11-25 23:31, Mike Parker wrote:
For "ld" on macOS the order does not matter. For "ld" on Linux
the order does matter, but, if necessary, the following flags
can be used to link libraries in any order: "--start-group" an
I do call a program from my application which changes its stdout
perdiodically (with ncurses library, I guess), where I'd to get
somehow "notified" when some change happen (I need to new data
from that changes and change my application accordingly).
Currently, I do use spawnProcess() which runs
On Sunday, 11 February 2018 at 01:26:59 UTC, psychoticRabbit
wrote:
On Sunday, 11 February 2018 at 01:13:00 UTC, psychoticRabbit
wrote:
Well, in C.. I can do:
int arr[2] = { [0]=10, [1]=20 };
I cannot work out how to do that in D yet (anyone know??)
Oh. just worked it out after reading thi
23 matches
Mail list logo