javscripters
javscripters

Reputation: 3

Namespace conversion from VS 2017 to VS 2012

I have 2 projects created in 2 different versions of Visual Studio: VS 2012 and VS 2017 in C++. I am trying to bring the project from VS 2017 to VS 2012 because it is simpler for me.

On VS 2017 this code is accepted:

namespace first::nested {

}

So to make it work on VS 2012 I have to do it this way:

  namespace first {
      namespace nested {

      }
  }

I was wondering if there is a way to make this feature work on VS 2012?

Upvotes: 0

Views: 71

Answers (1)

Ron
Ron

Reputation: 15521

Nested namespace definitions is a C++17 feature. Visual Studio 2017 supports the C++17 standard while the Visual Studio 2012 does not so there is no way to compile that code with VS 2012. There is no built-in feature to do the conversion / downgrading either. You need to write the parser or use the 3rd party scripts / libraries.

Here is the MSDN documentation for the pre - VS 2017 support for C++11/14/17 features.

Upvotes: 2

Related Questions