Conditional shallow copy types with a var scalar type to PromotedType.
- Note
- This function is useful whenever you are inside of nested autodiff and want to allow the input arguments from an outer autodiff to be used in an inner autodiff without making a hard copy of the input arguments.
- Template Parameters
-
| PromotedType | type to promote the scalar to. |
| Args | variadic arguments. |
- Parameters
-
| args | variadic arguments to conditionally copy and promote. |
- Returns
- a tuple where each element is either a reference to the original argument or a promoted copy of the argument.
Definition at line 98 of file conditional_copy_and_promote.hpp.