Commit Graph

53 Commits (b5f864d96dd0f02a4e884b79a70d2a81e397663e)

Author SHA1 Message Date
Marc Emmers a8ea7758c3 Fix make_span text in comment block 2021-01-18 15:49:29 +01:00
Marc Emmers 8551e93bf2 Fix last extra space issues 2021-01-18 14:36:17 +01:00
Marc Emmers a826c89b10 Backport dynamic extent when including <span>
Keep make_span functions even when <span> is available for compatibility
2021-01-18 14:35:47 +01:00
Marc Emmers d5459ea380 Fix missing defintion 2021-01-18 14:34:26 +01:00
Marc Emmers 8f94feb0ed Add to list of backports 2021-01-18 14:33:20 +01:00
Marc Emmers 78f2cfc0d9 Add some comment blocks 2021-01-16 21:04:16 +01:00
Marc Emmers f7e19b5232 Add deduction guides 2021-01-16 21:04:05 +01:00
Marc Emmers 2e1b360e67 Remove nonstandard as_bytes 2021-01-16 21:03:29 +01:00
Marc Emmers 69331b0cc0 Fix minor style issues 2021-01-16 21:02:47 +01:00
Marc Emmers 96954d3319 Replace classes with structs where applicable 2021-01-16 20:02:24 +01:00
Marc Emmers e0299bd7a3 Use original <span> if present and the right version 2021-01-16 20:02:24 +01:00
Marc Emmers 1dac20cded Missed a pointer operator 2021-01-16 20:02:24 +01:00
Marc Emmers 6389bcb2ee Fix pointer and reference operator style 2021-01-16 20:02:24 +01:00
Marc Emmers 405baeb559 Fix newline at end of file 2021-01-16 20:02:24 +01:00
Marc Emmers e18ce022b8 Update default initializers 2021-01-16 20:02:24 +01:00
Marc Emmers 07da1a7005 Remove explicit constructors 2021-01-16 20:02:24 +01:00
Marc Emmers 5231bec423 Fix remaining namespaces and add include files 2021-01-16 20:02:24 +01:00
Marc Emmers a5b66cf824 Remove c++17 inline of constexpr 2021-01-16 20:02:24 +01:00
Marc Emmers 1931f4e0d0 Fix namespaces and span prototype 2021-01-16 20:02:24 +01:00
Marc Emmers c89c45877c Prevent warning on subspan<0,N> 2021-01-16 20:02:24 +01:00
Marc Emmers 4097b9d956 Add container constructor and make_span 2021-01-16 20:02:24 +01:00
Marc Emmers e93ebc4cd2 Correct span constructors 2021-01-16 20:02:24 +01:00
Marc Emmers 11573a9264 Add iter_reference_t to iterator header 2021-01-16 20:02:24 +01:00
Marc Emmers c38df18dcc Fix endif comment 2021-01-16 20:02:24 +01:00
Marc Emmers 2f0bfd605e Adds basic span implementation 2021-01-16 20:02:24 +01:00
Martin Kojtal 57bbb4739b
Merge pull request #13085 from pea-pod/remove-deprecated-mbed-assert
Change MBED_STATIC_ASSERTs version for built-in
2020-11-24 13:38:07 +00:00
Hugues Kamba 794e32df74 CMake: Use relative paths to list source files and directories
The absolute path is still required for listing linker
files as they are referenced from a function in the top
level CMake input source file.
2020-11-09 12:32:30 +00:00
Rajkumar Kanagaraj e7c0d93ad4 CMake: add mbed-os and mbed-baremetal targets
mbed-os consists of mbed-core and mbed-rtos
mbed-baremetal consists of mbed-core

The main change is for mbed-core. Changing from object library to be interface. This way it allows us to do the above to have 2 main targets for users to use.

