| 3472 | } |
| 3473 | |
| 3474 | int TypeDecl::tupleFieldIndex( const string & name ) const { |
| 3475 | int index = 0; |
| 3476 | if ( sscanf(name.c_str(),"_%d",&index)==1 ) { |
| 3477 | return index; |
| 3478 | } else { |
| 3479 | auto vT = isPointer() ? firstType : this; |
| 3480 | if (!vT) return -1; |
| 3481 | if ( name=="_first" ) { |
| 3482 | return 0; |
| 3483 | } else if ( name=="_last" ) { |
| 3484 | return int(vT->argTypes.size())-1; |
| 3485 | } else { |
| 3486 | return vT->findArgumentIndex(name); |
| 3487 | } |
| 3488 | return -1; |
| 3489 | } |
| 3490 | } |
| 3491 | |
| 3492 | int TypeDecl::variantFieldIndex ( const string & name ) const { |
| 3493 | auto vT = isPointer() ? firstType : this; |
no test coverage detected