Show EOL distros:
Package Summary
Introduces a compile time concept checking mechanism that can be used most commonly to check for required functionality when passing template arguments.
- Author: Daniel Stonier (d.stonier@gmail.com)
- License: BSD
- External website: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
- Source: svn https://embedded-control-library.googlecode.com/svn/trunk/ecl_core
Package Summary
Introduces a compile time concept checking mechanism that can be used most commonly to check for required functionality when passing template arguments.
- Author: Daniel Stonier (d.stonier@gmail.com)
- License: BSD
- External website: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
- Source: svn https://embedded-control-library.googlecode.com/svn/tags/ecl_core/fuerte
Package Summary
Introduces a compile time concept checking mechanism that can be used most commonly to check for required functionality when passing template arguments.
- Maintainer status: developed
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: groovy-devel)
Package Summary
Introduces a compile time concept checking mechanism that can be used most commonly to check for required functionality when passing template arguments.
- Maintainer status: developed
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: hydro-devel)
Package Summary
Introduces a compile time concept checking mechanism that can be used most commonly to check for required functionality when passing template arguments.
- Maintainer status: maintained
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: release/0.61-indigo-kinetic)
Package Summary
Introduces a compile time concept checking mechanism that can be used most commonly to check for required functionality when passing template arguments.
- Maintainer status: developed
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: devel)
Package Summary
Introduces a compile time concept checking mechanism that can be used most commonly to check for required functionality when passing template arguments.
- Maintainer status: developed
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: release/0.61-indigo-kinetic)
Package Summary
Introduces a compile time concept checking mechanism that can be used most commonly to check for required functionality when passing template arguments.
- Maintainer status: maintained
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: release/0.62-melodic)
Package Summary
Introduces a compile time concept checking mechanism that can be used most commonly to check for required functionality when passing template arguments.
- Maintainer status: maintained
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/stonier/ecl_core/issues
- Source: git https://github.com/stonier/ecl_core.git (branch: release/0.62-noetic)
Contents
Overview
For templatised functions and classes, the input template arguments usually have little or no restriction on the class that can be used, e.g.
Of course the compile will fail if you try to use an input type, T, that doesn't have the specialised interface you want, but the compile time error message is often very verbose and its difficult to find the error. An idea which is merging into the c++ mainstream as well as that used by the boost concept checking library is to characterise common behaviours into _Concepts_. A simplified version of this is utilised here.
Compiling & Linking
Include the following at the top of any translation unit:
1 #include <ecl/concepts.hpp>
2
3 // The concept definition/validation classes.
4 using ecl::BluePrintConcept;
5 using ecl::ContainerConcept;
6 using ecl::SignedByteContainerConcept;
7 using ecl::UnsignedByteContainerConcept;
8 using ecl::NullaryFunctionConcept;
9 using ecl::StreamConcept;
10 using ecl::InputCharDeviceConcept;
11 using ecl::OutputCharDeviceConcept;
12 using ecl::InputOutputCharDeviceConcept;
13 using ecl::InputByteDeviceConcept;
14 using ecl::OutputByteDeviceConcept;
15 using ecl::InputOutputByteDeviceConcept;
Usage
Concepts
Existing concepts in the ecl include:
@section conceptsList Existing Concepts
BluePrints - checks for blueprint functionality as defined in ecl_utilities.
Containers - also bytecontainer, simple checks for basic prerequisite container methods.
NullaryFunctions - function objects which require no arguments in execution.
Streams - any class with basic char streaming capabilities.
Devices - device functionalities compatible to those in ecl_devices.