gcc/libstdc++-v3/include/ext
Jonathan Wakely d21776ef90 libstdc++: Simplify __numeric_traits definition
This changes the __numeric_traits primary template to assume its
argument is an integer type. For the three floating point types that are
supported by __numeric_traits_floating an explicit specialization of
__numeric_traits chooses the right base class.

This improves the failure mode for using __numeric_traits with an
unsupported type. Previously it would use __numeric_traits_floating as
the base class, and give somewhat obscure errors for trying to access
the static data members. Now it will use __numeric_traits_integer which
has a static_assert to check for supported types.

As a side effect of this change there is no need to instantiate
__conditional_type to decide which base class to use.

libstdc++-v3/ChangeLog:

	* include/ext/numeric_traits.h (__numeric_traits): Change
	primary template to always derive from __numeric_traits_integer.
	(__numeric_traits<float>, __numeric_traits<double>)
	(__numeric_traits<long double>): Add explicit specializations.
2020-11-12 14:36:39 +00:00
..
pb_ds
algorithm
aligned_buffer.h
alloc_traits.h
atomicity.h libstdc++: Use __libc_single_threaded to optimise atomics [PR 96817] 2020-09-26 20:32:36 +01:00
bitmap_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
cast.h
cmath
codecvt_specializations.h
concurrence.h
debug_allocator.h libstdc++: Fix some warnings in headers 2020-10-29 11:43:55 +00:00
enc_filebuf.h
extptr_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
functional
iterator
malloc_allocator.h libstdc++: Make allocators throw bad_array_new_length on overflow [LWG 3190] 2020-10-05 15:18:56 +01:00
memory
mt_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
new_allocator.h libstdc++: Make allocators throw bad_array_new_length on overflow [LWG 3190] 2020-10-05 15:18:56 +01:00
numeric
numeric_traits.h libstdc++: Simplify __numeric_traits definition 2020-11-12 14:36:39 +00:00
pod_char_traits.h
pointer.h libstdc++: Add comparison operators to sequence containers 2020-04-17 23:41:04 +01:00
pool_allocator.h libstdc++: Add comparison operators to types from Utilities clause 2020-04-15 19:47:48 +01:00
random
random.tcc
rb_tree
rc_string_base.h
rope libstdc++: Do not use volatile for __gnu_cxx::rope reference counting 2020-10-29 14:47:17 +00:00
ropeimpl.h
slist
sso_string_base.h
stdio_filebuf.h libstdc++: Override BUFSIZ for Windows targets [PR 94268] 2020-10-28 13:19:21 +00:00
stdio_sync_filebuf.h
string_conversions.h
throw_allocator.h libstdc++: Fix some warnings in headers 2020-10-29 11:43:55 +00:00
type_traits.h
typelist.h
vstring_fwd.h
vstring_util.h
vstring.h
vstring.tcc