Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
StephanTLavavej
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
61.
▲
by
StephanTLavavej
10y ago
That guidance isn't correct in the C++11 New World Order. For maximum performance, you must think about move semantics. Simply saying const X& everywhere will inhibit move semantics (can't move from const, can't move from
62.
▲
by
StephanTLavavej
10y ago
Part of it was surely programmer confusion, but old compilers in the C++98 days were also worse about implementing the RVO/NRVO. For example, MSVC didn't implement the NRVO until 2005.
63.
▲
by
StephanTLavavej
10y ago
It's a little more subtle than that. "val" is definitely an lvalue. However, when returning a local variable like this, C++11 has a rule: "if the NRVO activates, there are no copies/moves. Otherwise, see if you can
64.
▲
by
StephanTLavavej
10y ago
Copy elision, including the RVO and NRVO, actually has to be blessed by the language (there is a paragraph in the C++ Standard dedicated to it). That's because copy elision skips calls to copy constructors and destructors, which are &q
65.
▲
by
StephanTLavavej
10y ago
Actually, it's not even close. 10,000 attempts to guess a 4-digit number are certain to succeed. 100 attempts to guess 100 4-digit numbers have a good chance of resulting in no hits. For each 4-digit number, you produce 100 different g
66.
▲
by
StephanTLavavej
10y ago
MSVC provides that feedback. See https://msdn.microsoft.com/en-us/library/jj658585.aspx - the compiler option you want is /Qvec-report:2 which "Outputs an informational message for loops that are vectori
67.
▲
by
StephanTLavavej
10y ago
Hmm, as long as you don't always use the big cube as the baseline, that works.
68.
▲
by
StephanTLavavej
10y ago
> From this it seems enough to only test combinations where two edges align. That can't be correct in general. Imagine a 9x9x9 cube, and nine 3x3x1 squares. This can fit into a 9x9x10 box, with the squares all on one side of the big
69.
▲
by
StephanTLavavej
10y ago
Yeah, it makes migrating a codebase with third-party libraries built with older toolsets easier. Note that you'll need to build with VS 2017 if you want header-only improvements like the vector overhaul, and you'll need to update
70.
▲
by
StephanTLavavej
10y ago
In MSVC's STL we're making major changes, adding lots of features in pursuit of C++17 conformance. Among other things, we've added several new headers between VS 2015 Update 3 and VS 2017 RC (<string_view>, <optional
71.
▲
by
StephanTLavavej
10y ago
MSVC STL dev here. We're doing something different this time around. VS 2015 RTM and Update 1/2/3 were binary-compatible (as usual) while adding lots of features to the compiler and STL (unusual). VS 2017 RTM and its Updates
72.
▲
by
StephanTLavavej
10y ago
As of MSVC 2015 Update 3, the support for C++11 is nearly complete. The missing pieces are that Expression SFINAE is partially supported (what's there is good enough for the STL and Boost, with certain workarounds that you must be aw
73.
▲
by
StephanTLavavej
10y ago
Sugar contains carbon. Perhaps you're thinking of gluten.
74.
▲
by
StephanTLavavej
10y ago
As an STL maintainer, I can say that using "STL" to refer to "the C++ Standard Library" is a perfectly valid use of metonymy.
75.
▲
by
StephanTLavavej
10y ago
The first comment, from fourbadcats, is apparently from a customer of MS (I don't know who they are), referring to their customers in turn. The second from spongo2 is VC's dev manager, my double boss. (I know very little about thi
76.
▲
by
StephanTLavavej
10y ago
Fun fact: the compiler's version (19) is larger than the IDE's version (14) because the compiler predated the addition of "Visual" to the branding. (And the IDE skipped 13, while the compiler didn't.)
77.
▲
by
StephanTLavavej
11y ago
Star Trek memorably listed LT CDR NFN/NMI DATA, see the screenshot at http://memory-alpha.wikia.com/wiki/Data (third from the top, on the right).
78.
▲
by
StephanTLavavej
11y ago
Actually, my proposal to remove auto_ptr etc. from C++17 was accepted: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n419...
79.
▲
by
StephanTLavavej
11y ago
R. Daneel Olivaw was Chetter Hummin (and Eto Demerzel).
80.
▲
by
StephanTLavavej
11y ago
In C++11, std::sort() is forbidden from being just a quicksort, as it's required to have worst-case O(N log N) complexity.
81.
▲
by
StephanTLavavej
11y ago
Minor correction: qsort() is CRT, std::sort() is STL.
82.
▲
by
StephanTLavavej
11y ago
I updated MSVC's STL to handle these things, and it wasn't nearly as obnoxious as I feared. Almost all of the complexity was centralized.
83.
▲
by
StephanTLavavej
11y ago
Orphan Black is great, but it isn't produced by Amazon.
84.
▲
by
StephanTLavavej
11y ago
That's incorrect - the Ranges TS was just started, and certainly hasn't been published yet (not even as a PDTS). Filesystem was the first published TS.
85.
▲
by
StephanTLavavej
11y ago
> Atomics in signal handlers - N2547 - its listed as missing here (at msdn), but listed as done here at vc blog That was me being cautious, see http://blogs.msdn.com/b/vcblog/archive/2015/04/29&#
86.
▲
by
StephanTLavavej
11y ago
I don't believe that any "destructive move" proposals have advanced out of Evolution and into Core. The issue is whether moved-from objects should be in a weird twilight state ("valid but unspecified"), which is the
87.
▲
by
StephanTLavavej
11y ago
C1XX uses new features fairly aggressively. For example, it uses lambdas, auto, range-for, etc.
88.
▲
by
StephanTLavavej
11y ago
Yes, both MSVC's front-end C1XX and back-end C2 (aka UTC) are written in C++. Even our CRT is mostly C++ now.
89.
▲
by
StephanTLavavej
11y ago
You'll want to read these changelogs for the CRT and the STL: http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-featur... , http://blogs.msdn.com/b/vcblog/arc
90.
▲
by
StephanTLavavej
11y ago
I believe we're hoping that Clang/C2 will satisfy those who want to build C99 TUs on Windows. Personally, I have absolutely no interest in C99 (I wasted a year and a half of my life learning C before C++).
More ›