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

size from class fcf::TypeInfo

Property: size

Type: size_t

Class: fcf::TypeInfo

Package: fcfBasis

File: bits/PartType/TypeInfoDefinition.hpp

Available from version: 1.0.1

The size of a data type in bytes.

Example:

#include <iostream> #define FCF_BASIS_IMPLEMENTATION #include <fcfBasis/basis.hpp> int main() { { const fcf::TypeInfo* ti = fcf::Type<int>().typeInfo(); std::cout << "int type size: " << ti->size << std::endl; } return 0; }

CMakeLists.txt file:

add_executable(app main.cpp) target_include_directories(app PRIVATE ../path_to_libraries_folder)

Output:

int type size: 4