nonstd-lite
abseil-cpp
| nonstd-lite | abseil-cpp | |
|---|---|---|
| 1 | 71 | |
| 91 | 17,306 | |
| - | 0.5% | |
| 6.2 | 9.5 | |
| 8 months ago | 5 days ago | |
| Batchfile | C++ | |
| gtkbook License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
nonstd-lite
-
Backward compatible implementations of newer standards constructs?
Check out nonstd-lite
abseil-cpp
- Abseil Common Libraries (C++)
-
The Fastest Linux Timestamps
Related reading is absl’s linear approximation of gettime from cycle counters, which I thought is a neat trick: https://github.com/abseil/abseil-cpp/blob/351086314d46e73d43...
-
C++26: A User-Friednly assert() macro
assert() is meant to be compiled away if NDEBUG is defined, otherwise it shouldn't be called assert(). Given that assert() may be compiled away, it makes sense not to give it anything that has side effects.
Abseil has the convention where instead of assert(), users call "CHECK" for checks that are guaranteed to happen at run time, or "DCHECK" for checks that will be compiled away when NDEBUG is defined.
https://github.com/abseil/abseil-cpp/blob/0093ac6cac892086a6...
https://github.com/abseil/abseil-cpp/blob/0093ac6cac892086a6...
-
High-performance header-only container library for C++23 on x86-64
https://github.com/abseil/abseil-cpp/blob/master/absl/contai... mentions that b-tree maps hold multiple values per node, which makes them more cache-friendly than the red-black trees used in std::map.
You use either container when you want a sorted associative map type, which I have not found many uses cases for in my work. I might have a handful of them versus many instances of vectors and unsorted associative maps, i.e. absl::flat_hash_map.
- Monads in C# (Part 2): Result
-
The unreasonable effectiveness of modern sort algorithms
A looong time ago I wrote my first blog post - on a now defunct website - about a VecMap where I did exactly that. Sort when needed and full flat array. That said flat_map as coined by Google is an acronym for swiss tables. See [1]. I.e. exactly what Rust's standard library `HashMap` is, also the one being tested here.
[1] https://github.com/abseil/abseil-cpp/blob/23b9b75217721040f5...
-
C++: zero-cost static initialization
Looks similar to absl::NoDestructor
https://github.com/abseil/abseil-cpp/blob/master/absl/base/n...
Which is basically the only usage of std::launder I have seen
-
Show HN: CXXStateTree – A modern C++ library for hierarchical state machines
You'll see a fairly even split amongst S-tier, "possibly headed for standardization" level libraries. I'd say there's a skew for `#ifndef` in projects that are more "aspires to the standard library" and for `#pragma once` in projects that are more focused on like a very specific vertical.
`#pragma once` seems to be far preferred for internal code, there's an argument for being strictly conforming if you're putting out a library. I've converted stuff to `#ifndef` before sharing it, but I think heavy C++ people usually type `#pragma once` in the privacy of their own little repository.
- `spdlog`: `#pragma once` https://github.com/gabime/spdlog/blob/v1.x/include/spdlog/as...
- `absl`: `#ifndef` https://github.com/abseil/abseil-cpp/blob/master/absl/base/a...
- `zpp_bits`: `#ifndef` https://github.com/eyalz800/zpp_bits/blob/main/zpp_bits.h
- `stringzilla` `#ifndef` https://github.com/ashvardanian/StringZilla/blob/main/includ...
- Writing your own C++ standard library part 2
-
Matt Godbolt sold me on Rust (by showing me C++)
abseil's "StatusOr" is roughly like Rust's Result type, and is what is used inside Google's C++ codebases (where exceptions are mostly forbidden)
https://github.com/abseil/abseil-cpp/blob/master/absl/status...
What are some alternatives?
variant - C++17 `std::variant` for C++11/14/17
Folly - An open-source C++ library developed and used at Facebook.
optional - C++11/14/17 std::optional with functional-style extensions and reference support
Boost - Super-project for modularized Boost
GSL - Guidelines Support Library
BDE - Basic Development Environment - a set of foundational C++ libraries used at Bloomberg.