Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
baobab
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
baobab
14y ago
With explicit conversion operators you can fix this: "if (-0.5 <= x <= 0.5) return 0;" for x that are not built-in types. You would need to create your own Bool type, something like defined below, and overload <= operators for x
2.
▲
by
baobab
14y ago
I couldn't bear looking at how bloated C++ implementation is, so I implemented it in C++11 based on boost.fiber library: https://gist.github.com/4015306 . Now it looks very similar to Go language code.