-
-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42040ba
commit 3f16e11
Showing
8 changed files
with
101 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Ddoc | ||
|
||
$(H2 Transition to C++11 character types) | ||
|
||
With C++11 comes the advent of changed character type mangling. | ||
D's default behavior is now to conform to this. However, this | ||
will break existing code. Therefore, the old behavior can be | ||
retained by using the -std=c++98 compiler switch. This | ||
will also set the predefined version Cpp98. | ||
For Win32 compilations using Digital Mars C++, version Cpp98 will | ||
be predefined. | ||
|
||
Of particular note is the new difference between wchar and wchar_t on | ||
Windows. This will manifest itself as compile errors when | ||
interfacing wchar* with wchar_t* code when calling the Windows API. | ||
A cast will resolve the issue. | ||
|
||
Going forward we recommend using WCHAR instead of wchar or wchar_t | ||
when interfacing to Windows API functions. (WCHAR is Microsoft | ||
Windows' 16 bit character type.) | ||
|
||
$(H3 C++ Type Equivalence) | ||
|
||
$(H4 Cpp98 behavior:) | ||
|
||
$(TABLE | ||
$(THEAD D , Posix , DMC++ Windows , VC++ Windows) | ||
|
||
$(TROW wchar , unsigned short , wchar_t , wchar_t) | ||
$(TROW dchar , wchar_t , unsigned , unsigned) | ||
$(TROW wchar_t , wchar_t , wchar_t , wchar_t) | ||
$(TROW WCHAR , -- , wchar_t , wchar_t)) | ||
|
||
$(H4 New behavior:) | ||
|
||
$(TABLE | ||
$(THEAD D , Posix , DMC++ Windows , VC++ Windows) | ||
|
||
$(TROW wchar , char16_t , wchar_t , char16_t) | ||
$(TROW dchar , char32_t , unsigned , char32_t) | ||
$(TROW wchar_t , wchar_t , wchar , wchar_t) | ||
$(TROW WCHAR , -- , wchar , wchar_t)) | ||
|
||
|
||
$(H3 Name Mangling:) | ||
|
||
$(H4 Cpp98 behavior:) | ||
|
||
$(TABLE | ||
$(THEAD D , Posix , DMC++ Windows , VC++ Windows) | ||
|
||
$(TROW wchar , t , _Y , _W) | ||
$(TROW dchar , w , I , I) | ||
$(TROW wchar_t , w , _Y , _W)) | ||
|
||
$(H4 New behavior:) | ||
|
||
$(TABLE | ||
$(THEAD D , Posix , DMC++ Windows , VC++ Windows) | ||
|
||
$(TROW wchar , Ds , _Y , _S) | ||
$(TROW dchar , Di , I , _U) | ||
$(TROW wchar_t , w , _Y , _W)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters