TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Stdcore, a toy container library

54 点作者 nbingham超过 7 年前

4 条评论

beojan超过 7 年前
Range-v3 (<a href="https:&#x2F;&#x2F;github.com&#x2F;ericniebler&#x2F;range-v3" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ericniebler&#x2F;range-v3</a>) exists solving the same problem, and there&#x27;s a standardization proposal (<a href="http:&#x2F;&#x2F;en.cppreference.com&#x2F;w&#x2F;cpp&#x2F;experimental&#x2F;ranges" rel="nofollow">http:&#x2F;&#x2F;en.cppreference.com&#x2F;w&#x2F;cpp&#x2F;experimental&#x2F;ranges</a>).
评论 #15576559 未加载
fiddlerwoaroof超过 7 年前
What’s the difference between an abstract class and a Java-style interface in a language that allows multiple inheritance? I’ve generally thought of interfaces as a way to get some of the features of multiple inheritance while preventing the parts of multiple inheritance that cause issues (e.g. the diamond problem). However, these days, every language I know of that has single inheritance+interfaces allows interfaces (or traits, in the case of PHP) to specify default implementations of their methods.
评论 #15576525 未加载
ndh2超过 7 年前
@OP: I&#x27;m curious about your motivation to post here. Are you looking for feedback? Getting people to try it out? Use it? I found it interesting to read (you had me at &quot;trainwreck&quot;), but you also posted a lot of warning signs: Toy, not production ready, proof of concept. Without going into detail why that is. Are <i>you</i> using it? Have you found any drawbacks? Why is it a toy library instead of a library?
mattnewport超过 7 年前
Why would you not just use lexicographical_compare() to implement your operator&lt;() for containers?