Skip to content

Commit f95319b

Browse files
Taojunshencolin-homeopbld16opbld15opbld17
authored
8/5/2022 AM Publish (MicrosoftDocs#4454)
* crtsetdbgflag.md: _CrtCheckMemory is not called by default * Visual C++ 17.0 has unlimited string literals * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (MicrosoftDocs#4430) * 7/19/2022 AM Publish (MicrosoftDocs#4424) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> * 7/20/2022 AM Publish (MicrosoftDocs#4426) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> * 7/21/2022 AM Publish (MicrosoftDocs#4427) * Follow up 4221 Acrolinx score for TN035 * Fix heading style * Update C++-specific template info * Fix links to raw and rendered markdown Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> * crtsetdbgflag.md: _CrtCheckMemory is not called by default Co-authored-by: JiayueHu <36248303+JiayueHu@users.noreply.github.com> Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Taojunshen <v-jutao@microsoft.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: Oliver Old <oliver.old@outlook.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> * wordsmith * clarify wording * wording * Update .openpublishing.publish.config.json * Repo sync for protected CLA branch (MicrosoftDocs#4061) * add initial doc stubs * Initial docs push, contains stubs for some files and a stub for a landing page * update some links * add more cards and links to the Hub page * fix error * remove monikor's so it's easy to test, fix rtos-view.md path * fix link * add more to the sidebar * update peripheral view by consolidating to the table, change things to objects in rtos-view * add tabs * forgot to end tabbed section * fix items after adding tabs * update h1 * slightly fix some wording * add link from C++ and C workloads, features, and libraries to embedded hub * move into own directory so that the url is better * fix some warnings * remove next steps that pointed to linux items * prefer tabbed view vs table * attempt to add moniker * attempt highest moniker in range * assign to a specific version * push again to get new build * add '=' sign to try and test it * add metadata for msvc-170 * add moniker range for index.yml * remove inline moniker since we only need it on the files themselves * Follow up 4221 Acrolinx score for TN035 * Fix heading style * Update C++-specific template info * Fix links to raw and rendered markdown * Edit pass for house style * add 'while debugging' for peripheral-view * Fix table issue, stray punctuation Co-authored-by: Garrett Campbell <gcampbell@microsoft.com> Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> Co-authored-by: Alma Jenks <v-alje@microsoft.com> * Update ios-functions.md fix typo (MicrosoftDocs#4071) showps→showpos * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (#4442) * 7/27/2022 AM Publish (#4432) * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (MicrosoftDocs#4430) * 7/19/2022 AM Publish (MicrosoftDocs#4424) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> * 7/20/2022 AM Publish (MicrosoftDocs#4426) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> * 7/21/2022 AM Publish (MicrosoftDocs#4427) * Follow up 4221 Acrolinx score for TN035 * Fix heading style * Update C++-specific template info * Fix links to raw and rendered markdown Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> * crtsetdbgflag.md: _CrtCheckMemory is not called by default Co-authored-by: JiayueHu <36248303+JiayueHu@users.noreply.github.com> Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Taojunshen <v-jutao@microsoft.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: Oliver Old <oliver.old@outlook.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> * wordsmith * clarify wording * wording Co-authored-by: Feng Xu <fenxu@microsoft.com> Co-authored-by: JiayueHu <36248303+JiayueHu@users.noreply.github.com> Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: Oliver Old <oliver.old@outlook.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: PRMerger20 <prmrgr20@microsoft.com> * 7/28/2022 AM Publish (#4437) * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (MicrosoftDocs#4430) * 7/19/2022 AM Publish (MicrosoftDocs#4424) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> * 7/20/2022 AM Publish (MicrosoftDocs#4426) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> * 7/21/2022 AM Publish (MicrosoftDocs#4427) * Follow up 4221 Acrolinx score for TN035 * Fix heading style * Update C++-specific template info * Fix links to raw and rendered markdown Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> * crtsetdbgflag.md: _CrtCheckMemory is not called by default Co-authored-by: JiayueHu <36248303+JiayueHu@users.noreply.github.com> Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Taojunshen <v-jutao@microsoft.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: Oliver Old <oliver.old@outlook.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> * wordsmith * clarify wording * wording Co-authored-by: Feng Xu <fenxu@microsoft.com> Co-authored-by: JiayueHu <36248303+JiayueHu@users.noreply.github.com> Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: Oliver Old <oliver.old@outlook.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: PRMerger20 <prmrgr20@microsoft.com> * 7/29/2022 AM Publish (MicrosoftDocs#4441) * Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (MicrosoftDocs#4430) * 7/19/2022 AM Publish (MicrosoftDocs#4424) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> * 7/20/2022 AM Publish (MicrosoftDocs#4426) * Follow up 4221 Acrolinx score for TN035 * Fix heading style Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> * 7/21/2022 AM Publish (MicrosoftDocs#4427) * Follow up 4221 Acrolinx score for TN035 * Fix heading style * Update C++-specific template info * Fix links to raw and rendered markdown Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> * crtsetdbgflag.md: _CrtCheckMemory is not called by default Co-authored-by: JiayueHu <36248303+JiayueHu@users.noreply.github.com> Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Taojunshen <v-jutao@microsoft.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: Oliver Old <oliver.old@outlook.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> * wordsmith * clarify wording * wording Co-authored-by: Feng Xu <fenxu@microsoft.com> Co-authored-by: JiayueHu <36248303+JiayueHu@users.noreply.github.com> Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: Oliver Old <oliver.old@outlook.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: PRMerger20 <prmrgr20@microsoft.com> Co-authored-by: Alma Jenks <v-alje@microsoft.com> Co-authored-by: Taojunshen <v-jutao@microsoft.com> Co-authored-by: JiayueHu <36248303+JiayueHu@users.noreply.github.com> Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: Oliver Old <oliver.old@outlook.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: PRMerger20 <prmrgr20@microsoft.com> * Address cpp-docs 4075 __assume issues * Address cpp-docs 4072 clarity issue * update date * Update multithreading-and-locales.md Wrong `setlocale()` reference, it should be a C runtime function, not a preprocessor macro. * Update for consistent branding. Co-authored-by: Colin Robertson <3836425+corob-msft@users.noreply.github.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: Oliver Old <oliver.old@outlook.com> Co-authored-by: Igor Zhukov <fsb4000@yandex.ru> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: Feng Xu <fenxu@microsoft.com> Co-authored-by: JiayueHu <36248303+JiayueHu@users.noreply.github.com> Co-authored-by: Bryan Gold <101299717+19BMG00@users.noreply.github.com> Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: PRMerger20 <prmrgr20@microsoft.com> Co-authored-by: irushx <39490127+irushx@users.noreply.github.com> Co-authored-by: Garrett Campbell <gcampbell@microsoft.com> Co-authored-by: Alma Jenks <v-alje@microsoft.com> Co-authored-by: pea-sys <49807271+pea-sys@users.noreply.github.com> Co-authored-by: PRMerger7 <prmrgr7@microsoft.com> Co-authored-by: Anton <Anton.Breusov@gmail.com>
1 parent aae334d commit f95319b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/cpp/string-and-character-literals-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ const size_t byteSize = (wcslen(str) + 1) * sizeof(wchar_t);
331331

332332
Notice that `strlen()` and `wcslen()` don't include the size of the terminating null character, whose size is equal to the element size of the string type: one byte on a `char*` or `char8_t*` string, two bytes on `wchar_t*` or `char16_t*` strings, and four bytes on `char32_t*` strings.
333333

334-
The maximum length of a string literal is 65,535 bytes. This limit applies to both narrow string literals and wide string literals.
334+
In versions of Visual Studio before Visual Studio 2022 version 17.0, the maximum length of a string literal is 65,535 bytes. This limit applies to both narrow string literals and wide string literals. In Visual Studio 2022 version 17.0 and later, this restriction is lifted and string length is limited by available resources.
335335

336336
### Modifying string literals
337337

docs/parallel/multithreading-and-locales.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ Both the C Runtime Library and the C++ Standard Library provide support for chan
1313

1414
With the C Runtime Library, you can create multithreaded applications using the `_beginthread` and `_beginthreadex` functions. This topic only covers multithreaded applications created using these functions. For more information, see [_beginthread, _beginthreadex](../c-runtime-library/reference/beginthread-beginthreadex.md).
1515

16-
To change the locale using the C Runtime Library, use the [setlocale](../preprocessor/setlocale.md) function. In previous versions of Visual C++, this function would always modify the locale throughout the entire application. There is now support for setting the locale on a per-thread basis. This is done using the [_configthreadlocale](../c-runtime-library/reference/configthreadlocale.md) function. To specify that [setlocale](../preprocessor/setlocale.md) should only change the locale in the current thread, call `_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)` in that thread. Conversely, calling `_configthreadlocale(_DISABLE_PER_THREAD_LOCALE)` will cause that thread to use the global locale, and any call to [setlocale](../preprocessor/setlocale.md) in that thread will change the locale in all threads that have not explicitly enabled per-thread locale.
16+
To change the locale using the C Runtime Library, use the [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md) function. In previous versions of Visual C++, this function would always modify the locale throughout the entire application. There is now support for setting the locale on a per-thread basis. This is done using the [_configthreadlocale](../c-runtime-library/reference/configthreadlocale.md) function. To specify that [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md) should only change the locale in the current thread, call `_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)` in that thread. Conversely, calling `_configthreadlocale(_DISABLE_PER_THREAD_LOCALE)` will cause that thread to use the global locale, and any call to [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md) in that thread will change the locale in all threads that have not explicitly enabled per-thread locale.
1717

1818
To change the locale using the C++ Runtime Library, use the [locale Class](../standard-library/locale-class.md). By calling the [locale::global](../standard-library/locale-class.md#global) method, you change the locale in every thread that has not explicitly enabled per-thread locale. To change the locale in a single thread or portion of an application, simply create an instance of a `locale` object in that thread or portion of code.
1919

2020
> [!NOTE]
21-
> Calling [locale::global](../standard-library/locale-class.md#global) changes the locale for both the C++ Standard Library and the C Runtime Library. However, calling [setlocale](../preprocessor/setlocale.md) only changes the locale for the C Runtime Library; the C++ Standard Library is not affected.
21+
> Calling [locale::global](../standard-library/locale-class.md#global) changes the locale for both the C++ Standard Library and the C Runtime Library. However, calling [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md) only changes the locale for the C Runtime Library; the C++ Standard Library is not affected.
2222
23-
The following examples show how to use the [setlocale](../preprocessor/setlocale.md) function, the [locale Class](../standard-library/locale-class.md), and the [_configthreadlocale](../c-runtime-library/reference/configthreadlocale.md) function to change the locale of an application in several different scenarios.
23+
The following examples show how to use the [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md) function, the [locale Class](../standard-library/locale-class.md), and the [_configthreadlocale](../c-runtime-library/reference/configthreadlocale.md) function to change the locale of an application in several different scenarios.
2424

2525
## Example: Change locale with per-thread locale enabled
2626

27-
In this example, the main thread spawns two child threads. The first thread, Thread A, enables per-thread locale by calling `_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)`. The second thread, Thread B, as well as the main thread, do not enable per-thread locale. Thread A then proceeds to change the locale using the [setlocale](../preprocessor/setlocale.md) function of the C Runtime Library.
27+
In this example, the main thread spawns two child threads. The first thread, Thread A, enables per-thread locale by calling `_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)`. The second thread, Thread B, as well as the main thread, do not enable per-thread locale. Thread A then proceeds to change the locale using the [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md) function of the C Runtime Library.
2828

29-
Since Thread A has per-thread locale enabled, only the C Runtime Library functions in Thread A start using the "french" locale. The C Runtime Library functions in Thread B and in the main thread continue to use the "C" locale. Also, since [setlocale](../preprocessor/setlocale.md) does not affect the C++ Standard Library locale, all C++ Standard Library objects continue to use the "C" locale.
29+
Since Thread A has per-thread locale enabled, only the C Runtime Library functions in Thread A start using the "french" locale. The C Runtime Library functions in Thread B and in the main thread continue to use the "C" locale. Also, since [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md) does not affect the C++ Standard Library locale, all C++ Standard Library objects continue to use the "C" locale.
3030

3131
```cpp
3232
// multithread_locale_1.cpp
@@ -222,9 +222,9 @@ unsigned __stdcall RunThreadB(void *params)
222222

223223
## Example: Change locale without per-thread locale enabled
224224

225-
In this example, the main thread spawns two child threads. The first thread, Thread A, enables per-thread locale by calling `_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)`. The second thread, Thread B, as well as the main thread, do not enable per-thread locale. Thread B then proceeds to change the locale using the [setlocale](../preprocessor/setlocale.md) function of the C Runtime Library.
225+
In this example, the main thread spawns two child threads. The first thread, Thread A, enables per-thread locale by calling `_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)`. The second thread, Thread B, as well as the main thread, do not enable per-thread locale. Thread B then proceeds to change the locale using the [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md) function of the C Runtime Library.
226226

227-
Since Thread B does not have per-thread locale enabled, the C Runtime Library functions in Thread B and in the main thread start using the "french" locale. The C Runtime Library functions in Thread A continue to use the "C" locale because Thread A has per-thread locale enabled. Also, since [setlocale](../preprocessor/setlocale.md) does not affect the C++ Standard Library locale, all C++ Standard Library objects continue to use the "C" locale.
227+
Since Thread B does not have per-thread locale enabled, the C Runtime Library functions in Thread B and in the main thread start using the "french" locale. The C Runtime Library functions in Thread A continue to use the "C" locale because Thread A has per-thread locale enabled. Also, since [setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md) does not affect the C++ Standard Library locale, all C++ Standard Library objects continue to use the "C" locale.
228228

229229
```cpp
230230
// multithread_locale_3.cpp
@@ -431,7 +431,7 @@ unsigned __stdcall RunThreadB(void *params)
431431
[Multithreading Support for Older Code (Visual C++)](multithreading-support-for-older-code-visual-cpp.md)<br/>
432432
[_beginthread, _beginthreadex](../c-runtime-library/reference/beginthread-beginthreadex.md)<br/>
433433
[_configthreadlocale](../c-runtime-library/reference/configthreadlocale.md)<br/>
434-
[setlocale](../preprocessor/setlocale.md)<br/>
434+
[setlocale](../c-runtime-library/reference/setlocale-wsetlocale.md)<br/>
435435
[Internationalization](../c-runtime-library/internationalization.md)<br/>
436436
[Locale](../c-runtime-library/locale.md)<br/>
437437
[\<clocale>](../standard-library/clocale.md)<br/>

0 commit comments

Comments
 (0)