Skip to content
Snippets Groups Projects
  • Jonathan Wakely's avatar
    f150a084
    libstdc++: Add std::numeric_limits<__float128> specialization [PR104772] · f150a084
    Jonathan Wakely authored
    As suggested by Jakub in the PR, this just hardcodes the constants with
    a Q suffix, since the properties of __float128 are not going to change.
    
    We can only define it for non-strict modes because the suffix gives an
    error otherwise, even in system headers:
    
    limits:2085: error: unable to find numeric literal operator 'operator""Q'
    
    libstdc++-v3/ChangeLog:
    
    	PR libstdc++/104772
    	* include/std/limits (numeric_limits<__float128>): Define.
    	* testsuite/18_support/numeric_limits/128bit.cc: New test.
    f150a084
    History
    libstdc++: Add std::numeric_limits<__float128> specialization [PR104772]
    Jonathan Wakely authored
    As suggested by Jakub in the PR, this just hardcodes the constants with
    a Q suffix, since the properties of __float128 are not going to change.
    
    We can only define it for non-strict modes because the suffix gives an
    error otherwise, even in system headers:
    
    limits:2085: error: unable to find numeric literal operator 'operator""Q'
    
    libstdc++-v3/ChangeLog:
    
    	PR libstdc++/104772
    	* include/std/limits (numeric_limits<__float128>): Define.
    	* testsuite/18_support/numeric_limits/128bit.cc: New test.