Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 708 Bytes

compiler-error-c2049.md

File metadata and controls

32 lines (23 loc) · 708 Bytes
description title ms.date f1_keywords helpviewer_keywords
Learn more about: Compiler Error C2049
Compiler Error C2049
08/18/2022
C2049
C2049

Compiler Error C2049

'namespace-name': non-inline namespace cannot be reopened as inline

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:

// C2049.cpp
namespace ns {}

inline namespace ns {}   // C2049

Possible resolution:

// C2049b.cpp
namespace ns {}

namespace ns {}