Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add pair functors #610

Conversation

evantill
Copy link
Contributor

Add select1st and select2nd functors for closing issue #607.

dhebbeker and others added 8 commits September 14, 2022 11:12
…<stdint.h>`. (ETLCPP#601)

Macros must be defined before first include of stdint.h. Else they have no effect.
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.
- Remove duplicate entries
- Add doxygen output directories
@evantill
Copy link
Contributor Author

evantill commented Sep 20, 2022

  • commit 6ccbb5b add documentation to pair to be able to reference members first and second from functors documentation
  • I used doxygen to check the generated documentation. Commit 7b2bd8f updates .gitignore to ignore doxygen created directories and I have removed duplicates entries in .gitignore at the same time.
  • Commit fe5dd8c add the testdirectory to the EXAMPLE_PATH of Doxyfileconfiguration to be able to add example code in the documentation. Adding the code sample to the unit tests make sure that the code compile fine and is upto date.
  • Commit 52d7fd0 and 6d5a800 are the impplementation

@jwellbelove jwellbelove changed the base branch from development to feature/#610-add-pair-functors October 1, 2022 10:39
@jwellbelove jwellbelove merged commit 8b52ad6 into ETLCPP:feature/#610-add-pair-functors Oct 1, 2022
@evantill evantill deleted the feature/add_pair_functors branch October 6, 2022 10:36
jwellbelove pushed a commit that referenced this pull request Oct 20, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants