I think this is what you want around the file access section:
http://dlang.org/statement.html#SynchronizedStatement
- Vijay
On Wednesday, 14 November 2012 at 16:43:37 UTC, Joseph Rushton
Wakeling wrote:
I take it there's no more native-to-D way of implementing a
file lock? :-(
This fails to compile when accessing as m.pgoo() complaining
about postblit.
What is wrong with this?
Note: If I alias as array instead of map: alias const(X)[] Map;
it compiles fine.
Thanks
Dan
-
struct X { this(this) {} }
alias const(X)[string] Map;
@property int
This fails to compile when accessing as m.pgoo() complaining
about postblit.
What is wrong with this?
Note: If I alias as array instead of map: alias const(X)[] Map;
it compiles fine.
Thanks
Dan
-
struct X { this(this) {} }
alias const(X)[string] Map;
@property int
This fails to compile when accessing as m.pgoo() complaining
about postblit.
What is wrong with this?
Note: If I alias as array instead of map: alias const(X)[] Map;
it compiles fine.
Thanks
Dan
-
struct X { this(this) {} }
alias const(X)[string] Map;
@property int
On Wednesday, November 14, 2012 18:59:29 Joseph Rushton Wakeling wrote:
On 11/14/2012 06:49 PM, Vijay Nayar wrote:
Could you put the file access in a synchronized block?
http://dlang.org/statement.html#SynchronizedStatement
Oh, good call -- seems to work.
I would point out though that
http://www.reddit.com/r/programming/comments/137kqg/static_typing_contracts_and_unit_tests/#
Bye,
bearophile
http://d.puremagic.com/issues/show_bug.cgi?id=8863
--- Comment #3 from Kenji Hara k.hara...@gmail.com 2012-11-14 00:13:59 PST ---
(In reply to comment #2)
So I'd say it is a bug, and the fault is likely in
TemplateInstance::hasNestedArgs().
I think that the rule should not be applied to the
http://d.puremagic.com/issues/show_bug.cgi?id=8863
--- Comment #4 from Walter Bright bugzi...@digitalmars.com 2012-11-14
00:31:21 PST ---
The example you gave an example of a bug where a reference to a local is
returned, something entirely different.
--
Configure issuemail:
http://d.puremagic.com/issues/show_bug.cgi?id=8863
--- Comment #5 from Kenji Hara k.hara...@gmail.com 2012-11-14 01:07:54 PST ---
(In reply to comment #4)
The example you gave an example of a bug where a reference to a local is
returned, something entirely different.
No, they are is related.
http://d.puremagic.com/issues/show_bug.cgi?id=8991
--- Comment #3 from Don clugd...@yahoo.com.au 2012-11-14 01:08:32 PST ---
I have no idea why this evil hacky code exists in Phobos, I cannot see how it
can possibly be correct. If it bypasses postblit, surely that's wrong.
If it is faster to
http://d.puremagic.com/issues/show_bug.cgi?id=8863
--- Comment #6 from Kenji Hara k.hara...@gmail.com 2012-11-14 01:08:01 PST ---
Furthermore, the original code had generated incorrect code silently. This
slight complicated code might cause access violation in 2.060 or earlier.
auto fun(T)(out
http://d.puremagic.com/issues/show_bug.cgi?id=8863
--- Comment #7 from Walter Bright bugzi...@digitalmars.com 2012-11-14
01:13:28 PST ---
I agree that the original code silently generated wrong code. So this isn't
really a regression.
But I think we can fix it. There is no way to make your
http://d.puremagic.com/issues/show_bug.cgi?id=9023
Summary: CTFE: cannot use ~= on an empty AA.
Product: D
Version: D1 D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component:
http://d.puremagic.com/issues/show_bug.cgi?id=4019
Don clugd...@yahoo.com.au changed:
What|Removed |Added
Status|REOPENED|RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8936
--- Comment #5 from Denis Shelomovskij verylonglogin@gmail.com 2012-11-14
12:49:12 MSK ---
(In reply to comment #4)
Any idea what file it's looking for?
Launching throw-C-release.exe with code from the second example from
description:
http://d.puremagic.com/issues/show_bug.cgi?id=8863
--- Comment #8 from Kenji Hara k.hara...@gmail.com 2012-11-14 02:05:18 PST ---
(In reply to comment #7)
But I think we can fix it. There is no way to make your example work, because
it is returning a reference to a local. But the original one
http://d.puremagic.com/issues/show_bug.cgi?id=7632
Don clugd...@yahoo.com.au changed:
What|Removed |Added
Keywords||wrong-code
http://d.puremagic.com/issues/show_bug.cgi?id=8175
Don clugd...@yahoo.com.au changed:
What|Removed |Added
Keywords||ice
Status|NEW
http://d.puremagic.com/issues/show_bug.cgi?id=7632
Don clugd...@yahoo.com.au changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8583
Don clugd...@yahoo.com.au changed:
What|Removed |Added
CC||exe...@gmail.com
---
http://d.puremagic.com/issues/show_bug.cgi?id=8596
--- Comment #20 from deadalnix deadal...@gmail.com 2012-11-14 04:40:08 PST ---
(In reply to comment #19)
Ok, the next step is to compile your app without -g. The reason is because
hash
tables are used in the dwarf debug generation, and I
http://d.puremagic.com/issues/show_bug.cgi?id=9019
Maxim Fomin ma...@maxim-fomin.ru changed:
What|Removed |Added
CC||ma...@maxim-fomin.ru
http://d.puremagic.com/issues/show_bug.cgi?id=9024
Summary: Inferring function argument types from other template
parameters
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity:
http://d.puremagic.com/issues/show_bug.cgi?id=9024
--- Comment #1 from Joseph Rushton Wakeling joseph.wakel...@webdrake.net
2012-11-14 05:44:26 PST ---
Created an attachment (id=1161)
Minimal source code with example of the issue
--
Configure issuemail:
http://d.puremagic.com/issues/show_bug.cgi?id=9014
--- Comment #2 from github-bugzi...@puremagic.com 2012-11-14 06:01:34 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd
http://d.puremagic.com/issues/show_bug.cgi?id=8991
--- Comment #4 from Dmitry Olshansky dmitry.o...@gmail.com 2012-11-14
06:42:57 PST ---
(In reply to comment #3)
I have no idea why this evil hacky code exists in Phobos, I cannot see how it
can possibly be correct. If it bypasses postblit,
http://d.puremagic.com/issues/show_bug.cgi?id=9014
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=7954
Manu turkey...@gmail.com changed:
What|Removed |Added
CC||turkey...@gmail.com
---
http://d.puremagic.com/issues/show_bug.cgi?id=9025
Summary: core.thread.Fiber seems to crash on Win64
Product: D
Version: D2
Platform: x86_64
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=9025
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=8968
Ellery Newcomer ellery-newco...@utulsa.edu changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=8968
Ellery Newcomer ellery-newco...@utulsa.edu changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8939
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Keywords||pull
--- Comment #2
http://d.puremagic.com/issues/show_bug.cgi?id=8939
--- Comment #3 from github-bugzi...@puremagic.com 2012-11-14 18:46:11 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd
http://d.puremagic.com/issues/show_bug.cgi?id=8936
--- Comment #7 from Walter Bright bugzi...@digitalmars.com 2012-11-14
18:50:51 PST ---
(In reply to comment #6)
It's damn hard to find matching DMD+druntime+phobos versions that compile
together for that pull so I can't test these out.
Just
http://d.puremagic.com/issues/show_bug.cgi?id=8939
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8996
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=9026
Summary: Template mixin identifier as template alias parameter
doesn't work
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords:
http://d.puremagic.com/issues/show_bug.cgi?id=9026
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Keywords||pull
--- Comment #1
http://d.puremagic.com/issues/show_bug.cgi?id=8688
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8702
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8617
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8645
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8522
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8629
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8966
--- Comment #1 from github-bugzi...@puremagic.com 2012-11-14 22:08:46 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd
http://d.puremagic.com/issues/show_bug.cgi?id=8966
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=6772
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=8517
Don clugd...@yahoo.com.au changed:
What|Removed |Added
Version|D2 |D1 D2
201 - 249 of 249 matches
Mail list logo