Skip to content

Commit bb5b2bd

Browse files
author
Colin Robertson
authored
Merge branch 'master' into cr-fix-links
2 parents 8cda9bb + 82f6cdf commit bb5b2bd

106 files changed

Lines changed: 1051 additions & 693 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: "Compiler Error C2429 | Microsoft Docs"
3+
ms.custom: ""
4+
ms.date: "11/04/2016"
5+
ms.reviewer: ""
6+
ms.suite: ""
7+
ms.technology:
8+
- "devlang-cpp"
9+
ms.tgt_pltfrm: ""
10+
ms.topic: "error-reference"
11+
f1_keywords:
12+
- "C2429"
13+
dev_langs:
14+
- "C++"
15+
helpviewer_keywords:
16+
- "C2429"
17+
ms.assetid: 57ff6df9-5cf1-49f3-8bd8-4e550dfd65a0
18+
caps.latest.revision: 9
19+
author: "corob-msft"
20+
ms.author: "corob"
21+
manager: "ghogen"
22+
translation.priority.ht:
23+
- "cs-cz"
24+
- "de-de"
25+
- "es-es"
26+
- "fr-fr"
27+
- "it-it"
28+
- "ja-jp"
29+
- "ko-kr"
30+
- "pl-pl"
31+
- "pt-br"
32+
- "ru-ru"
33+
- "tr-tr"
34+
- "zh-cn"
35+
- "zh-tw"
36+
---
37+
# Compiler Error C2429
38+
'*language feature*' requires compiler flag '*compiler option*'
39+
40+
The language feature requires a specific compiler option for support.
41+
42+
The error C2429: language feature 'nested-namespace-definition' requires compiler flag '/std:c++latest' is generated if you try to define a *compound namespace*, a namespace that contains one or more scope-nested namespace names, starting in Visual Studio 2015 Update 3. Compound namespace definitions are not allowed in C++ prior to C++17. The compiler supports compound namespace definitions when the [/std:c++latest](../../build/reference/std-specify-language-standard-version.md) compiler option is specified:
43+
```cpp
44+
// C2429a.cpp
45+
namespace a::b { int i; } // C2429 starting in Visual C++ 2015 Update 3.
46+
// Use /std:c++latest to fix, or do this:
47+
// namespace a { namespace b { int i; }}
48+
49+
int main() {
50+
a::b::i = 2;
51+
}
52+
```

‎docs/error-messages/compiler-errors-1/compiler-errors-c2400-through-c2499.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ The articles in this part of the documentation contain information about a subse
6565

6666
[Compiler Error C2428](../../error-messages/compiler-errors-1/compiler-error-c2428.md)
6767

68+
[Compiler Error C2429](../../error-messages/compiler-errors-1/compiler-error-c2429.md)
69+
6870
[Compiler Error C2430](../../error-messages/compiler-errors-1/compiler-error-c2430.md)
6971

7072
[Compiler Error C2431](../../error-messages/compiler-errors-1/compiler-error-c2431.md)

‎docs/error-messages/compiler-errors-2/compiler-error-c2653.md‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ dev_langs:
1414
- "C++"
1515
helpviewer_keywords:
1616
- "C2653"
17-
- "CDaoRecordset class, adding records"
1817
ms.assetid: 3f49e731-affd-43a0-a8d0-181db7650bc3
1918
caps.latest.revision: 9
2019
author: "corob-msft"
@@ -38,11 +37,11 @@ translation.priority.ht:
3837
# Compiler Error C2653
3938
'identifier' : is not a class or namespace name
4039

41-
Syntax requires a class, structure, union, or namespace name.
40+
Syntax requires a class, structure, union, or namespace name.
4241

43-
The following sample generates C2653:
42+
The following sample generates C2653:
4443

