There's a template mixin in my dimage project's new version in
base.d, and when I try to access it from another file I get two
errors:
undefined identifier `ChunkyAccess4bit`, did you mean template
`ChunkyAccess4Bit()`?
and
mixin `dimage.tga.TGA.ChunkyAccess4bit!()` is not defined
Should
On Sunday, October 27, 2019 6:44:05 AM MDT Per Nordlöw via Digitalmars-d-
learn wrote:
> In which circumstances can a `char` be initialized a non-7-bit
> value (>= 128)? Is it possible only in non-@safe code?
>
> And, if so, what will be the result of casting such a value to
> `dchar`? Will that
On Sunday, 27 October 2019 at 19:54:06 UTC, Simen Kjærås wrote:
It's a bug:
interface A {
interface B : A {
class C : B {
}
}
// Fails: no property 'C' for type 'foo.A.B'
void inside(A.B.C c) { }
}
// Works
void outside(A.B.C c) { }
On Sunday, 27 October 2019 at 17:52:51 UTC, Emmanuelle wrote:
Hello! See snippet:
---
interface AST
{
static interface Expr : AST
{
final static class Name : Expr
{
override void accept(AST.Visitor v) {
v.visitName(this); }
}
}
final static
Hello! See snippet:
---
interface AST
{
static interface Expr : AST
{
final static class Name : Expr
{
override void accept(AST.Visitor v) {
v.visitName(this); }
}
}
final static class Visitor
{
void visitName(AST.Expr.Name
On Sunday, 27 October 2019 at 14:57:29 UTC, Per Nordlöw wrote:
@safe pure nothrow @nogc unittest
{
auto r = "a*b".findSplitAfter_inout('*');
static assert(is(typeof(r.pre()) == string));
assert(r);
assert(r.pre == "a*");
assert(r.post == "b");
}
Made it work! :)
/**
On Sunday, 27 October 2019 at 14:29:01 UTC, Per Nordlöw wrote:
which results in the following interesting compiler error:
array_algorithm.d(506,12): Error: modify `inout` to `immutable`
is not allowed inside `inout` function
assert(r.pre == "a*");
^
array_algorithm.d(507,12):
On Sunday, 27 October 2019 at 14:36:54 UTC, Ernesto Castellotti
wrote:
On Sunday, 27 October 2019 at 12:44:05 UTC, Per Nordlöw wrote:
[...]
char in D is always unsigned, it is not implementation-specific.
Therefore it can take values up to (2^8)−1, If you want a
signed 8 byte type you can
On Sunday, 27 October 2019 at 12:44:05 UTC, Per Nordlöw wrote:
In which circumstances can a `char` be initialized a non-7-bit
value (>= 128)? Is it possible only in non-@safe code?
And, if so, what will be the result of casting such a value to
`dchar`? Will that result in an exception or will
Is it possible to make this array-overload of findSplitBefore
support `inout`-qualified `haystack` parameter and return type
without using a templated `Result`?
auto findSplitBefore(T)(scope const T[] haystack, // TODO support
inout?
scope const T needle)
{
On Sunday, 27 October 2019 at 12:44:05 UTC, Per Nordlöw wrote:
In which circumstances can a `char` be initialized a non-7-bit
value (>= 128)? Is it possible only in non-@safe code?
All circumstances, `char`'s default initializer is 255.
char a; // is 255
And, if so, what will be the result
In which circumstances can a `char` be initialized a non-7-bit
value (>= 128)? Is it possible only in non-@safe code?
And, if so, what will be the result of casting such a value to
`dchar`? Will that result in an exception or will it interpret
the `char` using a 8-bit character encoding?
12 matches
Mail list logo