| 670 | } |
| 671 | |
| 672 | void ConstExprTest() |
| 673 | { |
| 674 | ConstExprTestT<char>(); |
| 675 | ConstExprTestT<signed char>(); |
| 676 | ConstExprTestT<unsigned char>(); |
| 677 | ConstExprTestT<signed short>(); |
| 678 | ConstExprTestT<unsigned short>(); |
| 679 | ConstExprTestT<signed int>(); |
| 680 | ConstExprTestT<unsigned int>(); |
| 681 | ConstExprTestT<signed long>(); |
| 682 | ConstExprTestT<unsigned long>(); |
| 683 | ConstExprTestT<signed long long>(); |
| 684 | ConstExprTestT<unsigned long long>(); |
| 685 | |
| 686 | // Catch the SafePtrDiff function, since it is marked. Can't think of a scenario for this being constexpr, though. |
| 687 | const char* p1 = (char*)1; |
| 688 | const char* p2 = nullptr; |
| 689 | |
| 690 | static const SafeInt<ptrdiff_t> pt = SafePtrDiff(p1, p2); |
| 691 | if (pt > 0) |
| 692 | return; |
| 693 | } |
| 694 | |
| 695 | } |
| 696 |
no test coverage detected