Closed probonopd closed 1 year ago
I get the same errors when compiling with
ESP8266 Arduino library version: 1.6.5-947-g39819F0 Arduno 1.6.6
@probonopd @funvill
I have been looking for std::sort
and discovered that it is available for esp8266/Arduino out of the box (without installing any additional library)!
Work done by @igrr and the team never cease to amaze me :+1:
I am using stable 2.1.0 release of 28-Feb-2016 - http://esp8266.github.io/Arduino/versions/2.1.0/ with Arduino IDE 1.6.7. If I switch board from ESP8266 to Adriano UNO, IDE does not find the includes.
Here is my sketch:
#include <algorithm>
#include <array>
void setup()
{
std::array<int, 10> s = {45, 37, 54, 62, 8, 96, 81, 79, 20, 13};
Serial.begin(74880);
Serial.println("TempateSorting.ino");
for (int i : s)
{
Serial.print(i);
Serial.print(" ");
}
Serial.println();
std::sort(s.begin(), s.end());
for (int i : s)
{
Serial.print(i);
Serial.print(" ");
}
Serial.println();
}
void loop()
{
}
The result is as follows:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
~ld
TempateSorting.ino
45 37 54 62 8 96 81 79 20 13
8 13 20 37 45 54 62 79 81 96
This is awesome :smile:
Krzysztof
Should be fixed now in 2756386
It would be great if the ESP8266 platform could be supported. https://github.com/esp8266/Arduino
Currently compilation stops and gives errors like