utfcpp icon indicating copy to clipboard operation
utfcpp copied to clipboard

Suppress sign-conversion warning on append

Open Finkman opened this issue 2 years ago • 0 comments

Since #92 is not really fixed, we should suppress the compiler warning. I was hardly figuring out a solution without suppression, but to have the append as generic as it is right now, it is kind of unpredictable which type the overload resolution will pick for *(result++)*. It could be an operator=(T)as well a reference to a typeT`. Nevertheless, if we let the compiler choose and be aware that target of the assignment can handle the byte-value there is no change to be error prone. Anyway, it should be made explicit to let the compiler choose what ever it might find suitable which may imply an implicit sign-conversion. That's the reason I'd appreciate to accept the PR or to fix it in any other way so the compilers a de-stressed.

Finkman avatar Nov 22 '22 10:11 Finkman