I have to implement basically the same function but for different size. Specifically it is something like...
type& operator=(unsigned int);
type& operator=(unsigned long int);
type& operator=(unsigned long long int);
type& operator=(int);
type& operator=(long int);
type& operator=(long long int);
type& operator=(short int);
//so on and so forth...
They have to do exactly the same thing... (except i should take into account the different size), the main idea would be "if the type is the widest use the code for the task... otherwise perform a casting and execute the code". Is it possible to avoid all such repetitive code by using only one method? (i just don't want the compiler throw me some warning when i compile...).
Thank you
intmax_t
anduintmax_t
(from<cstdint>
)? – Sexism