On 2015-06-04 15:38, Atila Neves wrote:
For regular runtime parameters, there's ParameterTypeTuple. How would I
write an equivalent template for template parameters? i.e.
void fun(Foo foo, Bar bar)() {}
alias types = CtParameterTypeTuple!fun; //TypeTuple!(Foo, Bar)
I've tried but my
On 06/04/2015 03:28 PM, anonymous wrote:
> Generally, a `char**` is a pointer to a pointer to a char. There may be
> more pointers to chars behind the pointed-to one. And there may be more
> chars behind the pointed-to ones. You can't know just from the type.
Yep, "C's biggest mistake":
http:/
On Thursday, 4 June 2015 at 21:35:40 UTC, Kyoji Klyden wrote:
On Thursday, 4 June 2015 at 03:25:24 UTC, ketmar wrote:
On Wed, 03 Jun 2015 11:59:56 +, Kyoji Klyden wrote:
[...]
what
exactly is char**? Is it pointing to the first char of the
first string
in an array?
it's a pointer to a
On Thursday, 4 June 2015 at 03:25:24 UTC, ketmar wrote:
On Wed, 03 Jun 2015 11:59:56 +, Kyoji Klyden wrote:
That's what I found so confusing about the opengl docs. Just
guessing
here but char* is a pointer to the first char in the string,
then what
exactly is char**? Is it pointing to the
On Thursday, 4 June 2015 at 16:52:30 UTC, Ali Çehreli wrote:
On 06/04/2015 04:27 AM, Meta wrote:
> On Wednesday, 3 June 2015 at 21:05:42 UTC, Ali Çehreli wrote:
>> a[] = b;// makes the elements of 'a' same as 'b's
elements
> Isn't a[] = b deprecated syntax? I believe you have to use
a[]
On Thursday, 4 June 2015 at 17:25:52 UTC, Alex Parrill wrote:
On Thursday, 4 June 2015 at 17:04:06 UTC, jmh530 wrote:
float output[len];
This creates a fixed-sized array of length `len` (using the
deprecated syntax). Since the length is part of the type, it
needs to be known at compi
On Thursday, 4 June 2015 at 17:04:06 UTC, jmh530 wrote:
float output[len];
This creates a fixed-sized array of length `len` (using the
deprecated syntax). Since the length is part of the type, it
needs to be known at compile time.
You probably want a dynamic array instead. `auto out
I'm trying to run the following code (to create an array of
uniform random variables) on the latest version of rdmd (2.067.1).
import std.random;
auto uniform_array(int len, float a, float b) {
Random gen;
float output[len];
foreach(ref float i; output)
{
On 06/04/2015 04:27 AM, Meta wrote:
> On Wednesday, 3 June 2015 at 21:05:42 UTC, Ali Çehreli wrote:
>> a[] = b;// makes the elements of 'a' same as 'b's elements
> Isn't a[] = b deprecated syntax? I believe you have to use a[] = b[] now.
Thanks. Unfortunately, 2.067.1 'dmd -w -de' is st
On Thursday, 4 June 2015 at 14:42:43 UTC, Per Nordlöw wrote:
Is there a reason why
std.algorithm.equal()
isn't variadic?
Probably an oversight. Does any language have a variadic equals?
If any language were to have it, I'd expect it to be one of the
Lisps, but even Lisp only has binary equa
On Thursday, 4 June 2015 at 14:12:08 UTC, ketmar wrote:
On Thu, 04 Jun 2015 13:38:18 +, Atila Neves wrote:
For regular runtime parameters, there's ParameterTypeTuple.
How would I
write an equivalent template for template parameters? i.e.
void fun(Foo foo, Bar bar)() {}
alias ty
On Thursday, 4 June 2015 at 13:50:02 UTC, Meta wrote:
On Thursday, 4 June 2015 at 13:38:20 UTC, Atila Neves wrote:
For regular runtime parameters, there's ParameterTypeTuple.
How would I write an equivalent template for template
parameters? i.e.
void fun(Foo foo, Bar bar)() {}
alias ty
Is there a reason why
std.algorithm.equal()
isn't variadic?
On Thu, 04 Jun 2015 13:38:18 +, Atila Neves wrote:
> For regular runtime parameters, there's ParameterTypeTuple. How would I
> write an equivalent template for template parameters? i.e.
>
> void fun(Foo foo, Bar bar)() {}
>
> alias types = CtParameterTypeTuple!fun; //TypeTuple!(Foo
On Thursday, 4 June 2015 at 13:38:20 UTC, Atila Neves wrote:
For regular runtime parameters, there's ParameterTypeTuple. How
would I write an equivalent template for template parameters?
i.e.
void fun(Foo foo, Bar bar)() {}
alias types = CtParameterTypeTuple!fun; //TypeTuple!(Foo,
Ba
For regular runtime parameters, there's ParameterTypeTuple. How
would I write an equivalent template for template parameters? i.e.
void fun(Foo foo, Bar bar)() {}
alias types = CtParameterTypeTuple!fun; //TypeTuple!(Foo, Bar)
I've tried but my is expression kung fu was weak.
Atila
On 06/04/15 00:37, Tofu Ninja via Digitalmars-d-learn wrote:
> Is there a way other than exceptions for a called function to force the
> caller to return?
>
> Specifically, I know the return type of the caller(its always bool) and under
> certain circumstances I would like the caller to just giv
On Thursday, 4 June 2015 at 11:28:51 UTC, tcak wrote:
[code]
void test( const int a ){}
[/code]
Does that "const" make any difference at all? At the end, it is
a scalar, and passed as value.
All it does is it makes the variable "a" const:
void test( const int a )
{
a = 42; /* Error:
[code]
void test( const int a ){}
[/code]
Does that "const" make any difference at all? At the end, it is a
scalar, and passed as value.
On Wednesday, 3 June 2015 at 21:05:42 UTC, Ali Çehreli wrote:
On 06/03/2015 01:45 PM, Paul wrote:
> On Wednesday, 3 June 2015 at 20:33:02 UTC, Ali Çehreli wrote:
>> > pathList[][n] ~= CoOrd(cX, cY);
>>
>> I don't think you need the empty [] there. pathList[n] is
one of the
>> paths and you are a
On Thursday, 4 June 2015 at 09:42:04 UTC, Marc Schütz wrote:
On Thursday, 4 June 2015 at 07:20:24 UTC, Daniel Kozák wrote:
On Thu, 04 Jun 2015 07:03:30 +
tcak via Digitalmars-d-learn
wrote:
[code]
char[] test(){
auto t = new char[5];
return t;
}
[/code]
Is the test function ret
On Thursday, 4 June 2015 at 07:20:24 UTC, Daniel Kozák wrote:
On Thu, 04 Jun 2015 07:03:30 +
tcak via Digitalmars-d-learn
wrote:
[code]
char[] test(){
auto t = new char[5];
return t;
}
[/code]
Is the test function returning just a pointer from heap or
does copy operation?
On Thu, 04 Jun 2015 07:03:30 +
tcak via Digitalmars-d-learn wrote:
> [code]
> char[] test(){
> auto t = new char[5];
>
> return t;
> }
> [/code]
>
> Is the test function returning just a pointer from heap or does
> copy operation?
>
this is same as:
auto t = new char[](5)
it wi
[code]
char[] test(){
auto t = new char[5];
return t;
}
[/code]
Is the test function returning just a pointer from heap or does
copy operation?
It is not obvious what it does, and I am trying to avoid doing
this always.
24 matches
Mail list logo