fix set of ETL_NO_STL flag (#628)
Co-authored-by: Sergey Skorokhod <s.skorokhod@1440.space>
Removed duplicate include
unique_ptr updates - Work in progress
Updated versions & memory.h
Fix duplicate function
Fixed incorrect 'valid' flag in assignment operator for arithmetic specialisation
Updated version and release notes
Fix bug #636 in optional emplace for pod types (#638)
Updated version info
Updated generator test script
Only build tests if top level project (#639)
Removed trailing spaces
Updated version info
Incorrect C++03 enable_if syntax
Updated version info
Don't use `push_macro` and `pull_macro` with Tasking compiler (#643)
* Autodetect Tasking compiler
#642
* Don't use `push_macro` and `pop_macro` for Tasking compiler
#642
Co-authored-by: Todd Snider <tsnider@jlg.com>
#643 Don't use push_macro and pull_macro with Tasking compiler
Updated etl::delgate to handle const functors correctly
Updated version info
Fixed functor delegate enable_if
Updated release notes
Avoid 'missing return statement at end of non-void function' in `etl::visit<>()`. (#645)
* Avoid 'missing return statement at end of non-void function' in `etl::visit<>()`.
For some definitions of `ETL_ASSERT()` there may be no return statement in case of an invalid type.
This results in undefined behavior.
Warning[Pe940]: missing return statement at end of non-void function "etl::visit<TReturn,TVisitor,TVariant>(TVisitor &, TVariant const &) include\etl\private\variant_legacy.h 976
* Use more self-explaining code.
Substitute ET_ASSERT() and return by dedicated macro.
This moves the responsibility of how to handle errors to the dedicated place.
improve is_constructible, is_copy_constructible, is_move_constructible for type traits with default definitions (#648)
Removed unused ETL_USE_MEM_BUILTINS option
Updated version info
Updated release notes
Added etl::result<TValue, void> specialisation
Reverted code for etl::result<void, TError> specialisation
Added etl::result<TValue, void> specialisation
Reverted code for etl::result<void, TError> specialisation
Fixed perfect forwarding for make_xxx helper functions
Don't warn on tag missing when subproject (#653) (#655)
Different solution than proposed in the issue, since that proposed
solution would given unexpected results when an intermediate
(untagged) commit is checked out.
This change simply skips warning about a missing git version when this
is a subproject, and uses the original version calculation logic.
I've also renamed `determine_version` to `determine_version_with_file`.
I'd originally done this in an intermediate version of this PR, but I
think that keeping the renaming is clearer code.
Removed superfluous semicolons
Updated version and release notes
Removed testing for 18.04
Added testing for 22.04
Updated Github Actions for Clang
Updated version and release notes
clang updates for Github Actions
Added missing notes
emplace member functions return reference to emplaced value (#659)
emplace_front, emplace_back updates
Updated version and release info
Improved emplace testing
Changed unit test macro CHECK_FALSE_EQUAL to CHECK_NOT_EQUAL
Improved emplace testing
Changed unit test macro CHECK_FALSE_EQUAL to CHECK_NOT_EQUAL
Improved emplace testing
Work-In-Progress
Work-In-Progress
Added indexed emplace
More typedefs for etl::result
Work in progress
Work in progress
Work in progress
Changed default constructor
Added function comments
* Avoid 'missing return statement at end of non-void function' in `etl::visit<>()`.
For some definitions of `ETL_ASSERT()` there may be no return statement in case of an invalid type.
This results in undefined behavior.
Warning[Pe940]: missing return statement at end of non-void function "etl::visit<TReturn,TVisitor,TVariant>(TVisitor &, TVariant const &) include\etl\private\variant_legacy.h 976
* Use more self-explaining code.
Substitute ET_ASSERT() and return by dedicated macro.
This moves the responsibility of how to handle errors to the dedicated place.
* Add back_inserter implementation
- Mainly a copy of the STL implementation found in LLVM.
- Add test_back_insert_iterator unit test.
* Add documentation and use ETL_OR_STD macro
* Add MIT License in header
* Move back_insert_iterator into iterator.h
* Remove unused code
* Strictly follow the C++ STL naming
https://en.cppreference.com/w/cpp/iterator/back_insert_iterator
Strictly following the C++ STL would have container_ be container.
* Make the check for C++11 clearer
* Run the unit test only for C++11
* Add front_insert_iterator
- Make back_insert_iterator available to C++03
- Add ETL_CONSTEXPR17,ETL_NODISCARD and ETL_USING_CPP11
- Replace std:move usage by etl::move
- Update doc
* Use explicit namespace for adressof() and move().
* Special case check for hashing 0 floating point numbers
* Update test_hash.cpp
Co-authored-by: Jesse <jli@planarmotor.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Move __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS before `#include <stdint.h>`. (#601)
Macros must be defined before first include of stdint.h. Else they have no effect.
* Replace ETL_COMPILER_ICCAVR by ETL_COMPILER_IAR. (#602)
The current definition mechanism for ETL_COMPILER_ICCAVR does not work. Both IAR compilers, for ARM and AVR define `__IAR_SYSTEMS_ICC__`. Thus `ETL_COMPILER_TYPE_DETECTED` will be defined in line before ETL_COMPILER_ICCAVR is defined. This switch will never be entered.
Currently I see no reason for differentiating both compilers (`__ICCARM__` and `__ICCAVR__`). The condition for the IAR compiler platform (`__IAR_SYSTEMS_ICC__`) is sufficient (combined with <C++11 detection).
At the moment ETL_COMPILER_ICCAVR is used as a switch condition for using `#pragma push_macro`. But actually IAR ARM and IAR AVR have no such macro defined. ETL_COMPILER_IAR is defined for both compilers. Thus the switch condition is replaced with ETL_COMPILER_IAR.
* Fix 'maybe-uninitialized' g++ error on macos (#600)
* Add documentation to the pair class
* Add test directory to the EXAMPLE_PATH
* Update .gitignore
- Remove duplicate entries
- Add doxygen output directories
* Add Select1st and Select2nd functors
* Merge select1st and select2nd into utility.h
Co-authored-by: David Hebbeker <dhebbeker@users.noreply.github.com>
The current definition mechanism for ETL_COMPILER_ICCAVR does not work. Both IAR compilers, for ARM and AVR define `__IAR_SYSTEMS_ICC__`. Thus `ETL_COMPILER_TYPE_DETECTED` will be defined in line before ETL_COMPILER_ICCAVR is defined. This switch will never be entered.
Currently I see no reason for differentiating both compilers (`__ICCARM__` and `__ICCAVR__`). The condition for the IAR compiler platform (`__IAR_SYSTEMS_ICC__`) is sufficient (combined with <C++11 detection).
At the moment ETL_COMPILER_ICCAVR is used as a switch condition for using `#pragma push_macro`. But actually IAR ARM and IAR AVR have no such macro defined. ETL_COMPILER_IAR is defined for both compilers. Thus the switch condition is replaced with ETL_COMPILER_IAR.
* Add back_inserter implementation
- Mainly a copy of the STL implementation found in LLVM.
- Add test_back_insert_iterator unit test.
* Add documentation and use ETL_OR_STD macro
* Add MIT License in header
* Move back_insert_iterator into iterator.h
* Remove unused code
* Strictly follow the C++ STL naming
https://en.cppreference.com/w/cpp/iterator/back_insert_iterator
Strictly following the C++ STL would have container_ be container.
* Make the check for C++11 clearer
* Run the unit test only for C++11
* Add front_insert_iterator
- Make back_insert_iterator available to C++03
- Add ETL_CONSTEXPR17,ETL_NODISCARD and ETL_USING_CPP11
- Replace std:move usage by etl::move
- Update doc
* Use explicit namespace for adressof() and move().
* Special case check for hashing 0 floating point numbers
* Update test_hash.cpp
Co-authored-by: Jesse <jli@planarmotor.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* Move __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS before `#include <stdint.h>`. (#601)
Macros must be defined before first include of stdint.h. Else they have no effect.
* Replace ETL_COMPILER_ICCAVR by ETL_COMPILER_IAR. (#602)
The current definition mechanism for ETL_COMPILER_ICCAVR does not work. Both IAR compilers, for ARM and AVR define `__IAR_SYSTEMS_ICC__`. Thus `ETL_COMPILER_TYPE_DETECTED` will be defined in line before ETL_COMPILER_ICCAVR is defined. This switch will never be entered.
Currently I see no reason for differentiating both compilers (`__ICCARM__` and `__ICCAVR__`). The condition for the IAR compiler platform (`__IAR_SYSTEMS_ICC__`) is sufficient (combined with <C++11 detection).
At the moment ETL_COMPILER_ICCAVR is used as a switch condition for using `#pragma push_macro`. But actually IAR ARM and IAR AVR have no such macro defined. ETL_COMPILER_IAR is defined for both compilers. Thus the switch condition is replaced with ETL_COMPILER_IAR.
* Fix 'maybe-uninitialized' g++ error on macos (#600)
* Add documentation to the pair class
* Add test directory to the EXAMPLE_PATH
* Update .gitignore
- Remove duplicate entries
- Add doxygen output directories
* Add Select1st and Select2nd functors
* Merge select1st and select2nd into utility.h
Co-authored-by: David Hebbeker <dhebbeker@users.noreply.github.com>
The current definition mechanism for ETL_COMPILER_ICCAVR does not work. Both IAR compilers, for ARM and AVR define `__IAR_SYSTEMS_ICC__`. Thus `ETL_COMPILER_TYPE_DETECTED` will be defined in line before ETL_COMPILER_ICCAVR is defined. This switch will never be entered.
Currently I see no reason for differentiating both compilers (`__ICCARM__` and `__ICCAVR__`). The condition for the IAR compiler platform (`__IAR_SYSTEMS_ICC__`) is sufficient (combined with <C++11 detection).
At the moment ETL_COMPILER_ICCAVR is used as a switch condition for using `#pragma push_macro`. But actually IAR ARM and IAR AVR have no such macro defined. ETL_COMPILER_IAR is defined for both compilers. Thus the switch condition is replaced with ETL_COMPILER_IAR.
ICCAVR: IAR C/C++ Compiler V6.70.1.929 for Atmel AVR
There seems to be an issue with the ICCAVR compiler and `__has_include(<...>)` syntax:
```
Error[Pe008]: missing closing quote etl\include\etl\placement_new.h 48
Tool Internal Error:
Internal Error: [Front end]: assertion failed at: "..\..\Translator\compiler_core\src\parser\edg\literals.c", line 1159
Internal Error: [Front end]: assertion failed at: "..\..\Translator\compiler_core\src\parser\edg\literals.c", line 1159 etl\include\etl\placement_new.h 48
Error while running C/C++ Compiler
```
Which is weird, as I wonder why `__has_include` is defined in first place. The compiler is supposed to support some dialect of C++98.
Anyhow, `__has_include()` seems to work in general with ICCAVR. And with this change the code compiles well.
* #227 Hash function for enums
* Move enum hash definition to bottom, so gcc doesn't complain about it
* Explicitly specify etl hash
Co-authored-by: Jesse <jli@planarmotor.com>
IAR was tripping up on the syntax, generating warnings. This addresses that per the discussion in #586.
Co-authored-by: Jeremy Erdmann <jeremy.erdmann@millerwelds.com>
* bip-buffer-spsc-atomic: read reserve default size is all available data
* bip-buffer-spsc-atomic: add API to write reserve in buffer space optimal way
C++11 doesn't support compound statements in constexpr functions
and as a result, `etl/span.h` generates a heap of warnings with
gcc's `-Wpedantic` in C++11 mode. This changes the relevant method
bodies to contain just a single return statement.