ConvertToListAscendString
Function Usage
Defines a template function ConvertToListAscendString to convert strings of different types to those of the AscendString type.
Prototype
1 | template<typename T> std::vector<ge::AscendString> ConvertToListAscendString(T strs) |
The following conversions are supported:
- template<> inline std::vector<ge::AscendString> ConvertToListAscendString(std::vector<std::string> strs)
Converts strings of the std::vectorstd::string type to the std::vector<const char *> type and then converts it again.
- template<> inline std::vector<ge::AscendString> ConvertToListAscendString(std::vector<ge::AscendString> strs)
Returns string lists of the std::vector<ge::AscendString> type directly.
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
strs |
Input |
List of strings to be converted. |
Returns
List of AscendString after conversion
Troubleshooting
None
Constraints
None
Parent topic: GE Namespace