Does DMD cache template instantiations?
That is, is it preferred to do, for instance, either
static if (isIntegral!T && isUnsigned!(T)) {}
else static if (isIntegral!T && isSigned!(T)) {}
or
enum integral = isIntegral!T;
static if (integral && isUnsigned!(T)) {}
e
On Saturday, 17 October 2015 at 07:48:39 UTC, Nordlöw wrote:
Does DMD cache template instantiations?
Yes, and it's required by the spec:
"Multiple instantiations of a TemplateDeclaration with the same
TemplateArgumentList all will refer to the same instantiation."
http://dlang.org/template.h
On Saturday, 17 October 2015 at 02:02:16 UTC, Jakob Ovrum wrote:
On Friday, 16 October 2015 at 10:45:52 UTC, Chris wrote:
Later you call the function with the Lua C API like
"lua_pcall(L, 0, 1, 0);". It's a bit tricky to move things
around on the Lua stack, but you'll get there! ;)
Or you cou
many thanks for the valuable insights.
so far i made a simple prototype with LuaD and classes, works
nicely for when my niput
what so far is not 100% clear is if there is a way to have a
parsed
msgpack or json documents being exposed in my lua code in a way
so it behaves
like a lua object.
I
import std.string, std.typecons, std.exception,
std.algorithm,std.stdio;
import std.traits: hasIndirections;
struct GrowableCircularQueue(T) {
public size_t length;
private size_t first, last;
private T[] A = [T.init];
this(T[] items...) pure nothrow @safe {
foreach (x;
On Saturday, October 17, 2015 04:17 PM, steven kladitis wrote:
> // it thows a range exception
On which line?
On Saturday, 17 October 2015 at 14:47:11 UTC, anonymous wrote:
On Saturday, October 17, 2015 04:17 PM, steven kladitis wrote:
// it thows a range exception
On which line?
core.exception.RangeError@sokuban.d(84): Range violation
On Saturday, October 17, 2015 04:50 PM, steven kladitis wrote:
> core.exception.RangeError@sokuban.d(84): Range violation
Line 84 being this:
sDataBuild ~= sMap[ch];
Where sMap is:
/*static*/ immutable sMap =
[' ':' ', '.':'.', '@':' ', '#':'#', '$':' '];
On Saturday, 17 October 2015 at 14:59:41 UTC, anonymous wrote:
On Saturday, October 17, 2015 04:50 PM, steven kladitis wrote:
core.exception.RangeError@sokuban.d(84): Range violation
Line 84 being this:
sDataBuild ~= sMap[ch];
Where sMap is:
/*static*/ immutable sMap =
In Python there is:
if __name__ == "__main__":
to allow the same source file to be treated as both an importable library
and as an executable script. In D is there any such mechanism to make a
main() compiled selectively, i.e. by some compile-time flag or such?
--
Shriramana Sharma, Penguin #
On Saturday, October 17, 2015 05:36 PM, Shriramana Sharma wrote:
> In Python there is:
>
> if __name__ == "__main__":
>
> to allow the same source file to be treated as both an importable library
> and as an executable script. In D is there any such mechanism to make a
> main() compiled selectiv
On Saturday, 17 October 2015 at 13:15:17 UTC, yawniek wrote:
many thanks for the valuable insights.
so far i made a simple prototype with LuaD and classes, works
nicely for when my niput
what so far is not 100% clear is if there is a way to have a
parsed
msgpack or json documents being expose
On Wednesday, 14 October 2015 at 18:17:29 UTC, Russel Winder
wrote:
On Wed, 2015-10-14 at 14:48 +, John Colvin via
Digitalmars-d-learn wrote:
On Wednesday, 14 October 2015 at 14:32:00 UTC, jmh530 wrote:
> On Tuesday, 13 October 2015 at 23:26:14 UTC, Laeeth Isharc
> wrote:
> > https://www.q
13 matches
Mail list logo