FCF 2.0 development in progress...
> > > > > >
[News] [C++ Libraries API] [C++ Downloads] [Donate to the project] [Contacts]

specificators from class fcf::TypeInfo

Property: specificators

Type: fcf::TypeInfo::SpecificatorsType

Class: fcf::TypeInfo

Package: fcfBasis

File: bits/PartType/TypeInfoDefinition.hpp

Available from version: 1.0.1

Registered specificators (e.g., Less, Equal, Add) for this type

Example:

#include <iostream> #define FCF_BASIS_IMPLEMENTATION #include <fcfBasis/basis.hpp> int main() { const fcf::TypeInfo* ti = fcf::Type<int>().typeInfo(); unsigned int lessSpecificatorTypeId = fcf::Type<fcf::LessSpecificator>().index(); const fcf::SpecificatorInfo& si = ti->specificators.find(lessSpecificatorTypeId)->second; fcf::LessSpecificator::CallType call = (fcf::LessSpecificator::CallType)si.call; int left = 1; int right = 2; bool lessValue = call(&left, &right); std::cout << "1 < 2: " << lessValue << std::endl; return 0; }

Output:

1 < 2: 1