45-
```
44+
```cpp
4645
// C2653.cpp
4746
// compile with: /c
4847
class yy {
@@ -53,12 +52,11 @@ void xx::func1(int m) {} // C2653
5352
void yy::func1(int m) {} // OK
5453
```
5554
56-
C2653 is also possible if you try to define a compound namespace; compound namespaces are not allowed in C++:
57-
58-
```
55+
C2653 is also possible if you try to define a *compound namespace*, a namespace that contains one or more scope-nested namespace names, when you use a version of Visual C++ prior to Visual Studio 2015 Update 3. Compound namespace definitions are not allowed in C++ prior to C++17. Starting in Visual C++ 2015 Update 3, the compiler supports compound namespace definitions when the [/std:c++latest](../../build/reference/std-specify-language-standard-version.md) compiler option is specified:
56+
```cpp
5957
// C2653b.cpp
60-
namespace a::b {int i;} // C2653
61-
58+
namespace a::b {int i;} // C2653 prior to Visual C++ 2015 Update 3,
59+
// C2429 thereafter. Use /std:c++latest to fix.
6260
namespace a {
6361
namespace b {
6462
int i;
@@ -68,4 +66,4 @@ namespace a {
6866
int main() {
6967
a::b::i = 2;
7068
}
71-
```
69+
```

‎docs/mfc/reference/cedit-class.md‎

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class CEdit : public CWnd
114114

115115
Construction can be a one-step process in a class derived from `CEdit`. Write a constructor for the derived class and call **Create** from within the constructor.
116116

117-
`CEdit` inherits significant functionality from `CWnd`. To set and retrieve text from a `CEdit` object, use the `CWnd` member functions [SetWindowText](../../mfc/reference/cwnd-class.md#cwnd__setwindowtext) and [GetWindowText](../../mfc/reference/cwnd-class.md#cwnd__getwindowtext), which set or get the entire contents of an edit control, even if it is a multiline control. Text lines in a multiline control are separated by '\r\n' character sequences. Also, if an edit control is multiline, get and set part of the control's text by calling the `CEdit` member functions [GetLine](#cedit__getline), [SetSel](#cedit__setsel), [GetSel](#cedit__getsel), and [ReplaceSel](#cedit__replacesel).
117+
`CEdit` inherits significant functionality from `CWnd`. To set and retrieve text from a `CEdit` object, use the `CWnd` member functions [SetWindowText](cwnd-class.md#cwnd__setwindowtext) and [GetWindowText](cwnd-class.md#cwnd__getwindowtext), which set or get the entire contents of an edit control, even if it is a multiline control. Text lines in a multiline control are separated by '\r\n' character sequences. Also, if an edit control is multiline, get and set part of the control's text by calling the `CEdit` member functions [GetLine](#cedit__getline), [SetSel](#cedit__setsel), [GetSel](#cedit__getsel), and [ReplaceSel](#cedit__replacesel).
118118

119119
If you want to handle Windows notification messages sent by an edit control to its parent (usually a class derived from `CDialog`), add a message-map entry and message-handler member function to the parent class for each message.
120120

@@ -152,7 +152,7 @@ class CEdit : public CWnd
152152

153153
If you create a `CEdit` object within a window, you may also need to destroy it. If you create the `CEdit` object on the stack, it is destroyed automatically. If you create the `CEdit` object on the heap by using the **new** function, you must call **delete** on the object to destroy it when the user terminates the Windows edit control. If you allocate any memory in the `CEdit` object, override the `CEdit` destructor to dispose of the allocations.
154154

155-
To modify certain styles in an edit control (such as **ES_READONLY**) you must send specific messages to the control instead of using [ModifyStyle](../../mfc/reference/cwnd-class.md#cwnd__modifystyle). See [Edit Control Styles](http://msdn.microsoft.com/library/windows/desktop/bb775464) in the [!INCLUDE[winSDK](../../atl/includes/winsdk_md.md)].
155+
To modify certain styles in an edit control (such as **ES_READONLY**) you must send specific messages to the control instead of using [ModifyStyle](cwnd-class.md#cwnd__modifystyle). See [Edit Control Styles](http://msdn.microsoft.com/library/windows/desktop/bb775464) in the [!INCLUDE[winSDK](../../atl/includes/winsdk_md.md)].
156156

157157
For more information on `CEdit`, see:
158158

@@ -161,11 +161,11 @@ class CEdit : public CWnd
161161
- Knowledge Base article Q259949 : INFO: SetCaretPos() Is Not Appropriate with CEdit or CRichEditCtrl Controls
162162

163163
## Inheritance Hierarchy
164-
[CObject](../../mfc/reference/cobject-class.md)
164+
[CObject](cobject-class.md)
165165

166-
[CCmdTarget](../../mfc/reference/ccmdtarget-class.md)
166+
[CCmdTarget](ccmdtarget-class.md)
167167

168-
[CWnd](../../mfc/reference/cwnd-class.md)
168+
[CWnd](cwnd-class.md)
169169

170170
`CEdit`
171171

@@ -272,7 +272,7 @@ virtual BOOL Create(
272272

273273
### Parameters
274274
`dwStyle`
275-
Specifies the edit control's style. Apply any combination of [edit styles](../../mfc/reference/edit-styles.md) to the control.
275+
Specifies the edit control's style. Apply any combination of [edit styles](edit-styles.md) to the control.
276276

277277
`rect`
278278
Specifies the edit control's size and position. Can be a `CRect` object or `RECT` structure.
@@ -291,9 +291,9 @@ virtual BOOL Create(
291291

292292
When **Create** executes, Windows sends the [WM_NCCREATE](http://msdn.microsoft.com/library/windows/desktop/ms632635), [WM_NCCALCSIZE](http://msdn.microsoft.com/library/windows/desktop/ms632634), [WM_CREATE](http://msdn.microsoft.com/library/windows/desktop/ms632619), and [WM_GETMINMAXINFO](http://msdn.microsoft.com/library/windows/desktop/ms632626) messages to the edit control.
293293

294-
These messages are handled by default by the [OnNcCreate](../../mfc/reference/cwnd-class.md#cwnd__onnccreate), [OnNcCalcSize](../../mfc/reference/cwnd-class.md#cwnd__onnccalcsize), [OnCreate](../../mfc/reference/cwnd-class.md#cwnd__oncreate), and [OnGetMinMaxInfo](../../mfc/reference/cwnd-class.md#cwnd__ongetminmaxinfo) member functions in the `CWnd` base class. To extend the default message handling, derive a class from `CEdit`, add a message map to the new class, and override the above message-handler member functions. Override `OnCreate`, for example, to perform needed initialization for the new class.
294+
These messages are handled by default by the [OnNcCreate](cwnd-class.md#cwnd__onnccreate), [OnNcCalcSize](cwnd-class.md#cwnd__onnccalcsize), [OnCreate](cwnd-class.md#cwnd__oncreate), and [OnGetMinMaxInfo](cwnd-class.md#cwnd__ongetminmaxinfo) member functions in the `CWnd` base class. To extend the default message handling, derive a class from `CEdit`, add a message map to the new class, and override the above message-handler member functions. Override `OnCreate`, for example, to perform needed initialization for the new class.
295295

296-
Apply the following [window styles](../../mfc/reference/window-styles.md) to an edit control.
296+
Apply the following [window styles](window-styles.md) to an edit control.
297297

298298
- **WS_CHILD** Always
299299

@@ -570,7 +570,7 @@ DWORD GetMargins() const;
570570
For more information, see [EM_GETMARGINS](http://msdn.microsoft.com/library/windows/desktop/bb761590) in the [!INCLUDE[winSDK](../../atl/includes/winsdk_md.md)].
571571

572572
### Example
573-
See the example for [CEditView::GetEditCtrl](../../mfc/reference/ceditview-class.md#ceditview__geteditctrl).
573+
See the example for [CEditView::GetEditCtrl](ceditview-class.md#ceditview__geteditctrl).
574574

575575
## <a name="cedit__getmodify"></a> CEdit::GetModify
576576
Call this function to determine whether the contents of an edit control have been modified.
@@ -691,7 +691,7 @@ void LimitText(int nChars = 0);
691691
Specifies the length (in bytes) of the text that the user can enter. If this parameter is 0, the text length is set to **UINT_MAX** bytes. This is the default behavior.
692692

693693
### Remarks
694-
Changing the text limit restricts only the text the user can enter. It has no effect on any text already in the edit control, nor does it affect the length of the text copied to the edit control by the [SetWindowText](../../mfc/reference/cwnd-class.md#cwnd__setwindowtext) member function in `CWnd`. If an application uses the `SetWindowText` function to place more text into an edit control than is specified in the call to `LimitText`, the user can delete any of the text within the edit control. However, the text limit will prevent the user from replacing the existing text with new text, unless deleting the current selection causes the text to fall below the text limit.
694+
Changing the text limit restricts only the text the user can enter. It has no effect on any text already in the edit control, nor does it affect the length of the text copied to the edit control by the [SetWindowText](cwnd-class.md#cwnd__setwindowtext) member function in `CWnd`. If an application uses the `SetWindowText` function to place more text into an edit control than is specified in the call to `LimitText`, the user can delete any of the text within the edit control. However, the text limit will prevent the user from replacing the existing text with new text, unless deleting the current selection causes the text to fall below the text limit.
695695

696696
> [!NOTE]
697697
> In Win32 (Windows NT and Windows 95/98), [SetLimitText](#cedit__setlimittext) replaces this function.
@@ -869,7 +869,7 @@ void ReplaceSel(
869869
To specify that this function can be undone, set the value of this parameter to **TRUE** . The default value is **FALSE**.
870870

871871
### Remarks
872-
Replaces only a portion of the text in an edit control. If you want to replace all of the text, use the [CWnd::SetWindowText](../../mfc/reference/cwnd-class.md#cwnd__setwindowtext) member function.
872+
Replaces only a portion of the text in an edit control. If you want to replace all of the text, use the [CWnd::SetWindowText](cwnd-class.md#cwnd__setwindowtext) member function.
873873

874874
If there is no current selection, the replacement text is inserted at the current cursor location.
875875

@@ -976,14 +976,14 @@ void SetLimitText(UINT nMax);
976976
### Remarks
977977
The text limit is the maximum amount of text, in characters, that the edit control can accept.
978978

979-
Changing the text limit restricts only the text the user can enter. It has no effect on any text already in the edit control, nor does it affect the length of the text copied to the edit control by the [SetWindowText](../../mfc/reference/cwnd-class.md#cwnd__setwindowtext) member function in `CWnd`. If an application uses the `SetWindowText` function to place more text into an edit control than is specified in the call to `LimitText`, the user can delete any of the text within the edit control. However, the text limit will prevent the user from replacing the existing text with new text, unless deleting the current selection causes the text to fall below the text limit.
979+
Changing the text limit restricts only the text the user can enter. It has no effect on any text already in the edit control, nor does it affect the length of the text copied to the edit control by the [SetWindowText](cwnd-class.md#cwnd__setwindowtext) member function in `CWnd`. If an application uses the `SetWindowText` function to place more text into an edit control than is specified in the call to `LimitText`, the user can delete any of the text within the edit control. However, the text limit will prevent the user from replacing the existing text with new text, unless deleting the current selection causes the text to fall below the text limit.
980980

981981
This function replaces [LimitText](#cedit__limittext) in Win32.
982982

983983
For more information, see [EM_SETLIMITTEXT](http://msdn.microsoft.com/library/windows/desktop/bb761647) in the [!INCLUDE[winSDK](../../atl/includes/winsdk_md.md)].
984984

985985
### Example
986-
See the example for [CEditView::GetEditCtrl](../../mfc/reference/ceditview-class.md#ceditview__geteditctrl).
986+
See the example for [CEditView::GetEditCtrl](ceditview-class.md#ceditview__geteditctrl).
987987

988988
## <a name="cedit__setmargins"></a> CEdit::SetMargins
989989
Call this method to set the left and right margins of this edit control.
@@ -1009,7 +1009,7 @@ void SetMargins(
10091009
For more information, see [EM_SETMARGINS](http://msdn.microsoft.com/library/windows/desktop/bb761649) in the [!INCLUDE[winSDK](../../atl/includes/winsdk_md.md)].
10101010

10111011
### Example
1012-
See the example for [CEditView::GetEditCtrl](../../mfc/reference/ceditview-class.md#ceditview__geteditctrl).
1012+
See the example for [CEditView::GetEditCtrl](ceditview-class.md#ceditview__geteditctrl).
10131013

10141014
## <a name="cedit__setmodify"></a> CEdit::SetModify
10151015
Call this function to set or clear the modified flag for an edit control.
@@ -1048,7 +1048,7 @@ void SetPasswordChar(TCHAR ch);
10481048

10491049
When the `SetPasswordChar` member function is called, `CEdit` will redraw all visible characters using the character specified by *ch*.
10501050

1051-
If the edit control is created with the [ES_PASSWORD](../../mfc/reference/edit-styles.md) style, the default password character is set to an asterisk ( **\***). This style is removed if `SetPasswordChar` is called with *ch* set to 0.
1051+
If the edit control is created with the [ES_PASSWORD](edit-styles.md) style, the default password character is set to an asterisk ( **\***). This style is removed if `SetPasswordChar` is called with *ch* set to 0.
10521052

10531053
For more information, see [EM_SETPASSWORDCHAR](http://msdn.microsoft.com/library/windows/desktop/bb761653) in the [!INCLUDE[winSDK](../../atl/includes/winsdk_md.md)].
10541054

@@ -1070,7 +1070,7 @@ BOOL SetReadOnly(BOOL bReadOnly = TRUE);
10701070
Nonzero if the operation is successful, or 0 if an error occurs.
10711071

10721072
### Remarks
1073-
The current setting can be found by testing the [ES_READONLY](../../mfc/reference/edit-styles.md) flag in the return value of [CWnd::GetStyle](../../mfc/reference/cwnd-class.md#cwnd__getstyle).
1073+
The current setting can be found by testing the [ES_READONLY](edit-styles.md) flag in the return value of [CWnd::GetStyle](cwnd-class.md#cwnd__getstyle).
10741074

10751075
For more information, see [EM_SETREADONLY](http://msdn.microsoft.com/library/windows/desktop/bb761655) in the [!INCLUDE[winSDK](../../atl/includes/winsdk_md.md)].
10761076

@@ -1199,12 +1199,12 @@ BOOL SetTabStops(
11991199

12001200
This member function is only processed by multiple-line edit controls.
12011201

1202-
`SetTabStops` does not automatically redraw the edit window. If you change the tab stops for text already in the edit control, call [CWnd::InvalidateRect](../../mfc/reference/cwnd-class.md#cwnd__invalidaterect) to redraw the edit window.
1202+
`SetTabStops` does not automatically redraw the edit window. If you change the tab stops for text already in the edit control, call [CWnd::InvalidateRect](cwnd-class.md#cwnd__invalidaterect) to redraw the edit window.
12031203

12041204
For more information, see [EM_SETTABSTOPS](http://msdn.microsoft.com/library/windows/desktop/bb761663) and [GetDialogBaseUnits](http://msdn.microsoft.com/library/windows/desktop/ms645475) in the [!INCLUDE[winSDK](../../atl/includes/winsdk_md.md)].
12051205

12061206
### Example
1207-
See the example for [CEditView::SetTabStops](../../mfc/reference/ceditview-class.md#ceditview__settabstops).
1207+
See the example for [CEditView::SetTabStops](ceditview-class.md#ceditview__settabstops).
12081208

12091209
## <a name="cedit__showballoontip"></a> CEdit::ShowBalloonTip
12101210
Displays a balloon tip that is associated with the current edit control.
@@ -1268,10 +1268,10 @@ BOOL Undo();
12681268
[MFC Sample CMNCTRL2](../../top/visual-cpp-samples.md)
12691269
[CWnd Class](../../mfc/reference/cwnd-class.md)
12701270
[Hierarchy Chart](../../mfc/hierarchy-chart.md)
1271-
[CWnd Class](../../mfc/reference/cwnd-class.md)
1272-
[CButton Class](../../mfc/reference/cbutton-class.md)
1273-
[CComboBox Class](../../mfc/reference/ccombobox-class.md)
1274-
[CListBox Class](../../mfc/reference/clistbox-class.md)
1275-
[CScrollBar Class](../../mfc/reference/cscrollbar-class.md)
1276-
[CStatic Class](../../mfc/reference/cstatic-class.md)
1277-
[CDialog Class](../../mfc/reference/cdialog-class.md)
1271+
[CWnd Class](cwnd-class.md)
1272+
[CButton Class](cbutton-class.md)
1273+
[CComboBox Class](ccombobox-class.md)
1274+
[CListBox Class](clistbox-class.md)
1275+
[CScrollBar Class](cscrollbar-class.md)
1276+
[CStatic Class](cstatic-class.md)
1277+
[CDialog Class](cdialog-class.md)

‎docs/parallel/amp/cpp-amp-cpp-accelerated-massive-parallelism.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ C++ AMP (C++ Accelerated Massive Parallelism) accelerates the execution of your
4141
|Title|Description|
4242
|-----------|-----------------|
4343
|[C++ AMP Overview](../../parallel/amp/cpp-amp-overview.md)|Describes the key features of C++ AMP and the mathematical library.|
44-
|[Using Lambdas, Function Objects, and Restricted Functions](../../parallel/amp/using-lambdas-function-objects-and-restricted-functions.md)|Describes how to use lambda expressions, function objects, and restricted functions in calls to the [parallel_for_each](../Topic/parallel_for_each%20Function%20\(C++%20AMP\).md) method.|
44+
|[Using Lambdas, Function Objects, and Restricted Functions](../../parallel/amp/using-lambdas-function-objects-and-restricted-functions.md)|Describes how to use lambda expressions, function objects, and restricted functions in calls to the [parallel_for_each](reference/concurrency-namespace-functions-amp.md#parallel_for_each) method.|
4545
|[Using Tiles](../../parallel/amp/using-tiles.md)|Describes how to use tiles to accelerate your C++ AMP code.|
4646
|[Using accelerator and accelerator_view Objects](../../parallel/amp/using-accelerator-and-accelerator-view-objects.md)|Describes how to use accelerators to customize execution of your code on the GPU.|
4747
|[Using C++ AMP in Windows Store Apps](../../parallel/amp/using-cpp-amp-in-windows-store-apps.md)|Describes how to use C++ AMP in [!INCLUDE[win8_appname_long](../../build/includes/win8_appname_long_md.md)] apps that use Windows Runtime types.|

0 commit comments

Comments
 (0)