SG14
static-functional
SG14 | static-functional | |
---|---|---|
7 | 1 | |
489 | 48 | |
1.6% | - | |
1.8 | 0.0 | |
about 2 years ago | almost 2 years ago | |
C++ | C++ | |
- | MIT License |
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.
SG14
- Callbacks in embedded | heapless environment
-
How to create callback function for publishing hardware events in C++?
There was a proposal for an `inplace_function` that uses static memory. There was a full implementation made. It's not the best solution for this problem though
-
C++20 compile-time functional operators that work on function pointers
There was a proposal for such functionality but I don't know what happened to it. It seems abandoned. There is full implementation in the same repo.
-
`std::function`overhead and alternatives
The only faster alternative that doesn't lose much flexibility would be to roll your own custom version of std::function that has a medium sized std::aligned_storage_t (or just an std::max_align_t aligned array of std::byte or unsigned char) buffer instead of using a dynamic allocation to hold its functor data. (Or use an implementation of the proposed inplace_function such as https://github.com/WG21-SG14/SG14/blob/master/SG14/inplace_function.h )
-
Can anyone point me to a good resource for SG11/14?
There's a repository for SG14 on GitHub here: https://github.com/WG21-SG14/SG14
-
Use UB optimisation with std::function if you know it's bound, and with std::any if you know what type is held
The SG14 inplace_function takes a similar approach to what you suggest. The only minor downside there is that the way it's implemented makes the type unsafe to use across dll boundaries, due to possible mismatching addresses of the default binding. I guess that's not really a consideration for the C++ standard though, and anyway since std::function can allocate then it's inherently unsafe in that scenario anyway.
-
Fixed math header only library with MIT licence
He was trying to standardize his implementation, but I (sadly) don't know what's happened to it since then: https://github.com/WG21-SG14/SG14/blob/master/Docs/Proposals/Fixed_Point_Library_Proposal.md
static-functional
What are some alternatives?
compile-time-init-build - C++ library for composing modular firmware at compile-time.
mlib - mlib is a fast, simple c++ meta-programming library that uses c++20.
fixed_math - FixedMath: A High-Performance C++17 Library for Fixed-Point 48.16 Arithmetic
function_type_traits - A c++ metaprogramming library for extracting function information
function2 - Improved and configurable drop-in replacement to std::function that supports move only types, multiple overloads and more
SpeciaLUT - Runtime choosing of template specializations using compile-time lookup-tables. Compile all states of a template function, but execute the optimal one at runtime.
rfcs - RFCs for changes to Rust
uninttp - A universal type for non-type template parameters for C++20 or later.
Folly - An open-source C++ library developed and used at Facebook.
lambda-tuple - An implementation of `std::tuple` based on variadic lambda capture
binutils-gdb - Unofficial mirror of sourceware binutils-gdb repository. Updated daily.
introspective - Compile-Time Reflection in C++ for use with Scripting Languages