C++ Utilities: CppUtilities::ValueConversion Namespace Reference

C++ Utilities 5.34.1 Useful C++ classes and routines such as argument parser, IO and conversion utilities

Loading...
Searching...
No Matches
Functions
CppUtilities::ValueConversion Namespace Reference

Contains functions to convert raw argument values to certain types. More...

## Functions
template<typename TargetType, Traits::EnableIf< std::is_same< TargetType, std::string > > * = nullptr>
TargetType | convert (const char *value)
template<typename TargetType, Traits::EnableIf< std::is_arithmetic< TargetType > > * = nullptr>
TargetType | convert (const char *value)

## Detailed Description

Contains functions to convert raw argument values to certain types.

Extend this namespace by additional convert() functions to allow use of Argument::valuesAs() with your custom types.

Remarks
  Still experimental. Might be removed/adjusted in next minor release.

## Function Documentation

## ◆ convert() [1/2]

template<typename TargetType, Traits::EnableIf< std::is_arithmetic< TargetType > > * = nullptr>

TargetType CppUtilities::ValueConversion::convert | ( | const char * | value | ) |

Definition at line 152 of file argumentparser.h.

## ◆ convert() [2/2]

template<typename TargetType, Traits::EnableIf< std::is_same< TargetType, std::string > > * = nullptr>

TargetType CppUtilities::ValueConversion::convert | ( | const char * | value | ) |

Definition at line 147 of file argumentparser.h.