On Wednesday, March 01, 2017 17:02:37 Dukc via Digitalmars-d-learn wrote:
> On Wednesday, 1 March 2017 at 16:43:41 UTC, Jonathan M Davis
>
> wrote:
> > Assert is for program invariants. If the condition is true,
> > your program is outright broken.
>
> Error: He meant that if the condition is FALSE
On Wednesday, 1 March 2017 at 09:19:53 UTC, Christian Köstlin
wrote:
On 01/03/2017 00:09, Joseph Rushton Wakeling wrote:
if (!__ctfe) assert(false);
... might be the best option. That shouldn't be compiled out
even in -release builds.
thats a nice idea! is this happening because of assert(fal
On Wednesday, 1 March 2017 at 16:43:41 UTC, Jonathan M Davis
wrote:
Assert is for program invariants. If the condition is true,
your program is outright broken.
Error: He meant that if the condition is FALSE, the program is
faulty.
On Tuesday, February 28, 2017 09:16:47 sarn via Digitalmars-d-learn wrote:
> On Tuesday, 28 February 2017 at 07:41:36 UTC, Christian Köstlin
>
> wrote:
> > As I understand the only difference between assert and enforce
> > is, that
> > assert is not compiled into releases?
> >
> > Thanks!
> > Chris
On 01/03/2017 00:09, Joseph Rushton Wakeling wrote:
> On Tuesday, 28 February 2017 at 00:22:28 UTC, sarn wrote:
>>> If you ever have doubts, you can always use something like this to
>>> check:
>>>
>>> assert (__ctfe);
>>
>> Sorry, "enforce" would more appropriate if you're really checking.
>
> if
On Tuesday, 28 February 2017 at 00:22:28 UTC, sarn wrote:
If you ever have doubts, you can always use something like
this to check:
assert (__ctfe);
Sorry, "enforce" would more appropriate if you're really
checking.
if (!__ctfe) assert(false);
... might be the best option. That shouldn't
On Tuesday, 28 February 2017 at 07:41:36 UTC, Christian Köstlin
wrote:
As I understand the only difference between assert and enforce
is, that
assert is not compiled into releases?
Thanks!
Christian
Pretty much so. The intention is that assert means something
that's supposed to be true (and
On 28/02/2017 01:20, sarn wrote:
> On Monday, 27 February 2017 at 19:26:06 UTC, Christian Köstlin wrote:
>> How can I make sure, that the calculations are done at compile time?
>
> If you ever have doubts, you can always use something like this to check:
>
> assert (__ctfe);
Thanks a lot, actuall
On Tuesday, 28 February 2017 at 00:20:05 UTC, sarn wrote:
On Monday, 27 February 2017 at 19:26:06 UTC, Christian Köstlin
wrote:
How can I make sure, that the calculations are done at compile
time?
If you ever have doubts, you can always use something like this
to check:
assert (__ctfe);
S
On Monday, 27 February 2017 at 19:26:06 UTC, Christian Köstlin
wrote:
How can I make sure, that the calculations are done at compile
time?
If you ever have doubts, you can always use something like this
to check:
assert (__ctfe);
On Monday, 27 February 2017 at 19:26:06 UTC, Christian Köstlin
wrote:
Is it enough to put up static immutable modifiers?
How can I make sure, that the calculations are done at compile
time?
...
static immutable time = Unit("time", [Unit.Scale("ms", 1),
...
An initialization of a static varia
11 matches
Mail list logo