Loading...
Pages: [1]   Go Down
Author Topic: C++11  (Read 645 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is Arduino C++11 compatible?
Logged

Offline Offline
Edison Member
*
Karma: 15
Posts: 1002
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It was my understanding any every program that works under C++03 would work under C++11.

I enabled C++11 for my projects by modifying the arduino source a little to provide a --std=gnu++11 switch to the compiler.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow, Quick response.
Thanks, í'll get cracking.
Logged

SF Bay Area (USA)
Offline Offline
Faraday Member
**
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The version of g++ shipped with the windows and Mac versions of Arduino seems to be from 2008...  (it still accepts --std=gnu++11, though.)

Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 27
Posts: 1095
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want C++11, you really need a more modern GCC (and then edit the software that compiles the Arduino to enable C++11 support).  I believe you want GCC 4.7 (4.7.1 was just released).
Logged

Pages: [1]   Go Up
Print
 
Jump to: