BinaryByter
(which in fact is true due to the lack of features as opposed to C++)
most of the features of C++ are it's standard lib
Anonymous
don't start flaming about that
BinaryByter
lol
Anonymous
most of the features of C++ are it's standard lib
language core features != library "features"
BinaryByter
which is exactly why I think that your claim is false
Anonymous
https://github.com/AnthonyCalandra/modern-cpp-features here is listed only the last 3 standards additions
BinaryByter
atleast to some degree
Ибраги́м
most of the features of C++ are it's standard lib
Nope. Constexpr Templates Fold expressions Auto Decltype Namespaces Classes Noexcept .... Are not library features
Anonymous
If you have to build a compiler for a microprocessor alone it is worth to spend time on a working C compiler rather than a C++11 one
Anonymous
But today for example GCC has a good support for C++17
Anonymous
the only thing they did not implement yet is the parallelization
Anonymous
which is a very great feature of C++ I was expecting
Anonymous
I mean I just have say to the compiler I want to use SIMD processing with a sorting algorithm, it is fucking awesome EDIT: or any other parallelization "method", it results in me having to worry about almost nothing about that
Ибраги́м
which is a very great feature of C++ I was expecting
Executors TS have implementation u can use on Github. Parallelism is here already.
Anonymous
Even modules are gonna be great... but it is not a feature I would miss if it didn't exist
olli
again a language isn't defined by the compilers
Where did I claim this? I only said choosing a language for embedded systems may not only depend on the language
olli
I think he is just saying that implementing a C compiler is easier
Exactly, the fist compiler for every platform is probably a c compiler.
olli
Just look at type deduction in C vs C++.
Anonymous
shit don't remind me about that creepy stuff
Ибраги́м
https://github.com/executors
Anonymous
thanks I think I'll give it a try!
olli
E.g. void foo() { int v = 3; int &vi = v; [=](){ decltype (i) t; decltpe((vi)) x =t; } } What's the type of x?
Anonymous
I admit that I tested, cuz I don't remember deduction rules and I often see at reference, but it is an int lvalue reference
Ибраги́м
U lose
Anonymous
ok let's assume it is captured by the lambda
olli
Typing on mobile is hard
olli
GCC and MsVC get that wrong
Ибраги́м
Correct answer depends on how it's been captured
olli
Correct answer depends on how it's been captured
I updated the snippet What's the result when captured by copy? What's the result when by reference?
Anonymous
a.substr(0,1).swap(b.substr(0,1)); why I can’t do this..
olli
int&
when captured by copy or reference?
Ибраги́м
E.g. void foo() { int v = 3; int &vi = v; [=](){ decltype (i) t; decltpe((vi)) x =t; } } What's the type of x?
Now u corrected it bcos the original version : void foo() { int v = 3; int &vi = v; [](){ decltpe((vi)) x; } } Is horrifying
Ибраги́м
Hence, the initialisation
olli
Reference
and when captured by copy?
Anonymous
anyone knows .
Ashish
It was github
Ashish
🤔
olli
a.substr(0,1).swap(b.substr(0,1)); why I can’t do this..
substr returns a new string swap accepts only non const lvalue paramters (only object that have names) the returned string from swap cannot be captured as non const lvalue reference so you can't do it
Anonymous
Hello
olli
and when captured by copy?
twimc its const int& as specified/described in [expr.prim.id.unqual#2].
Anonymous
🚶‍♀✨
Ибраги́м
Ибраги́м
Clang is correct
BinaryByter
here my solution for accessing private members in unit tests
BinaryByter
enjoy
Dima
BinaryByter
huh? XD
Bader
huh? XD
how's catch for testing? been using gtests
BinaryByter
how's catch for testing? been using gtests
I have had bad experiences with catch
BinaryByter
so i'm trying to get reconsiliated wiht it
BinaryByter
I have had bad experiences with catch
(it failed tests that were not failing)
klimi
Don't do testing xD
Bader
👍
Bader
btw, why does everyone have GNU behind their names now??? xD
BinaryByter
klimi
I need to vent
BinaryByter
Uh
hehehe
BinaryByter
okay do it :D
Bader
Don't do testing xD
yes master, I must test all code by hand, and if it breaks, it then becomes a new feature 🤞
klimi
Just don't
Bader
after all, unexpected behaviors create the best features am I right??
BinaryByter
Don't test it by code
it's called unit testing
klimi
I'm just so sad