bareflank / bsl Goto Github PK
View Code? Open in Web Editor NEWRust 2018 and C++20, "constexpr everything", AUTOSAR compliant header-only library intended to support the development of critical systems applications
License: Other
Rust 2018 and C++20, "constexpr everything", AUTOSAR compliant header-only library intended to support the development of critical systems applications
License: Other
First of all, thanks for a good library.
I had tested this library for use on armv7m architecture but sadly the Rust friendly design breaks it since uintmx is 64 bit (unsigned long long) on 32 bit architecture. uintptr_t and size_t is always a safe bet across architectures. I'm now considering what to do, but i found a few things to share, if there are any interest in GCC support.
template<typename T, T N>
using make_integer_sequence =
#if __has_builtin(__make_integer_seq)
__make_integer_seq<integer_sequence, T, N>;
#else
integer_sequence<T, __integer_pack(N)...>;
#endif
set(CLANG_WARNINGS
-Wall
-Wextra # reasonable and standard
-Wshadow # warn the user if a variable declaration shadows one from a parent context
-Wnon-virtual-dtor # warn the user if a class with virtual functions has a non-virtual destructor. This helps
# catch hard to track down memory errors
-Wold-style-cast # warn for c-style casts
-Wcast-align # warn for potential performance problem casts
-Wunused # warn on anything being unused
-Woverloaded-virtual # warn if you overload (not override) a virtual function
-Wpedantic # warn if non-standard C++ is used
-Wconversion # warn on type conversions that may lose data
-Wsign-conversion # warn on sign conversions
-Wnull-dereference # warn if a null dereference is detected
-Wdouble-promotion # warn if float is implicit promoted to double
-Wformat=2 # warn on security issues around functions that format output (ie printf)
-Wimplicit-fallthrough # warn on statements that fallthrough without an explicit annotation
)
set(GCC_WARNINGS
${CLANG_WARNINGS}
-Wmisleading-indentation # warn if indentation implies blocks where blocks do not exist
-Wduplicated-cond # warn if if / else chain has duplicated conditions
-Wduplicated-branches # warn if if / else branches have duplicated code
-Wlogical-op # warn about logical operations being used where bitwise were probably wanted
#-Wuseless-cast # warn if you perform a cast to the same type (a lot of casting to same type exists in bsl)
)
Hi,
My mac has llvm/clang 12 (and I know your README says that only clang 11 is supported).
I have made some small changes to the CMake file to support "Darwin" (Apple macOS), but I have not managed to compile.
What would be needed to make the BSL build on this platform?
Regards.
The example code in README.md aims to test the +=
operator of safe_umx
, but because it adds 42 to 0, it would also pass if the operator was (incorrectly) implemented as an assignment instead of an addition (as zero is the identity element of addition).
The fix would be to initialize data2
to a non-zero value.
Lines 139 to 144 in 6509cff
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.