On Friday, 11 October 2024 at 17:58:00 UTC, Salih Dincer wrote:
There is no __traits mechanism to directly determine ...
```d
extern int x;
int y;
pragma(msg, __traits(isSame, y, x));
```
I tried it now, but as I said, it wouldn't be unreasonable:
SDB@79
On Friday, 11 October 2024 at 16:33:55 UTC, Quirin Schroll wrote:
```d
extern int x;
// int y;
```
(How) can I get the information that `x` is `extern` and `y` is
not? There seems to be no `__traits` for it.
There is no __traits mechanism to directly determine whether a
symbol is extern.
```d
extern int x;
// int y;
```
(How) can I get the information that `x` is `extern` and `y` is
not? There seems to be no `__traits` for it.
On Friday, November 17, 2023 2:11:30 AM MST Arafel via Digitalmars-d-learn
wrote:
> I mean, in order to know if something is an `enum`, I need to do:
>
> ```d
> enum isEnum(alias a) = is(typeof(a)) && !is(typeof(&a));
> ```
>
> which feels like the wrong approach, and too much error-prone. I also
looks it's one of those that's gone under
the radar.
- Jonathan M Davis
Thanks for finding it!
I think that in general D could do with a more systematic approach to
reflection. For me, it's one of its greatest features, and it's a bit of
a pity that it needs to be done
On Thursday, November 16, 2023 6:04:43 PM MST Jonathan M Davis via
Digitalmars-d-learn wrote:
> I would suggest that you open up a bug report for it -
> https://issues.dlang.org - and certainly, there's a good argument that what
> you're seeing here is a bug. I fully expect that what you're trying
On Thursday, November 16, 2023 3:03:25 AM MST Arafel via Digitalmars-d-learn
wrote:
> Hi all,
>
> Please consider the following currently non-working code:
>
> ```d
> struct bar {
> public alias pubInt = int;
> private alias privInt = int;
> }
>
> static foreach(member ; __traits(allMemb
Hi all,
Please consider the following currently non-working code:
```d
struct bar {
public alias pubInt = int;
private alias privInt = int;
}
static foreach(member ; __traits(allMembers, bar)) {
// Error: argument `int` has no visibility
pragma(msg, __traits(getVisibility, __tra
& Golang has Martini which is quite easy to use,
https://www.youtube.com/watch?v=tUFzdUIjVRg
On Wednesday, 25 November 2020 at 17:26:44 UTC, Alaindevos wrote:
hunt-http has no documentation and does not looks usable to me.
What looks usable is kemal & the crystal language,
https://kemalcr.com/guide/
Looks like Sinatra. That makes sense given the relationship of
Crystal to Ruby. Many l
hunt-http has no documentation and does not looks usable to me.
What looks usable is kemal & the crystal language,
https://kemalcr.com/guide/
ethod.
Then it stops.
What I find too complex:
- Sessions, session data , session variables
- Handler functions and delegates, compile-time reflection,
prefixes, annotation.
- Authentication
- Validating user input
This can be improved by improving documentation in very small
steps.
As comparison
data , session variables
- Handler functions and delegates, compile-time reflection,
prefixes, annotation.
- Authentication
- Validating user input
This can be improved by improving documentation in very small
steps.
As comparison here a tutorial of ruby-flask which uses only small
ste
On Friday, 20 November 2020 at 19:12:38 UTC, Alaindevos wrote:
I bought the book "D Web Development".
I understand only 20% of the book,the other 80% is way above my
head.
Compare, I own a book on flask development, and I understand
100% of it.
Which means I can use dlang for anything except QT
On Friday, 20 November 2020 at 19:12:38 UTC, Alaindevos wrote:
I bought the book "D Web Development".
I understand only 20% of the book,the other 80% is way above my
head.
Compare, I own a book on flask development, and I understand
100% of it.
Which means I can use dlang for anything except QT
I bought the book "D Web Development".
I understand only 20% of the book,the other 80% is way above my
head.
Compare, I own a book on flask development, and I understand 100%
of it.
Which means I can use dlang for anything except QT and serious
web development ...
On Sunday, 1 December 2019 at 14:42:46 UTC, Adam D. Ruppe wrote:
You can get the type at runtime by simply casting it...
if(auto c = cast(EventSocket) event) {
// is an event socket
}
Thanks.
I guess you need to be careful about which order you do those
tests so as not to cast to more gen
On Sunday, 1 December 2019 at 12:26:03 UTC, Michael Green wrote:
I don't know if this would be a sensible approach to try and
get at the actual class types for objects stored in some
container at runtime?
You can get the type at runtime by simply casting it...
if(auto c = cast(EventSocket) ev
On Sunday, 1 December 2019 at 12:26:03 UTC, Michael Green wrote:
interface Event {
[note to self - shouldn't make last minute checks and reverse
them by hand before posting]
That should of course read:
class Event {
I don't know if this would be a sensible approach to try and get
at the actual class types for objects stored in some container at
runtime?
I have noticed that this approach doesn't work if Event is an
interface rather than a ancestor class.
```
import std.stdio;
import std.string;
import s
Hi WebFreak. I'm glad you're getting something out of it. I
started this because it's the kind of thing I wished was out
there. It's good to know I'm not the only one.
On Tuesday, 28 May 2019 at 12:58:12 UTC, WebFreak001 wrote:
Could you maybe add screenshots to each blog post?
I've had a t
On Tuesday, 28 May 2019 at 09:47:23 UTC, Ron Tarrant wrote:
Good day to you all.
'Tis another Tuesday and time for a new blog post. This is a
continuation of the series on Dialogs and further, a
continuation of the mini-series-within-a-series on file
Dialogs. The subject is in the title as is
Good day to you all.
'Tis another Tuesday and time for a new blog post. This is a
continuation of the series on Dialogs and further, a continuation
of the mini-series-within-a-series on file Dialogs. The subject
is in the title as is fitting for a blog post about putting
things in the titleba
On Saturday, 13 April 2013 at 17:50:00 UTC, Tofu Ninja wrote:
On Saturday, 13 April 2013 at 17:45:12 UTC, Tofu Ninja wrote:
Maybe this is helpfully:
http://forum.dlang.org/thread/scgjnudclnwlbdqqd...@forum.dlang.org
Oddly enough, I found that at about the same time you posted
it.
Sadly this
On Friday, 22 December 2017 at 22:09:05 UTC, H. S. Teoh wrote:
On Fri, Dec 22, 2017 at 09:13:31PM +, kerdemdemir via
Digitalmars-d-learn wrote:
I want to make a logging function for member variables by
using reflection.
[...]
class B
{
void Log()
{
auto a = [__traits
On Fri, Dec 22, 2017 at 09:13:31PM +, kerdemdemir via Digitalmars-d-learn
wrote:
> I want to make a logging function for member variables by using reflection.
[...]
> class B
> {
> void Log()
> {
> auto a = [__traits(derivedMembers, D)];
>
I want to make a logging function for member variables by using
reflection.
import std.stdio;
class D : B
{
override void foo() {
a = 4.0;
b = 3.0;
}
double a;
double b;
}
class B
{
void Log()
{
auto a = [__traits(derivedMembers, D
05.10.2017 18:04, Adam D. Ruppe пишет:
On Thursday, 5 October 2017 at 14:59:10 UTC, drug wrote:
1) why .stringof and typeid() is equal logically and different in
fact? What is difference between them? Is it that stringof compile
time and typeid runtime things? Anyway wouldn't it be better they
On Thursday, 5 October 2017 at 14:59:10 UTC, drug wrote:
1) why .stringof and typeid() is equal logically and different
in fact? What is difference between them? Is it that stringof
compile time and typeid runtime things? Anyway wouldn't it be
better they will equal both logically and literally
https://run.dlang.io/is/8LbmzG
1) why .stringof and typeid() is equal logically and different in fact?
What is difference between them? Is it that stringof compile time and
typeid runtime things? Anyway wouldn't it be better they will equal both
logically and literally?
2) Where do these attri
On Friday, 14 April 2017 at 17:57:49 UTC, Johannes Pfau wrote:
Am Fri, 14 Apr 2017 13:41:45 +
schrieb Moritz Maxeiner :
[...]
Great, thanks that's exactly the solution I wanted. Figuring
this out by myself is a bit above my template skill level ;-)
-- Johannes
No problem, I often e
Am Fri, 14 Apr 2017 13:41:45 +
schrieb Moritz Maxeiner :
> On Friday, 14 April 2017 at 11:29:03 UTC, Johannes Pfau wrote:
> >
> > Is there some way to wrap the 'type selection'? In pseudo-code
> > something like this:
> >
> > enum FilteredOverloads(API) = ...
> >
> > foreach(Overload, Filtere
On Friday, 14 April 2017 at 11:29:03 UTC, Johannes Pfau wrote:
Is there some way to wrap the 'type selection'? In pseudo-code
something like this:
enum FilteredOverloads(API) = ...
foreach(Overload, FilteredOverloads!API)
{
}
Sure, but that's a bit more complex:
---
[...] // Igno
Am Fri, 14 Apr 2017 08:55:48 +
schrieb Moritz Maxeiner :
>
> mixin Foo!(API, (MethodType) {
> // function dependent code here
> });
> foo();
> ---
>
> Option 2: Code generation using CTFE
>
> ---
> string genFoo(alias API, string justDoIt)
> {
> import std.array : appender;
> auto
On Friday, 14 April 2017 at 08:24:00 UTC, Johannes Pfau wrote:
I've got this code duplicated in quite some functions:
-
[...]1
foreach (MethodType; overloads)
{
// function dependent code here
}
[...]2
On Friday, 14 April 2017 at 08:24:00 UTC, Johannes Pfau wrote:
I've got this code duplicated in quite some functions:
-
foreach (member; __traits(derivedMembers, API))
{
// Guards against private members
static if (__traits(compiles, __traits(getMember, API,
member))
I've got this code duplicated in quite some functions:
-
foreach (member; __traits(derivedMembers, API))
{
// Guards against private members
static if (__traits(compiles, __traits(getMember, API, member)))
{
static if (isSomeFunction!(__traits(getMember, API
thank you, the second method works perfectly.
I have one last problem, I start thread and in thread
Protocol.GetInstance(id) return null while in main thread it
works.
My class :
class ProtocolMessageManager
{
private static TypeInfo_Class[uint] m_types;
shared static this()
On Saturday, 28 January 2017 at 07:10:27 UTC, medhi558 wrote:
I have a last question, currently i use :
if(lc.name.indexOf("protocol.messages") != -1)
If they're all in the same module, you can also use the compile
time reflection to scan the module for classes. That's
On Saturday, 28 January 2017 at 09:05:13 UTC, rumbu wrote:
As long as your class has a default constructor, you can use
directly Object.factory(id):
public static NetworkMessage GetInstance(string id)
{
return cast(NetworkMessage)(Object.factory(id));
}
It isn't possible. My function when I
abstract class NetworkMessage
{
uint MessageId;
//
}
override class QueueStatusUpdateMessage : NetworkMessage
{
uint MessageId = 1;
//
}
override class Message2 : NetworkMessage
{
uint MessageId = 2;
//
}
override class Message3 : NetworkMessage
{
uint Me
On Saturday, 28 January 2017 at 07:03:51 UTC, medhi558 wrote:
public static NetworkMessage GetInstance(string id)
{
auto v = (id in ProtocolMessageManager.m_types);
if (v !is null)
return
cast(NetworkMessage)ProtocolMessageManager.m_types[id].create();
else
On Saturday, 28 January 2017 at 08:18:15 UTC, medhi558 wrote:
On Saturday, 28 January 2017 at 07:39:51 UTC, rumbu wrote:
On Saturday, 28 January 2017 at 07:10:27 UTC, medhi558 wrote:
I have a last question, currently i use :
if(lc.name.indexOf("protocol.messages") != -1)
To know if the class i
On Saturday, 28 January 2017 at 07:39:51 UTC, rumbu wrote:
On Saturday, 28 January 2017 at 07:10:27 UTC, medhi558 wrote:
I have a last question, currently i use :
if(lc.name.indexOf("protocol.messages") != -1)
To know if the class is a NetworkMessage, Would be possible to
do this
if(lc is Ne
On Saturday, 28 January 2017 at 07:10:27 UTC, medhi558 wrote:
I have a last question, currently i use :
if(lc.name.indexOf("protocol.messages") != -1)
To know if the class is a NetworkMessage, Would be possible to
do this
if(lc is NetworkMessage)
Sorry for my English, i speak french.
if (
I have a last question, currently i use :
if(lc.name.indexOf("protocol.messages") != -1)
To know if the class is a NetworkMessage, Would be possible to do
this
if(lc is NetworkMessage)
Sorry for my English, i speak french.
I develop a game server. Currently I use a switch :
import protocol.messages.connection.Message1;
import protocol.messages.connection.Message2;
import protocol.messages.queues.Message3;
import ..
import protocol.messages.NetworkMessage;
class ProtocolMessageManager
{
public static N
On Friday, 27 January 2017 at 21:02:13 UTC, medhi558 wrote:
Hello, I would like to know if it is possible to recover all
classes in the project in D.
Yes, `foreach(mod; ModuleInfo) foreach(lc; mod.localClasses)`...
but why do you want it? That facility is kinda limited in doing
many things wi
Hello, I would like to know if it is possible to recover all
classes in the project in D.
Example in c# :
Assembly asm = Assembly.GetAssembly(typeof(MyClass));
foreach (Type type in asm.GetTypes())
{
}
On Friday, 21 October 2016 at 01:51:44 UTC, Stefan Koch wrote:
On Friday, 21 October 2016 at 01:34:44 UTC, Nick Sabalausky
wrote:
When using reflection to obtain the fields of a class/struct,
is there any guarantee that the order is the same as the order
the fields are defined?
Yes they
On Friday, 21 October 2016 at 01:34:44 UTC, Nick Sabalausky wrote:
When using reflection to obtain the fields of a class/struct,
is there any guarantee that the order is the same as the order
the fields are defined?
Yes they should always come in lexical order.
When using reflection to obtain the fields of a class/struct, is there
any guarantee that the order is the same as the order the fields are
defined?
On Saturday, 9 July 2016 at 21:12:24 UTC, WhatMeWorry wrote:
foreach( i, str; myClassMembers)
What are you doing to get myClassMembers?
If it is __traits(allMembers), it just gives you the *names* of
the members. To get the actual thing, you then do
__traits(getMember, object, str) and can c
class C
{
this(){ _i = 0; _j = 0; }
void setVar(int i) { _i = i; }
int getVar() { return _i; }
int _i;
int _j;
}
writeln("C");
foreach( i, str; myClassMembers)
{
writeln("member ", i, " = ", str);
TypeInfo ti = typeid(str);
writeln("type id is ", ti);
Hi I'm trying out D and wanted to try some features cpp doesn't
have yet. So I put together a small json parsing, generating
looking based on reflection. Is there anything wrong with how I'm
working with it in the module?
https://github.com/rharriso/JSONInflater.d
Thanks in advance
On 2014-06-22 14:11:58 +, sigod said:
In the video "Case Studies In Simplifying Code With Compile-Time
Reflection" [was pointed out][0] that it is possible to reflect on
imported packages.
So, I tried:
reflection.d:
```
import std.stdio;
import test.module1;
import test.modu
In the video "Case Studies In Simplifying Code With Compile-Time
Reflection" [was pointed out][0] that it is possible to reflect
on imported packages.
So, I tried:
reflection.d:
```
import std.stdio;
import test.module1;
import test.module2;
void main() {
foreach (m
On Tuesday, 10 June 2014 at 20:01:37 UTC, Nordlöw wrote:
Notice that A.init.tupleof segfaults for classes so that is
_not_ an adviced solution in a generic solution!
There's no need to use .init:
import std.stdio;
struct Foo {
int a, b;
}
void main() {
writeln(__traits(id
On Tuesday, 10 June 2014 at 16:13:31 UTC, Adam D. Ruppe wrote:
Two options: do allMembers and filter it out to only be data
members, or do some slicing of tupleof.stringof:
S s;
foreach(idx, member; s.tupleof) {
writeln("Name: ", s.tupleof[idx].stringof[2..$]);
}
The tupleof[idx] inside th
ement pretty printing to multiple backends
(currently testing HTML) using as much of D's compile time
reflection as possible:
https://github.com/nordlow/justd/blob/master/pprint.d
I've currently defined mappings from InputRanges of Aggregates
(tuples, structs, and classes) to HTML table
BTW: Can DMD serve use file and line location of user defined
type aswell?
Thx!
Correction: I mean serve *us*
I am not sure I understand the question. Does this help?
struct A
{
int x;
double y;
}
void main()
{
foreach (idx, elem; A.init.tupleof)
{
pragma(msg, __traits(identifier, A.tupleof[idx]));
}
}
// output:
// x
// y
Exactly what I wanted!
HTML) using as much of D's compile time
reflection as possible:
https://github.com/nordlow/justd/blob/master/pprint.d
I've currently defined mappings from InputRanges of Aggregates
(tuples, structs, and classes) to HTML tables where
- the aggregate members are mapped to table col
book talks about
reflection, I think I talked about some of this in there:
http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book
)
foreach (ix, memb; arg.args[0].front.tupleof)
Eeek, I actually used s for a reason there - it gives you a
simple name that is easily
On Tuesday, 10 June 2014 at 16:13:31 UTC, Adam D. Ruppe wrote:
Two options: do allMembers and filter it out to only be data
members, or do some slicing of tupleof.stringof:
What trait should I use to filter out data members?
S s;
foreach(idx, member; s.tupleof) {
writeln("Name: ", s.tupleo
Two options: do allMembers and filter it out to only be data
members, or do some slicing of tupleof.stringof:
S s;
foreach(idx, member; s.tupleof) {
writeln("Name: ", s.tupleof[idx].stringof[2..$]);
}
The tupleof[idx] inside the loop is important instead of just
using member because then y
Is there a way to iterate over the symbolic names of the data
members of a class instance?
I'm currently using .tupleof to get its values (and in turn
types) to implement pretty printing to multiple backends
(currently testing HTML) using as much of D's compile time
reflection a
On Sunday, 1 June 2014 at 16:18:45 UTC, Philippe Sigaud via
Digitalmars-d-learn wrote:
In any case, it's an internal compiler error, so it's a bug.
Users
should never see ICEs.
Could you please report it, with the entire error message?
Ok thanks is don at https://issues.dlang.org/show_bug.cgi?
In any case, it's an internal compiler error, so it's a bug. Users
should never see ICEs.
Could you please report it, with the entire error message?
stupid me bug was at the end
a[0] = 1;
become
a[0] = "1";
but error error was so stnange to me i though that was a bug
On Sunday, 1 June 2014 at 16:02:47 UTC, bioinfornatics wrote:
DMD (dmdfe 2.066) fail when i use UDA which store a delegate
code below works if i remove @section UDA otheswise it give this
error:
dmd: statement.c:714: ErrorStatement::ErrorStatement():
Assertion
`global.gaggedErrors || global.
DMD (dmdfe 2.066) fail when i use UDA which store a delegate
code below works if i remove @section UDA otheswise it give this
error:
dmd: statement.c:714: ErrorStatement::ErrorStatement(): Assertion
`global.gaggedErrors || global.errors' failed.
is a bug ?
--- CODE also on dpaste http
no one any ideas?
well, i filed two bug reports for now:
https://d.puremagic.com/issues/show_bug.cgi?id=12532
https://d.puremagic.com/issues/show_bug.cgi?id=12533
Is there a way to obtain field and method names (as strings) or
assign to fields (of structs or classes) if the string is a name
which is only known at runtime?
For instance, could I write a generic function to reconstruct any
object of any type from a JSON object?
On Sunday, 6 April 2014 at 02:25:32 UTC, dnspies wrote:
For instance, could I write a generic function to reconstruct
any object of any type from a JSON object?
Yes, you can use __traits(allMembers) at compile time to build a
runtime function that does the setting. .tupleof can do it too,
whi
i stumbled upon something strange while wondering around meta/codegen-lands. it
took me almost a week to reduce it to the following test case. i have no clue
what is going on, whether i have entered bug territory or just encountered my
own limitations
mind you, i have 2 issues with the cod
On 03/19/2014 05:34 PM, Adam D. Ruppe wrote:
On Wednesday, 19 March 2014 at 16:10:52 UTC, Dicebot wrote:
Wait just a bit more
https://github.com/D-Programming-Language/dmd/pull/3380 :)
megarox. Make it so.
Nice. I have some ugly hacks that's probably full of bugs for this (look
at the botto
On 3/19/14, Adam D. Ruppe wrote:
> Is there anything we can do with static if to identify it as a
> template?
https://github.com/D-Programming-Language/dmd/pull/3380
> And after we determine it is a template, can we extract the
> required arguments list like we can with a regular function at
> a
Given:
template Foo(string T) { enum Foo = to!int(T); }
(or anything else, really)
Is there anything we can do with static if to identify it as a
template?
I tried:
static if(is(Foo == template)) {} // nope, basic type expected,
not template
Note that is(typeof(Foo) == function) {} is ho
On Wednesday, 19 March 2014 at 16:10:52 UTC, Dicebot wrote:
Wait just a bit more
https://github.com/D-Programming-Language/dmd/pull/3380 :)
megarox. Make it so.
Wait just a bit more
https://github.com/D-Programming-Language/dmd/pull/3380 :)
As a workaround one can use set of relevant trait checks:
1) type is void
2) is not a variable or callable
3) .stringof fits "NAME(ARGS)" pattern
On Wednesday, 19 March 2014 at 16:18:17 UTC, Andrej Mitrovic
wrote:
And after we determine it is a template, can we extract the
required arguments list like we can with a regular function at
all?
Well there's TemplateArgsOf for *instantiations*, but I'm not
sure how
one would do it with non-in
Hello everyone!
I'm currently working on a run-time reflection module. The intent
of this module is to simplify the process of loading functions /
classes / structs from DLL's loaded at run-time.
It works something like this ATM:
//In pluggin.d (A dll module)
void foo() { ... }
On Wednesday, 7 August 2013 at 11:47:27 UTC, Gary Willoughby
wrote:
I thought using __traits(...) was frowned upon?
They want to give them phobos wrappers that might be a little
prettier, but other than beauty/ugliness there's no reason not to
use it.
On Tuesday, 6 August 2013 at 22:55:49 UTC, Marek Janukowicz wrote:
Gary Willoughby wrote:
Is it possible using reflection or similar to extract only
public
method names from classes? I'm thinking how i would go about
writing a unit test/mocking framework, investigating how i can
g
On 2013-08-07 00:57, Marek Janukowicz wrote:
See traits: http://dlang.org/traits.html
Look for: getProtection, getVirtualFunctions, getVirtualMethods.
And "allMembers" and "derivedMembers".
--
/Jacob Carlborg
On Tue, Aug 06, 2013 at 11:41:35PM +0200, Gary Willoughby wrote:
> Is it possible using reflection or similar to extract only public
> method names from classes? I'm thinking how i would go about writing
> a unit test/mocking framework, investigating how i can gather
> infor
Gary Willoughby wrote:
> Is it possible using reflection or similar to extract only public
> method names from classes? I'm thinking how i would go about
> writing a unit test/mocking framework, investigating how i can
> gather information about such things before i manipulate
Is it possible using reflection or similar to extract only public
method names from classes? I'm thinking how i would go about
writing a unit test/mocking framework, investigating how i can
gather information about such things before i manipulate them.
Am 13.04.2013 19:49, schrieb Tofu Ninja:
On Saturday, 13 April 2013 at 17:45:12 UTC, Tofu Ninja wrote:
Maybe this is helpfully:
http://forum.dlang.org/thread/scgjnudclnwlbdqqd...@forum.dlang.org
Oddly enough, I found that at about the same time you posted it.
Sadly this does not provide a co
On Saturday, 13 April 2013 at 17:45:12 UTC, Tofu Ninja wrote:
Maybe this is helpfully:
http://forum.dlang.org/thread/scgjnudclnwlbdqqd...@forum.dlang.org
Oddly enough, I found that at about the same time you posted it.
Sadly this does not provide a compile time solution, only runtime.
Maybe this is helpfully:
http://forum.dlang.org/thread/scgjnudclnwlbdqqd...@forum.dlang.org
Oddly enough, I found that at about the same time you posted it.
On Saturday, 13 April 2013 at 16:16:03 UTC, Tofu Ninja wrote:
Currently is there a way to get all of the subclasses of a
class at compile time?
It seems like something that should be possible using traits
but I can't seems to see how.
Something like
class A{...}
class B:A{...}
class C:A{...}
On 4/13/13, Tofu Ninja wrote:
> Currently is there a way to get all of the subclasses of a class
> at compile time?
There might be things like using .moduleinfo and traversing imports to
find all classes, but I think separate compilation makes this
unreliable.
There is however BaseClassTuple in
Currently is there a way to get all of the subclasses of a class
at compile time?
It seems like something that should be possible using traits but
I can't seems to see how.
Something like
class A{...}
class B:A{...}
class C:A{...}
...
foreach(auto t ; getsubclass(A))
{
...
}
Any help wou
On Monday, 11 March 2013 at 00:26:25 UTC, anonymous wrote:
On Monday, 11 March 2013 at 00:10:46 UTC, Rob T wrote:
template NDimensionalArrayType(T,alias size)
I'm wondering what "alias size" does? I can't find that form
documented anywhere, but it seems to be valid.
http://dlang.org/template
On Monday, 11 March 2013 at 00:10:46 UTC, Rob T wrote:
template NDimensionalArrayType(T,alias size)
I'm wondering what "alias size" does? I can't find that form
documented anywhere, but it seems to be valid.
http://dlang.org/template.html#TemplateAliasParameter
And since alias can represent any symbol,i think that it's
correct usage.
On Monday, 11 March 2013 at 00:10:46 UTC, Rob T wrote:
template NDimensionalArrayType(T,alias size)
I'm wondering what "alias size" does? I can't find that form
documented anywhere, but it seems to be valid.
Thanks.
--rt
It's just a little hack for known bug - only string and integer
valu
1 - 100 of 146 matches
Mail list logo