Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use C++17 language features #18

Closed
salkinium opened this issue May 18, 2018 · 7 comments
Closed

Use C++17 language features #18

salkinium opened this issue May 18, 2018 · 7 comments

Comments

@salkinium
Copy link
Member

We're already using C++14 by default, which requires at least GCC 5.
This is an issue for the official avr-gcc from Atmel which ships with Ubuntu in version 4.9.3.
Most other linux distributions, as well as macOS via Homebrew (Q: what about Windows?) compile their own avr-gcc from upstream, which is missing support for several AVR architectures and devices.
For the sake of moving forwards, we've accepted this caveat and are using a self-compiled avr-gcc 7.3.0 for our CI.
ARM already ships arm-none-eabi-gcc for v7.2.0 since the 2017q4 release.

The C++ standards support page for GCC shows that all language features of C++17 (except fixes to template argument deduction for class templates) are supported by GCC 7.
I would therefore like to enable C++17 as the default for modm to already make use of very useful new features such as constexpr if, enhancements to variadic templates, selection statements with initializers, constexpr lambdas and many more.

cc @dergraaf @strongly-typed @rleh @chris-durand @daniel-k @ekiwi @georgi-g @mhthies

@siy
Copy link
Member

siy commented May 19, 2018

It was the thing which I was about to ask for.

@rleh
Copy link
Member

rleh commented May 19, 2018

arm-none-eabi-gcc

avr-gcc

@salkinium
Copy link
Member Author

If you use 32-bit Linux, well… meh.
I guess in the worst case you can always provide a Docker container for some precompiled avr-gcc.

I think this is happening.

@rleh
Copy link
Member

rleh commented May 21, 2018

32-bit Linux

Who uses 32-bit Linux today?

The Ubuntu PPA and Fedora include i386/i686 builds of avr-gcc and arm-none-eabi-gcc.

Oh, Raspberry Pi still has no official 64-bit software support 😒
Raspbian has no avr-gcc and arm-none-eabi-gcc packages, but Fedora has ARMv7 and Aarch64 packages of avr-gcc and arm-none-eabi-gcc.

@salkinium
Copy link
Member Author

Oh, Raspberry Pi still has no official 64-bit software support 😒

Also missing x86 support 😒

@salkinium
Copy link
Member Author

I think this is happening.

It happened.

@daniel-k
Copy link
Contributor

\o/

@rleh rleh mentioned this issue Sep 6, 2018
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants