Advertisement

Limit my project to an older C++ version?

Started by March 27, 2018 06:36 PM
4 comments, last by Shaarigan 6 years, 5 months ago

Hello!

I'm currently working on a project where I'm heavily using C++ 11 and 14 features, but also came into the taste of 17.

Now, I know there are plenty of NDAs, but what would be the wisest decision to make if one wants to keep other modern consoles as a possibility?

I know wrapped around my current graphics backend, so switching it out is less of a pain, but I imagine that if I build my error-management on C++ 17 features, it might become very annoying to port the project. Especially since I fear that systems - as the Nintendo Switch - are only supporting C++ 11 - if even.

Are there any tips to be given as in how I should decide on this or how to structure code?

I assume, they use their own modified compilers, not sure if they are interested in even adapting to new standards... especially I read somewhere, that older consoles were not using C++ 11.

I think, using boost would be one option and use its implementation of some new types introduced in C++ 17.

I might just need a toss in the right direction. I know there is probably not much to found decisions on, but might be a part that I'm overlooking... who knows!

Thanks for your time : )

 

I know that Unreal supports at least C++11 features so you could bet your ass that the major consols support at least a toolchain that is capable to run C++11 features. There is nothing about an NDA but Unreal wouldnt do it if they would keep there customers from running on these devices ;)

Advertisement

Oh, interesting point, thanks!

I wonder why there is such a lack of interest to support newer features, C++11 is 7 years in the past by now and plenty new features arrived that help development.

Is it because those compilers are considered time tested?

So I fear, if I use anything newer than C++11, it will bite me whenever I think about porting later, hmph.

23 hours ago, Angelic Ice said:

I wonder why there is such a lack of interest to support newer features, C++11 is 7 years in the past by now and plenty new features arrived that help development.

While the standard was indeed targeted to be published 7 years ago, implementation of said standard is another matter entirely.

GCC didn't achieve 100% implementation of C++11 until version 4.8.1 in 2015. Clang moves a bit faster, and achieved the same in version 3.3 as early as 2013. Microsoft's compiler achieved support in 2015, modulo some disputed portions of the standard.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Yeah, that are standards. Some guys meet in a room and discuss about what "they" want to have feature supports for. Means we dont have any thread pooling up 17 but lambda expressions to

Quote

C++11 introduces lambdas allow you to write an inline, anonymous functor to replace the struct f. For small simple examples this can be cleaner to read (it keeps everything in one place) and potentially simpler to maintain

Source: StackOverflow

The Standard is dead, long live the Standard!

This topic is closed to new replies.

Advertisement