Skip to content

Getting rid of conversion from ‘long unsigned int’ to ‘unsigned int' may change value-messages#25

Merged
martinmoene merged 2 commits intononstd-lite:masterfrom
medithe:patch-2
Aug 20, 2018
Merged

Getting rid of conversion from ‘long unsigned int’ to ‘unsigned int' may change value-messages#25
martinmoene merged 2 commits intononstd-lite:masterfrom
medithe:patch-2

Conversation

@medithe
Copy link
Copy Markdown
Contributor

@medithe medithe commented Aug 20, 2018

When compiling with -Wconversion in gcc 8, I'm getting the following warning:

error: conversion from ‘long unsigned int’ to ‘unsigned int’ may change value [-Werror=conversion]

This warning can be removed relatively simply by the following commit.

Noote, this is a follow up from #24, with a better solution.

@martinmoene
Copy link
Copy Markdown
Collaborator

Thanks @medithe,

I think for broadest support it should be size_t not std::size_t, see e.g. here. Note that this is different from in_place_index_tag which can assume size_t in namespace std.

Perhaps I should have written this more explicitly.

@medithe
Copy link
Copy Markdown
Contributor Author

medithe commented Aug 20, 2018

Ok, I agree, I have changed the pull request to use size_t without any namespace.
Thanks for your fast response.

@martinmoene martinmoene merged commit e5d86cb into nonstd-lite:master Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants