This code is intended as an example of one way to return both an error code and
return value from a C++ function. This is done via a templated struct type
AnnotatedReturn<T,V> {T errorCode;V returnValue;}
. This could also be done
via a class, which may be cleaner depending on your point of view (since the
constructor can populate both values).
-
Notifications
You must be signed in to change notification settings - Fork 0
rb12345/cpp_annotated_return
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Example of returning an error code and return value from C++ functions via templating
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published