Created
March 8, 2016 04:28
-
-
Save EricWF/ad68935634b24e0e79a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template <class First, class Second, class ...Args> | |
| int maxSize(); | |
| template <class First> | |
| int maxSize(); | |
| template <class First, class Second, class ...Args> | |
| int maxSize() | |
| { | |
| return maxSize<Second, Args...>() > sizeof(First) ? maxSize<Second, Args...>() : sizeof(First); | |
| } | |
| template <class First> | |
| int maxSize() { | |
| return sizeof(First); | |
| } | |
| int main() { | |
| maxSize<int, int>(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment