range-v3
strong_type
Our great sponsors
range-v3 | strong_type | |
---|---|---|
19 | 5 | |
4,005 | 370 | |
- | - | |
4.4 | 7.0 | |
about 1 month ago | about 1 month ago | |
C++ | C++ | |
GNU General Public License v3.0 or later | Boost Software License 1.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.
range-v3
-
Why are strings and IO so complicated?
std::ranges is in c++20, but you can pull in the library it was based on if you use 17 (https://github.com/ericniebler/range-v3)
-
Java Streams in c++
What you are describing seems to be std::ranges. If you’re interested in understanding how to implement it, I recommend checking out the original reference implementation, rangev3. Trying to implement your own ranges framework is really good practice for learning how to do efficient, advanced generic programming in C++. I highly recommend it as a hobby learning project. But it’s also really, really hard to do correctly, so please just use the stdlib and/or rangev3 in any real project.
-
What are some of the ways to make a super nasty nested loop become clean?
In C++23, there will be std::views::cartesian_product. It is already available in the range-v3 library, the one that the standard is based on.
- 295 pages on Initialization in Modern C++ :)
-
Function composition in modern C++
/** * @brief Forwards value equivalent to the std::forward. * * Using cast instead of std::forward to avoid template instantiation. Used by * Eric Niebler in range library. * * @see https://github.com/ericniebler/range-v3 */
- PocketPy: A Lightweight(~5000 LOC) Python Implementation in C++17
-
Is there an <algorithm> way to filter + transform multiple containers at once
It uses a custom zip_iterator (which isn't very good, and you should really use the one from boost or from range-v3).
-
what annoys you most while using c++?
It contains very little functionality compared to the Eric Niebler’s reference implementation for my liking. Especially views. This will undoubtedly change in the future. But the point is moot, because they are not really supported the is no other option for now other than https://github.com/ericniebler/range-v3.
-
C++20 Ranges Algorithms – 7 Non-Modifying Operations
range-v3 is a great library allowing you to bridge the gap: https://github.com/ericniebler/range-v3
-
CXXIter: A chainable c++20 LINQ-like iterator library
[range-v3](https://github.com/ericniebler/range-v3) which std::ranges was based on has the `to>()` which as far as I know is expected to get into c++23 :)
strong_type
-
How do you not shoot yourself in the foot ?
My general philosophy has long been to let the compiler do as much of the mundane work as possible. To that end, I do as much as I can to help it. Copious use of RAII and in general using specific types, including 'strong' types, so that I can describe logical relationships in a way that the compiler can understand and act on. Having a clear understanding of resource ownership is also important. Also using sanitizers, and liberal use of assert(), but only in debug builds, otherwise there's a tendency to avoid using it due to the extra overhead.
- An additive strong typedef library for C++14/17/20
- WG21, aka C++ Standard Committee, February 2022 Mailing
- Retiring boost from my codebase
-
Very stupid question: Declaring a nominal int type.
The solution I was looking for is strong typing. Here's an amazing lib for that
What are some alternatives?
Boost.Asio - Asio C++ Library
abseil-cpp - Abseil Common Libraries (C++)
cppitertools - Implementation of python itertools and builtin iteration functions for C++17
cpp-base64 - base64 encoding and decoding with c++
CppCoreGuidelines - The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++
libcds - A C++ library of Concurrent Data Structures
RE2 - RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library.
filesystem - An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.
cpplinq - LINQ for C++ (cpplinq) is an extensible C++11 library of higher-order functions for range manipulation. cpplinq draws inspiration from LINQ for C#.
quantity
HCSR04 - Arduino library for HC-SR04, HC-SRF05, DYP-ME007, BLJ-ME007Y, JSN-SR04T ultrasonic ranging sensor
cereal - A C++11 library for serialization