| 35 | |
| 36 | template<class TypeR> |
| 37 | tmp<Field<TypeR>> New |
| 38 | ( |
| 39 | const tmp<Field<TypeR>>& tf1, |
| 40 | const bool initRet = false |
| 41 | ) |
| 42 | { |
| 43 | if (tf1.isTmp()) |
| 44 | { |
| 45 | return tf1; |
| 46 | } |
| 47 | else |
| 48 | { |
| 49 | tmp<Field<TypeR>> rtf(new Field<TypeR>(tf1().size())); |
| 50 | |
| 51 | if (initRet) |
| 52 | { |
| 53 | rtf.ref() = tf1(); |
| 54 | } |
| 55 | |
| 56 | return rtf; |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | |
| 61 | template<class TypeR, class Type1> |
no test coverage detected