Created
September 19, 2016 11:33
-
-
Save physacco/9ff4c9916eab43f3f7e87a0992f15e31 to your computer and use it in GitHub Desktop.
Revisions
-
physacco created this gist
Sep 19, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #include <iostream> #include <limits> template <typename T> void test_limits() { T min = std::numeric_limits<T>::min(); T max = std::numeric_limits<T>::max(); std::cout << "min: " << min << std::endl; std::cout << "max: " << max << std::endl; } int main() { test_limits<int>(); test_limits<long>(); test_limits<float>(); test_limits<double>(); return 0; }