* 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>