| 539 | namespace { |
| 540 | template <class TFrom, class TTo> |
| 541 | struct TImplicitlyCastable { |
| 542 | struct RTYes { |
| 543 | char t[2]; |
| 544 | }; |
| 545 | |
| 546 | using RTNo = char; |
| 547 | |
| 548 | static RTYes Func(TTo); |
| 549 | static RTNo Func(...); |
| 550 | static TFrom Get(); |
| 551 | |
| 552 | /* |
| 553 | * Result == (TFrom could be converted to TTo implicitly) |
| 554 | */ |
| 555 | enum { |
| 556 | Result = (sizeof(Func(Get())) != sizeof(RTNo)) |
| 557 | }; |
| 558 | }; |
| 559 | |
| 560 | struct TImplicitlyCastableToBool { |
| 561 | inline operator bool() const { |