- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
qi::Infinity Struct Reference

`#include <tag.hpp>`

## Detailed Description

Tag type to represent infinity.

Example: Representing a timeout that can be infinite

struct VisitTimeout : boost::static_visitor<int>
{
int operator()(MilliSeconds x) const {
return x.count();
}
int operator()(Infinity) const {
return int(FutureTimeout_Infinite);
}
};
// In some class:
ValueType valueCopy(Either<MilliSeconds, Infinity> timeout = Infinity{}) const
{
// `value()` is aware of `FutureTimeout_Infinite`.
return value(timeout.apply_visitor(VisitTimeout{}));
}

Definition at line 29 of file tag.hpp.

The documentation for this struct was generated from the following file:

- /home/opennao/work/release-2.8/sdk/libqi/qi/tag.hpp