I have a class T with a templated function foo(string name)(int,
int, float) that will be mixed in via template, and I want to
determine if that class has mixed it in such that foo(name =
"bar"). How could I go about this? Thanks.
eg:
mixin template A(string name, Args...) {
void foo(stri
Actually, would just passing the parameters and an allocator do
it? You'd just need to allocate the string in the constructor,
right?
Hi,
Say I wanted to create an object that has a string member, and I
want the string to be allocated with the object contiguously
instead of as a pointer to another location (as a constructor
would do). For example:
class C {
this(int i, string s) {
this.i = i;
this.s = s
On Thursday, 21 April 2016 at 01:49:19 UTC, Nicholas Wilson wrote:
[...]
you want to broadcast the rhs to a float4 and then adds them.
Can you post the errors (if any) you get during compilation.
Urgh, autocorrect. That should be addps them.
I get a "Error: floating point constant expressi
Hi,
I want to make a utility wrapper around a core.simd.float4, and
have been trying to make the following code work, but have been
met with no success.
auto add(float rhs)
{
return __simd(XMM.ADDPS, lhs, rhs);
}
Then I tried
auto add(float4 lhs, float rhs)
{
float4 tmp = [rhs, rhs,
So I've been trying to create a window, and have been working my
way through the MSDN tutorials. However, I have always had to
specifically specify if I was using either the Unicode or ANSI
version of a struct or function. Looking through the druntime
code (especially winuser.d), it appears tha
Huh, alright. Thanks.
On Tuesday, 5 January 2016 at 04:41:45 UTC, Rikki Cattermole
wrote:
On 05/01/16 5:37 PM, Straivers wrote:
Hello,
I'm working on an event system, and I want to be able to check
if an
event is a subclass of another event. How might I go about
this? In
essence, I'm looking to compress this:
st
Hello,
I'm working on an event system, and I want to be able to check if
an event is a subclass of another event. How might I go about
this? In essence, I'm looking to compress this:
static if (E == UserInputEvent || E == MouseEvent || E ==
MouseButtonEvent || E == MouseReleasedEvent)
{
Forgive me if this has already been discussed, but how are arrays
of floating point numbers compared in D? i.e. Is it a bit-by-bit
comparison, is the std.math.approxEqual function get called for
each element, or is it byte-by-byte across the entire array?
-Straivers
10 matches
Mail list logo