c++11 support

Hi,

I can not use std::uniqu_ptr , std::function and others modern stl objects.

When I'm including "memory" or "funcitonal" I have error:

fatal error: functional: No such file or directory

the same error i have for memory.

It is very strange because I have support for c++11, because this code is compiling:

auto lambda = (){}[];

I'm using arduino 1.8.5 on windows. board is set to Arduino Nano (for Arudino Uno the same issue).

After switch board to esp8226 then no errors.

It is not strange at all. The error message tells you whats wrong and if you can't fix that then give up!

Mark

The resources of the AVR-based boards like your Nano are very limited. For this reason, you will not find the full range of C++ functionality. It is possible to install a 3rd party STL if you like. I haven't used them so I can't recommend a specific solution, but you'll find it soon enough after a little time with your favorite search engine.

As you discovered, the boards that use more capable modern microcontrollers also have closer to the functionality you'd expect when writing C++ code for your computer.

Hehe,

there is no solution. We have compiler which supports c++11, but we dont have std lirbrary to use.

some ridiculus example:

class A{
A()  =default;
A(A&& a) = default; //nice modern move constructor
};

void loop(){

 A a{};
 A b = std::move(a); // here is error because we dont have any header with std::move !!!!
}

in my favorite search engine there is no solution. Any kind of attempt of porting stl is not supported any longer.

I'm very suppriesed that Arduino company have not done it.

@Mark please do not reply to me any more. You seems to be noob, hater or dummy bot. Next time I will report yours usless comments.

lustanis:
in my favorite search engine there is no solution.

Then your favorite search engine is garbage. Here's one I found on the first page of my search:

There are others.

pert:
Then your favorite search engine is garbage. Here's one I found on the first page of my search:
GitHub - mike-matera/ArduinoSTL: An STL and iostream implementation based on uClibc++ that supports my CS-11M class.
There are others.

if you did not check it and only spent 1 min to find any thing what you think that work, then dont help me in this way!!! you are wasting my and your time.

lustanis:
if you did not check it and only spent 1 min to find any thing what you think that work, then dont help me in this way!!!

I said from the very start that I've never used one of the 3rd party STL solutions for the AVR boards and so could only tell you that they exist and are easily found with a few minutes on a search engine. Then you said your search engine didn't give you any results, so I provided one to show you were wrong.

lustanis:
dont help me in this way!!! you are wasting my and your time.

Clearly. Well, don't worry, I won't waste my time trying to provide free assistance to such an ungrateful jerk as you ever again.