StandardCplusplus Library doesn't work with version 1.8

Hello Arduino forums,

I’ve recently installed the Arduino IDE (as my computer got wiped in the last year) v 1.8.6 and tried to run a old project after installing all the libraries. The project was meant for taking input from unity to control a large amount of neopixel lights. For this program I needed to use the neopixel and StandardCplusplus-master library to handle the large amount of incoming lights with vectors and the program worked as intented. I last touched the project a year ago, when there was v 1.6.10/11 .

All I got was the following compilation error. This error was the same when I just ran the StandardCplusplus-master example program.

Arduino: 1.8.6 (Windows 10), Board: "Arduino/Genuino Uno"

In file included from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/istream:24:0,

                 from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master\istream.cpp:23:

C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/ostream:318:50: error: default argument for template parameter for class enclosing 'class std::basic_ostream<charT, traits>::sentry'

   class _UCXXEXPORT basic_ostream<charT,traits>::sentry

                                                  ^

In file included from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master\istream.cpp:23:0:

C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/istream:343:107: error: default argument for template parameter for class enclosing 'class std::basic_istream<charT, traits>::sentry'

  template <class charT,class traits = char_traits<charT> > class _UCXXEXPORT basic_istream<charT,traits>::sentry {

                                                                                                           ^

exit status 1
In file included from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/istream:24:0,

                 from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/sstream:27,

                 from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master\sstream.cpp:22:

C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/ostream:318:50: error: default argument for template parameter for class enclosing 'class std::basic_ostream<charT, traits>::sentry'

   class _UCXXEXPORT basic_ostream<charT,traits>::sentry

                                                  ^

In file included from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/sstream:27:0,

                 from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master\sstream.cpp:22:

C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/istream:343:107: error: default argument for template parameter for class enclosing 'class std::basic_istream<charT, traits>::sentry'

  template <class charT,class traits = char_traits<charT> > class _UCXXEXPORT basic_istream<charT,traits>::sentry {

                                                                                                           ^

In file included from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/istream:24:0,

                 from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/iostream:27,

                 from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master\iostream.cpp:22:

C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/ostream:318:50: error: default argument for template parameter for class enclosing 'class std::basic_ostream<charT, traits>::sentry'

   class _UCXXEXPORT basic_ostream<charT,traits>::sentry

                                                  ^

In file included from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/iostream:27:0,

                 from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master\iostream.cpp:22:

C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/istream:343:107: error: default argument for template parameter for class enclosing 'class std::basic_istream<charT, traits>::sentry'

  template <class charT,class traits = char_traits<charT> > class _UCXXEXPORT basic_istream<charT,traits>::sentry {

                                                                                                           ^

In file included from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master\ios.cpp:23:0:

C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/ostream:318:50: error: default argument for template parameter for class enclosing 'class std::basic_ostream<charT, traits>::sentry'

   class _UCXXEXPORT basic_ostream<charT,traits>::sentry

                                                  ^

In file included from C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master\ios.cpp:24:0:

C:\Users\Philip\Documents\Arduino\libraries\StandardCplusplus-master/istream:343:107: error: default argument for template parameter for class enclosing 'class std::basic_istream<charT, traits>::sentry'

  template <class charT,class traits = char_traits<charT> > class _UCXXEXPORT basic_istream<charT,traits>::sentry {

                                                                                                           ^

Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I’ve looked around and found little to help.
So what can I do to get it to work with V 1.8+ ?
Also I would like to know what updates done to the IDE would cause this issue if possible .

Thank you for your time
Phil

Please post the link to where you downloaded the StandardCplusplus library from.

PhilNvyve:
Also I would like to know what updates done to the IDE would cause this issue if possible .

My guess is it's the update from avr-gcc 4.9.2 to avr-gcc 5.4.0, which was done in Arduino IDE 1.8.6/Arduino AVR Boards 1.6.22. You could test this by trying with Arduino IDE 1.8.5/AVR Boards 1.6.20, which uses avr-gcc 4.9.2.

pert:
Please post the link to where you downloaded the StandardCplusplus library from.
My guess is it's the update from avr-gcc 4.9.2 to avr-gcc 5.4.0, which was done in Arduino IDE 1.8.6/Arduino AVR Boards 1.6.22. You could test this by trying with Arduino IDE 1.8.5/AVR Boards 1.6.20, which uses avr-gcc 4.9.2.

I had a similar problem with an old project and using the 1.8.5 IDE worked just fine, thank you.

You're welcome. I'm glad to hear it's working now.

FYI, you can use Arduino AVR Boards 1.6.20 with the modern version of the Arduino IDE:

  • Tools > Board > Boards Manager
  • Wait for downloads to finish.
  • When you move the mouse pointer over "Arduino AVR Boards", you will see a "Select version" dropdown menu appear. Select "1.6.20".
  • Click "Install".
  • Wait for installation to finish.
  • Click "Close".

Due to a bug, this workaround doesn't work with Arduino IDE 1.8.6, but it will work with any other version of the Arduino IDE.

If you have File > Preferences > Check for updates on startup checked, the Arduino IDE may occasionally notify you that a new version of Arduino AVR Boards is available, you'll need to refrain from updating back to the using Arduino AVR Boards 1.6.23 again.