aboutsummaryrefslogtreecommitdiffstats
path: root/include/jau/cpp_pragma.hpp
Commit message (Collapse)AuthorAgeFilesLines
* cpp_pragma: Adding PRAGMA_DISABLE_WARNING_INT_OVERFLOW (clang) and ↵Sven Göthel2024-04-101-0/+4
| | | | PRAGMA_DISABLE_WARNING_RESTRICT (gcc)
* darray.hpp: Workaround gcc 12.2.0-3 Debian 12 Bookworm 2022-10-17 false ↵Sven Gothel2022-10-171-0/+3
| | | | positive '-Werror=stringop-overflow=' using ::explicit_bzero(..)
* cpp_pragme.hpp: Add PRAGMA_DISABLE_WARNING_PMF_CONVERSIONS for gcc only, ↵Sven Gothel2022-10-071-0/+8
| | | | disabling warning `-Wpmf-conversions`
* cpp_pragma.hpp: Add PRAGMA_DISABLE_WARNING_FORMAT_NONLITERALSven Gothel2022-08-051-0/+3
|
* Doxygen: Add Modules: Group related things together: Algorithms, ByteUtils, ↵v0.9.2Sven Gothel2022-05-011-0/+7
| | | | CppLang, DataStructs, Concurrency, Floats, Fractions, Integrals, JavaJVM, Network, String
* cpp_pragma.hpp: Add PRAGMA_DISABLE_WARNING_NULL_DEREFERENCE and ↵v0.4.4Sven Gothel2021-09-191-0/+6
| | | | PRAGMA_DISABLE_WARNING_FORMAT_OVERFLOW
* basic_types.hpp: Cleanup; Add constexpr 'enum class endian', ↵Sven Gothel2021-02-081-0/+63
'pointer_cast()' and 'bit_cast()' and have all byte-order conversion and get/set functions be of constexpr; Add generalized template [get|put]_value(..) and to_hex_string(..) Cleanup - Split basic_types.hpp -> basic_types.hpp + byte_util.hpp + int_types.hpp + string_util.hpp - Moved nsize_t, snsize_t to int_types.hpp and using 'uint_fast32_t' and 'int_fast32_t' as natural types. - Renamed cpp_lang_macros.hpp -> cpp_lang_util.hpp +++ Add constexpr 'enum class endian', 'pointer_cast()' and 'bit_cast()' and have all byte-order conversion and get/set functions be of constexpr. - Exposing '__builtin_bit_cast(Dest_type, arg)' via 'constexpr bool is_builtin_bit_cast_available()' and type traits. - Adding constexpr bit_cast<>() template for C++17 (a C++20 std), allowing constexpr type conversion using '__builtin_bit_cast(Dest_type, arg)', if the latter is available. - Adding constexpr pointer_cast<>() template, allowing constexpr pointer type conversion. Either using '__builtin_bit_cast(Dest_type, arg)' or reinterpret_cast<>(). - Add constexpr 'enum class endian' API, providing compile-time C++ endian evaluation w/o predefined macros. Inspired by C++20. - Replace linux bswap_[16,32,64] with either __builtin_bswap[16,32,64] or own const definition, both allowing constexpr - Add unified overloaded 'constexpr bswap(uint[16,32,64,128,192,256]_t const &)' using constexpr endian API. - Have all [get|put]_<type>(..) operations be of constexpr, using pointer_cast<>() instead of plain reinterpret_cast<>() and the new 'constexpr bswap(..)' methods. +++ Add generalized template [get|put]_value(..) and to_hex_string(..) - Add generalized template 'constexpr T [get|put]_value(..) {}' for std::is_standard_layout_v<T> - Add generalized template 'inline to_hex_string(T const &) {}' for std::is_standard_layout_v<T> +++ All of the above is covered by unit test 'test_basictypecon.cpp' '-std=c++17': - gcc 8.3.0 on arm32, arm64: __builtin_bit_cast() not available - gcc 10.2.1 on amd64: __builtin_bit_cast() not available - clang 9.0.1 on amd64, arm64: __builtin_bit_cast() is available - clang 11.0.1 on amd64: __builtin_bit_cast() is available Full build time (user) incl unit tests (C++ and Java) on GCC - amd64 gcc 11.0.1, 32 cores: 1m38s - arm64 gcc 8.3.0, 4 cores: 13m30s - arm32 gcc 8.3.0, 4 cores: 17m58s