On Monday, 25 June 2018 at 10:49:26 UTC, Simen Kjærås wrote:
On Monday, 25 June 2018 at 09:36:45 UTC, Martin Tschierschke
wrote:
I am not sure that I understood it right, but there is a way
to detect the status of a parameter:
My question was different, but I wished to get a ctRegex! or
regex
On Monday, 25 June 2018 at 09:36:45 UTC, Martin Tschierschke
wrote:
I am not sure that I understood it right, but there is a way to
detect the status of a parameter:
My question was different, but I wished to get a ctRegex! or
regex used depending on the expression:
import std.regex:replace
On 06/25/2018 07:47 AM, Mr.Bingo wrote:
The docs say that CTFE is used only when explicit, I was under the
impression that it would attempt to optimize functions if they could be
computed at compile time. The halting problem has nothing to do with
this. The ctfe engine already complains when on
On Monday, 25 June 2018 at 08:05:53 UTC, Mr.Bingo wrote:
On Monday, 25 June 2018 at 07:02:24 UTC, Jonathan M Davis wrote:
On Monday, June 25, 2018 05:47:30 Mr.Bingo via
Digitalmars-d-learn wrote:
The problem then, if D can't arbitrarily use ctfe, means that
there should be a way to force ctfe o
On Monday, 25 June 2018 at 07:02:24 UTC, Jonathan M Davis wrote:
On Monday, June 25, 2018 05:47:30 Mr.Bingo via
Digitalmars-d-learn wrote:
The problem then, if D can't arbitrarily use ctfe, means that
there should be a way to force ctfe optionally!
If you want to use CTFE, then give an enum th
On Monday, June 25, 2018 05:47:30 Mr.Bingo via Digitalmars-d-learn wrote:
> The problem then, if D can't arbitrarily use ctfe, means that
> there should be a way to force ctfe optionally!
If you want to use CTFE, then give an enum the value of the expression you
want calculated. If you want to do
On Monday, 25 June 2018 at 05:14:31 UTC, Jonathan M Davis wrote:
On Monday, June 25, 2018 05:03:26 Mr.Bingo via
Digitalmars-d-learn wrote:
The compiler should be easily able to figure out that foo(3)
can be precomputed(ctfe'ed) and do so. It can already do this,
as you say, by forcing enum on i
On Monday, June 25, 2018 05:03:26 Mr.Bingo via Digitalmars-d-learn wrote:
> The compiler should be easily able to figure out that foo(3) can
> be precomputed(ctfe'ed) and do so. It can already do this, as you
> say, by forcing enum on it. Why can't the compiler figure it out
> directly?
The big pr
On Sunday, 24 June 2018 at 20:03:19 UTC, arturg wrote:
On Sunday, 24 June 2018 at 19:10:36 UTC, Mr.Bingo wrote:
On Sunday, 24 June 2018 at 18:21:09 UTC, rjframe wrote:
On Sun, 24 Jun 2018 14:43:09 +, Mr.Bingo wrote:
let is(CTFE == x) mean that x is a compile time constant.
CTFE(x)
convert
On Sunday, 24 June 2018 at 19:10:36 UTC, Mr.Bingo wrote:
On Sunday, 24 June 2018 at 18:21:09 UTC, rjframe wrote:
On Sun, 24 Jun 2018 14:43:09 +, Mr.Bingo wrote:
let is(CTFE == x) mean that x is a compile time constant.
CTFE(x)
converts a x to this compile time constant. Passing any
compil
On Sunday, 24 June 2018 at 18:21:09 UTC, rjframe wrote:
On Sun, 24 Jun 2018 14:43:09 +, Mr.Bingo wrote:
let is(CTFE == x) mean that x is a compile time constant.
CTFE(x)
converts a x to this compile time constant. Passing any
compile time
constant essentially turns the variable in to a co
On Sunday, 24 June 2018 at 18:21:09 UTC, rjframe wrote:
On Sun, 24 Jun 2018 14:43:09 +, Mr.Bingo wrote:
let is(CTFE == x) mean that x is a compile time constant.
CTFE(x)
converts a x to this compile time constant. Passing any
compile time
constant essentially turns the variable in to a co
On Sun, 24 Jun 2018 14:43:09 +, Mr.Bingo wrote:
> let is(CTFE == x) mean that x is a compile time constant. CTFE(x)
> converts a x to this compile time constant. Passing any compile time
> constant essentially turns the variable in to a compile time
> constant(effectively turns it in to a temp
let is(CTFE == x) mean that x is a compile time constant. CTFE(x)
converts a x to this compile time constant. Passing any compile
time constant essentially turns the variable in to a compile time
constant(effectively turns it in to a template with template
parameter)
void foo(size_t i)
{
14 matches
Mail list logo