This should be backward compatible change as mbed-os target we used contains the same files/options as previously set.
2020-11-06 17:25:22 +00:00
Hugues Kamba bf84a5b329 CMake: Rename CMake targets
* mbed-os renamed mbed-core
* mbed-os-<COMPONENT> renamed mbed-<COMPONENT>
2020-11-06 17:25:22 +00:00
Hugues Kamba 929adbe936 CMake: Add support for platform dir 2020-11-06 17:25:15 +00:00
pea-pod 507181d262 Change MBED_STATIC_ASSERTs version for built-in 2020-10-27 08:30:40 -05:00
Kevin Bracey b17355f588 mstd_mutex: Add missing Chrono bits 2020-04-27 10:19:08 +03:00
Rajkumar Kanagaraj eb40dbcc20 Remove ARMC5 reference from Mbed OS platform 2020-03-19 10:48:14 -07:00
Kevin Bracey 9577b0853b Add mstd_new for mstd::launder
Increasingly clever compilers can hit funny aliasing problems with
object stores like mbed::Callback. Add access to the C++17 launder
facility.
2020-01-09 14:52:50 +02:00
Kevin Bracey 07d43b72d2 Add mstd::is_constant_evaluated
GCC 9 and sufficiently-new Clang (including ARM Compiler 6.13) give us
access to the C++20 (draft) `is_constant_evaluated` test. Allows us to
restrict code to compile-time only.

This is particularly useful when using assembler intrinsics, which the
compiler cannot optimise or compile-time evaluate. It allows us to write
something like

    constexpr uint32_t reverse_bits(uint32_t x)
    {
        if (is_constant_evaluated(x)) {
            // C code to do calculation here
            return x;
        } else {
            // an assembler intrinsic that cannot be optimised
            return __RBIT(x);
        }
    }

This can then be totally compile-time given a constant input.

(In this example, ultimately it would be a good idea to include this
functionality in CMSIS's GCC `__RBIT`, which needs it because GCC
requires use of assembler. Clang implements `__RBIT` as a built-in,
meaning it can already compute it at compile-time, so does not benefit.).
2020-01-08 13:36:17 +02:00
Przemyslaw Stekiel d75cc97d80 Explicit pinmap - fix style 2019-11-28 08:32:02 +01:00
Przemyslaw Stekiel a7b298f353 mstd_cstddef: add C support and macros for C++11 2019-11-28 08:32:00 +01:00
Hugues Kamba 051991fafb mbed_retarget: Add a minimal console implementation to provide basic functionalities
The retarget code allocates an array of FileHandle* for console and file
handling (filehandles). A tiny target only needs a console (putc/getc).
There is no need for file handling.

The POSIX layer and the array of FileHandle* is not required for small
targets that only need a console ; this code is optionally compiled
out if the configuration parameter platform.stdio-minimal-console-only is
set to `"true"`.
2019-11-11 15:14:00 +00:00
Kevin Bracey 4b4859cbd0 mstd_iterator: correct comments 2019-08-27 14:37:07 +03:00
Kevin Bracey 3664912acc mstd_utility: add missing integer_sequence helpers 2019-08-27 14:37:07 +03:00
Kevin Bracey d45e3b5e57 Add <mstd_tuple> and ARMC5 <tuple>
tuples will be useful for things like `mbed::Event` and
`mbed::Callback` - storing parameter packs from variadic templates.

Create a C++14(ish) `<tuple>` for ARMC5, and a `<mstd_tuple>` that
adds `apply` and `make_from_tuple` from C++17.
2019-08-27 14:37:07 +03:00
Kevin Bracey ff0ce04d11 mstd::not_fn - fix declaration 2019-08-12 16:19:46 +03:00
Kevin Bracey cb5c09ff92 ARMC5 std::reference_wrapper - drop dead code 2019-08-12 16:19:46 +03:00
Kevin Bracey 71a5f857e1 Fix cxxsupport/README.md typo 2019-08-12 16:19:46 +03:00
Kevin Bracey 940ed6c2b1 ARMC5 <array>: Add tuple interface 2019-07-19 17:24:14 +03:00
Kevin Bracey 0449e6f1a3 ARMC5 <array>: add comparison operators 2019-07-19 17:18:10 +03:00
Kevin Bracey 9f258c4798 ARMC5 <array>: remove not-working constexpr 2019-07-19 17:17:37 +03:00
Kevin Bracey fbf89272cc ARMC5 <array>: permit zero size 2019-07-19 17:17:07 +03:00
Kevin Bracey 85cd3cd9cc Add C++17 uninitialized storage ops 2019-07-18 20:02:07 +03:00
Kevin Bracey f27c7ecb64 Add ARMC5 unique_ptr
Standard library implementation should be fine for other toolchains.
2019-07-18 20:02:07 +03:00