StandardCplusplus icon indicating copy to clipboard operation
StandardCplusplus copied to clipboard

Problem with vector library

Open benoittachet opened this issue 8 years ago • 2 comments

Hello,

I'm currently trying to use your library to make a school project, and I prefer to use vectors instead of double-sized array. It worked well on my last project (made last week), but now, when I try to add the vector library, I get the following errors :

C:\Users\benoit\Documents\Arduino\libraries\StandardCplusplus/vector:43:94: error: macro "swap" passed 4 arguments, but takes just 2

template <class T, class Allocator> void swap(vector<T,Allocator>& x, vector<T,Allocator>& y);

                                                                                          ^

C:\Users\benoit\Documents\Arduino\libraries\StandardCplusplus/vector:520:106: error: macro "swap" passed 4 arguments, but takes just 2

template <class T, class Allocator> _UCXXEXPORT void swap(vector<T,Allocator>& x, vector<T,Allocator>& y){

Il works well with the example file and my previous project, so I don't know what to do...

I just include the standardCplusplus.h and vector headers at beginning of my .ino file.

benoittachet avatar Mar 13 '17 21:03 benoittachet

This project is dead. I have a library that's available in the Arduino Library Manager called ArduinoSTL.

mike-matera avatar Mar 13 '17 22:03 mike-matera

OK, I'll check that, thanks and sorry for disturbing you

benoittachet avatar Mar 13 '17 22:03 benoittachet

Also, feel free to post the entire failing .INO sketch here.

maniacbug avatar Jul 05 '23 23:07 maniacbug