Ansgar Burchardt
authored
With just the two overloaded constructors bigunsignedint(int) bigunsigendint(uintmax_t) trying to call the constructor with any integer type T different from int and uintmax_t results in an ambiguous call: the promotion of T to either int or uintmax_t are ranked the same. (Note that this does not depend on the specific choice of int and uintmax_t.) This patch provides a templated constructor for all signed integer types which is ranked over the constructor taking an uintmax_t, making overload resolution unambiguous for signed integer types. By also "hiding" it for unsigned types using enable_if, the overload resolution for unsigned integer types is also unambiguous; there is only a single viable candidate left: the one taking an uintmax_t.
Name | Last commit | Last update |
---|---|---|
am | ||
bin | ||
cmake | ||
doc | ||
dune | ||
lib | ||
m4 | ||
share | ||
.gitignore | ||
.mailmap | ||
CMakeLists.txt | ||
COPYING | ||
INSTALL | ||
Makefile.am | ||
README | ||
README.SVN | ||
TODO | ||
config.h.cmake | ||
configure.ac | ||
dune-common.pc.in | ||
dune.module | ||
stamp-vc |