Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/error-messages/compiler-errors-1/compiler-error-c2049.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,21 @@ helpviewer_keywords: ["C2049"]
The **`inline`** keyword may be used on a namespace definition extension only if it was also used on the original namespace definition.

To resolve this issue, make the use of the **`inline`** specifier consistent across all parts of the namespace.

The following sample generates C2049:

```cpp
// C2049.cpp
namespace ns {}

inline namespace ns {} // C2049
```

Possible resolution:

```cpp
// C2049b.cpp
namespace ns {}

namespace ns {}
```