Hi,everyone,
In C++, _T can guarantee that when converting from ascii
encoding type to unicode encoding type, the program does not need
to be modified. What do I need to do in D?
Thanks.
On Tuesday, 22 January 2019 at 13:55:30 UTC, FrankLike wrote:
Hi,everyone,
In C++, _T can guarantee that when converting from ascii
encoding type to unicode encoding type, the program does not
need to be modified. What do I need to do in D?
Thanks.
Hi,
_T is not relevant to C++, but to W
The following code compiles:
```
alias T = shared(int)*;
shared T a;
shared T b;
shared T c;
void foo() {
import core.atomic: cas;
cas(&a, b, c);
}
```
The type of T has to be a pointer to a shared int (you get a
template match error for `cas` if `T = int*`), which is annoying
but I k
On Tuesday, 22 January 2019 at 14:07:48 UTC, Olivier Pisano wrote:
On Tuesday, 22 January 2019 at 13:55:30 UTC, FrankLike wrote:
In D, there is only Unicode. The language doesn't manipulate
strings encoded in Windows local code-pages.
For example:
std::wstring strTest(_T("d://"));
UINT nR
On Tuesday, 22 January 2019 at 16:13:57 UTC, FrankLike wrote:
On Tuesday, 22 January 2019 at 14:07:48 UTC, Olivier Pisano
wrote:
Some error is in "core.sys.windows.windows"?
Thank you.
Use "mystring"w, notice the w after the closing quote.
On Tuesday, 22 January 2019 at 16:18:17 UTC, Adam D. Ruppe wrote:
Use "mystring"w, notice the w after the closing quote.
"GetDriveType" Function is auto work by "_T" in C++,but how to
do in D?
On Tuesday, 22 January 2019 at 16:18:17 UTC, Adam D. Ruppe wrote:
Use "mystring"w, notice the w after the closing quote.
Or toStringz is not work like c_str() in C++?
On Tuesday, 22 January 2019 at 16:47:45 UTC, FrankLike wrote:
On Tuesday, 22 January 2019 at 16:18:17 UTC, Adam D. Ruppe
wrote:
Use "mystring"w, notice the w after the closing quote.
Or toStringz is not work like c_str() in C++?
stringz creates a char*
but you need a wchar*
On Tuesday, January 22, 2019 12:05:32 PM MST Stefan Koch via Digitalmars-d-
learn wrote:
> On Tuesday, 22 January 2019 at 16:47:45 UTC, FrankLike wrote:
> > On Tuesday, 22 January 2019 at 16:18:17 UTC, Adam D. Ruppe
> >
> > wrote:
> >> Use "mystring"w, notice the w after the closing quote.
> >
> >
On Tuesday, 22 January 2019 at 19:14:43 UTC, Jonathan M Davis
wrote:
On Tuesday, January 22, 2019 12:05:32 PM MST Stefan Koch via
Digitalmars-d- learn wrote:
On Tuesday, 22 January 2019 at 16:47:45 UTC, FrankLike wrote:
> On Tuesday, 22 January 2019 at 16:18:17 UTC, Adam D. Ruppe
>
> wrote:
>> U
On Tuesday, 22 January 2019 at 21:49:00 UTC, bauss wrote:
On Tuesday, 22 January 2019 at 19:14:43 UTC, Jonathan M Davis
Is there a reason we cannot implement toStringz like:
immutable(TChar)* toStringz(TChar = char)(scope const(TChar)[]
s) @trusted pure nothrow;
// Couldn't find a way to ge
On Tuesday, 22 January 2019 at 21:49:00 UTC, bauss wrote:
On Tuesday, 22 January 2019 at 19:14:43 UTC, Jonathan M Davis
Is there a reason we cannot implement toStringz like:
immutable(TChar)* toStringz(TChar = char)(scope const(TChar)[]
s) @trusted pure nothrow;
// Couldn't find a way to ge
On Tuesday, 22 January 2019 at 14:13:23 UTC, Johan Engelen wrote:
The following code compiles:
```
alias T = shared(int)*;
shared T a;
shared T b;
shared T c;
void foo() {
import core.atomic: cas;
cas(&a, b, c);
}
```
The type of T has to be a pointer to a shared int (you get a
templa
I believe this is historical. It will fail because atomics are
combinatorially parameterized because the compiler couldn't
properly infer template arguments until recently (this also
resulted in memory corruption in ldc fork of druntime). Now that
the compiler was fixed, atomics can be fixed to
15 matches
Mail list logo