strong_type
An additive strong typedef library for C++14/17/20 (by rollbear)
quantity | strong_type | |
---|---|---|
3 | 5 | |
2 | 375 | |
- | - | |
0.0 | 7.0 | |
almost 5 years ago | about 2 months ago | |
C++ | C++ | |
- | Boost Software License 1.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.
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.
quantity
Posts with mentions or reviews of quantity.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-10-30.
-
C++ library for a type multiset
Hmm a bit apples and oranges, my version includes a lot of whitespace, doxygen style comments, used pre-20 -fconcepts, and has (IIRC) addition and multiplication (by a scalar), but no tests.
-
Very stupid question: Declaring a nominal int type.
The heavy way to solve this is something like boost::units. A lighter way is a 'qualitity' type. I made a start here, https://github.com/wovo/quantity but got distracted by more urgent problems.
strong_type
Posts with mentions or reviews of strong_type.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-04-12.
-
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?
When comparing quantity and strong_type you can also consider the following projects:
mp-units - The quantities and units library for C++
range-v3 - Range library for C++14/17/20, basis for C++20's std::ranges
torsor - C++ torsor class template
abseil-cpp - Abseil Common Libraries (C++)
cpp-base64 - base64 encoding and decoding with c++
libcds - A C++ library of Concurrent Data Structures
filesystem - An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.
cereal - A C++11 library for serialization
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.
Boost.Asio - Asio C++ Library
cxx - Safe interop between Rust and C++