Does enum have any effect on functions?
Is this:
mixin (Constant!("ln2"));
package enum T ln2(T)(Context context) {
return log(T.TWO, context, false);
}
different from this:
mixin (Constant!("ln2"));
package /*enum*/ T ln2(T)(Context context) {
return log(T.TWO, context, false)
Use a string mixin?
string fun(string name)
{
return "public static int " ~ name ~ "() { return 0; }";
}
struct S {
mixin (fun("fctn1"));
}
void main() {
S s;
import std.stdio;
writeln(s.fctn1());
}
On Thursday, 19 June 2014 at 15:24:41 UTC, Jesse Phillips wrote:
Once I get some examples compiling again in 32bit, it should be
easier for you to play around with COM in D.
I've pushed changes which get the library building and examples
working. Let me know if there is any other direction I c
I am misunderstanding something about using mixins for
boilerplate code.
I've got a set of functions all of which do the same thing:
public static int fctn1() { return other.place.fctn1; }
I can't use a string mixin to generate the code:
template Function(string name)
{
const char[] Functio
On Fri, 20 Jun 2014 20:40:49 +
Juanjo Alvarez via Digitalmars-d-learn
wrote:
> Hi,
>
> Newbie question:
>
> void foo(S)(S oneparam){}
> void foo(S)(S oneparam, int anotherParam){}
> alias fooStr = foo!string;
>
> Gives:
>
> "Error: template test.foo matches more than one template
> declaratio
Hi,
Newbie question:
void foo(S)(S oneparam){}
void foo(S)(S oneparam, int anotherParam){}
alias fooStr = foo!string;
Gives:
"Error: template test.foo matches more than one template
declaration:"
How could I fix it so the alias aliases one of the two versions?
Also, why can't "fooStr" be a
On Friday, 20 June 2014 at 12:17:22 UTC, Johann Lermer wrote:
Agreed, but I assumed, that since all definitions in cairo.d
are defined as
extern (System), (same happens with extern (C), btw.), I would
have expected,
that D does not implicitly generate initialisation functions.
D requires that
Agreed, but I assumed, that since all definitions in cairo.d are
defined as
extern (System), (same happens with extern (C), btw.), I would
have expected,
that D does not implicitly generate initialisation functions.
So, why is there no init routine for the rectangle? There's only
one for the m
By D specification you are always required to compiled all
imported modules, it does not matter if those contain only
definitions. Some of implicitly generated symbols (like T.init)
will be in their object files.
On Friday, 20 June 2014 at 08:05:01 UTC, Bienlein wrote:
What data load profile do you expect? Vibe is tuned to handle
thousands simultaneous incoming light requests (milliseconds),
while distributed computing works better with exclusive heavy
requests, at least minutes of work worth, BOINC u
On Friday, 20 June 2014 at 10:51:20 UTC, Johann Lermer wrote:
`_D6deimos5cairo5cairo14cairo_matrix_t6__initZ'
it's an init value for the struct; in D all data is initialized.
Do you think it's ready for a v0.1 release? It be willing to add
it to dub if it passes general D coding stardards.
Once again, thanks for feedback and vast improvements of the code.
Best,
Mike
Hi,
I'm fiddling around with cairo (downloaded
fromhttps://github.com/D-Programming-Deimos/cairo) and I stumbled
over this problem:
(file rectandmatrix.d)
import deimos.cairo.cairo;
void main ()
{
cairo_rectangle_int_t rect;
cairo_matrix_t matrix;
}
Compiling that with 'dm
On Friday, 20 June 2014 at 07:05:49 UTC, francesco cattoglio
wrote:
http://dlang.org/phobos/std_typecons.html#Typedef
Take a look at it. Docs is scarce (pretty sure you will need to
take a look around to find something) but it should just do
what you need.
The prerelease docs contain more in
What data load profile do you expect? Vibe is tuned to handle
thousands simultaneous incoming light requests (milliseconds),
while distributed computing works better with exclusive heavy
requests, at least minutes of work worth, BOINC uses hours
worth work items.
Communication will be bi-di
Well, after many attempts, I have found what is causing the
problem.
My dub.json :
```
{
"name": "ddb_test",
"description": "A minimal D application.",
"dependencies": {
"gtk-d:gtkd": ">=2.3.3",
"ddb": ">=0.2.1"
}
}
```
My source (source/app.d):
```
import ddb.postgre
http://dlang.org/phobos/std_typecons.html#Typedef
Take a look at it. Docs is scarce (pretty sure you will need to
take a look around to find something) but it should just do what
you need.
17 matches
Mail list logo