universalCall from class fcf::SpecificatorInfo
Property: universalCall
Type:
Class:
Package: fcfBasis
File: bits/PartSpecificator/SpecificatorInfo.hpp
Available from version: 1.0.1
Universal call function wrapper that performs the action of the specificator.
Provides a standardized interface for invoking the operator through the framework's universal calling mechanism.
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::UniversalCall universalCall = si.universalCall ;
int left = 1;
int right = 2;
fcf::Variant rightWrapper(right, fcf::Variant::REFERENCE );
fcf::Variant lessValue = universalCall(&left, &rightWrapper, 1);
std::cout << "1 < 2: " << lessValue << std::endl;
return 0;
}
Output:
1 < 2: true
VPSDime is an industry leading VPS hosting company that provides virtualized server services with high performance, availability and friendly support.