3 ms·
No lambdas allowed? For many other things they say "use within reason", I don't see why they can't say this for lambdas. They're finally making the stl algorith
by mmaldacker 13y ago
No lambdas allowed? For many other things they say "use within reason", I don't see why they can't say this for lambdas. They're finally making the stl algorithms easily usable. You don't have to write Functors that are in a different place then called.
Also, the guide seems to completely miss templates and actually pretty much allow everything in C++ (except lambdas and exceptions). I don't really see the point then.
- SamReidHughes 13y agoThey don't even want you to use rvalue references.
- adamnemecek 13y ago> They're finally making the stl algorithms easily usable. Well, considering they ban use of exceptions and considering that stl does use exceptions and therefore they cannot use stl, I don't think that they really care.
- IvyMike 12y agoI suspect they either use an STL that has a way to disable exceptions (such as STLPort) or they disable exceptions using compiler flags, or maybe both. You may argue that this really brings into question the "S" part of "STL" but it is done in practice and I'd argue it's not even all that difficult to deal with.
- pbsd 12y agoAccording to this StackOverflow reply [1], they do use the STL, but don't catch the (very rare) exceptions. [1] https://stackoverflow.com/a/15564254 https://stackoverflow.com/a/15564254
- exacube 12y agoThis is an older revision of the style guide; they updated the style guide recently to allow lambdas. Other C++11 features were also under review for a while.