John Wellbelove c26e42253f Squashed commit of the following:
commit dceb56dd1a19be6fe9b991bb50e08902eefe36a8
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 19:27:18 2020 +0000

    Fixed non-initialisation of in_use flag.

commit c7ee1d6574ca5d95869152c5f8e4e6d02a7fa6bc
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 19:20:24 2020 +0000

    Fixed non-initialisation of in_use flag.

commit 36cbf21cd1b67a28255582cfb4a188a601631ab2
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 18:52:53 2020 +0000

    Refactor buffer_descriptors test

commit 49c60add63153bf53f400a891d8c4fb880cacda8
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 18:44:42 2020 +0000

    Refactor buffer_descriptors test

commit 7bda7678311bf2eb497483f3ef27c3af9211680b
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 18:29:02 2020 +0000

    Refactor buffer_descriptors test

commit 7a68c932a7df05f66690fa63e67365cf4b0619e8
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 18:14:30 2020 +0000

    Refactor buffer_descriptors test

commit a9b25ac67d175f58751a2eb819f0e5822e8f0cf9
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 18:08:21 2020 +0000

    Refactor buffer_descriptors test

commit 0c721c0466733751708fcbd995ce0bc1d7c0a932
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 17:58:22 2020 +0000

    Refactor buffer_descriptors test

commit 4b2dd2fce22cd0a4846b95695fbfd812e0823540
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 17:47:43 2020 +0000

    Refactor buffer_descriptors test

commit 80d5776c409b416377269d543bd539bdad83dc86
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 17:32:27 2020 +0000

    Refactor buffer_descriptors test

commit 3564ac5b7ef89c41b240d9f54fce36042408daa0
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 17:17:50 2020 +0000

    Refactor buffer_descriptors test

commit 297ef42c60e4228bfbcb2adcddeb6b8a617c4113
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 17:08:45 2020 +0000

    Refactor buffer_descriptors test

commit 658d592c96eb7eaf1afb5d09fef38e293ea6f79b
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 16:58:52 2020 +0000

    Refactor buffer_descriptors test

commit e97d8f90d5527349324ea84fd578c1d879d7a5a4
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 16:48:52 2020 +0000

    Refactor buffer_descriptors test

commit ed783a8ccccc8673c0f55eb1780c08668880a745
Author: John Wellbelove <github@wellbelove.co.uk>
Date:   Tue Nov 24 16:43:52 2020 +0000

    clang.yml hack for testing
2020-11-24 19:32:48 +00:00
.circleci Resolve 0U ambiguity in string utility tests 2020-08-02 15:14:52 +01:00
.github clang hack for testing 2020-11-24 16:45:53 +00:00
examples Minor tidying 2020-05-12 15:25:35 +01:00
images Added etl::ibitset::span() member functions to return a span of the underlying binary data. 2020-07-27 10:52:07 +01:00
include/etl Squashed commit of the following: 2020-11-24 19:31:03 +00:00
support Refactor of etl::buffer_descriptors interface 2020-11-23 12:33:04 +00:00
temp Added indirect_vector 2019-11-13 14:12:33 +00:00
test Squashed commit of the following: 2020-11-24 19:32:48 +00:00
uml UML framework diagrams 2017-08-03 09:53:33 +01:00
.gitattributes namespace elt to etl 2014-10-26 16:39:14 +00:00
.gitignore Squashed commit of the following: 2020-11-24 19:32:48 +00:00
.gitlab-ci.yml Trigger CI pipelines on gitlab 2018-11-04 10:10:50 +00:00
.gitmodules Merge remote-tracking branch 'origin/feature/CMake' into development 2018-05-31 22:21:09 +01:00
appveyor.yml Conditionally disable template deduction guide tests 2020-09-29 11:55:21 +01:00
CMakeLists.txt CMakeLists test 2020-09-30 09:53:29 +01:00
conanfile.py Disabled ASAN option in Visual Studio project. 2020-11-17 13:03:11 +00:00
Doxyfile Updated doxygen file (#131) 2019-06-14 22:41:45 +01:00
file.txt Added etl::buffer_descriptors. 2020-11-12 19:13:10 +00:00
library.json Refactor of etl::buffer_descriptors interface 2020-11-23 12:33:04 +00:00
library.properties Refactor of etl::buffer_descriptors interface 2020-11-23 12:33:04 +00:00
LICENSE Merge remote-tracking branch 'origin/master' into development 2018-07-12 21:32:54 +01:00
meson.build Meson build improvement: Don't build tests by default if used as a subproject (#218) 2020-05-09 13:04:07 +01:00
README.md Update README.md 2020-10-02 18:17:44 +01:00
todo.txt Merge remote-tracking branch 'origin/feature/etl__make_string' into development 2019-12-04 20:55:18 +00:00

Embedded Template Library (ETL)

GitHub release (latest by date) License CI CI CI Codacy Badge

Motivation

C++ is a great language to use for embedded applications and templates are a powerful aspect. The standard library can offer a great deal of well tested functionality, but there are some parts of the standard library that do not fit well with deterministic behaviour and limited resource requirements. These limitations usually preclude the use of dynamically allocated memory and containers with open ended sizes.

What is needed is a template library where the user can declare the size, or maximum size of any object upfront. Most embedded compilers do not currently support the standard beyond C++ 03, therefore excluding the programmer from using the enhanced features of the later library.

This is what the ETL attempts to achieve.

Summary

The ETL is not designed to completely replace the STL, but complement it. Its design objective covers three areas.

  • Create a set of containers where the size or maximum size is determined at compile time. These containers are direct equivalents of those supplied in the STL.
  • Be compatible with C++ 03 but implement as many of the C++ 11 additions as possible.
  • Add other useful components that are not present in the standard library.

The embedded template library has been designed for lower resource embedded applications. It contains a set of containers, algorithms and utilities, some of which emulate parts of the STL. There is no dynamic memory allocation. The library makes no use of the heap. All of the containers have a fixed capacity allowing all memory allocation to be determined at compile time. The library is intended for any compiler that supports C++ 03.

Main features:

  • Cross platform. This library is not specific to any processor type.
  • No dynamic memory allocation
  • No RTTI required
  • Very little use of virtual functions. They are used only when they are absolutely necessary for the required functionality
  • A set of fixed capacity containers. (array, bitset, deque, forward_list, list, queue, stack, vector, map, set, etc.)
  • As the storage for all of the container types is allocated as a contiguous block, they are extremely cache friendly
  • Templated compile time constants
  • Templated design pattern base classes (Visitor, Observer)
  • Reverse engineered C++ 0x11 features (type traits, algorithms, containers etc.)
  • Type-safe enumerations
  • Type-safe typedefs
  • 8, 16, 32 & 64 bit CRC calculations
  • Checksums & hash functions
  • Variants (a type that can store many types in a type-safe interface)
  • Choice of asserts, exceptions, error handler or no checks on errors
  • Many utilities for template support.
  • Easy to read and documented source.
  • Free email support

Any help porting the library to work under different platforms and compilers would be gratefully received. I am especially interested in people who are using Keil, IAR, Green Hills, TI Code Composer etc, bare metal or RTOS, and DSPs.

See (https://www.etlcpp.com) for up-to-date information.