Skip to content

cvdef.h: Don't use C's limits.h under C++#16459

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
nh2:patch-1
Jan 30, 2020
Merged

cvdef.h: Don't use C's limits.h under C++#16459
opencv-pushbot merged 1 commit intoopencv:3.4from
nh2:patch-1

Conversation

@nh2
Copy link
Copy Markdown
Contributor

@nh2 nh2 commented Jan 29, 2020

This pullrequest changes

<limits.h> -> <limits> in C++ mode, just like with the other headers in the rest of the file.

See e.g. StackOverflow for the reasons, the most important one being that limits.h does not respect namespaces, which can make problems for downstream consumers of cvdef.h.

buildworker:Custom=linux-1
build_image:Custom=centos:7

@alalek
Copy link
Copy Markdown
Member

alalek commented Jan 29, 2020

Thank you for contribution!

This patch should go into 3.4 branch first. We will merge changes from 3.4 into master regularly (weekly/bi-weekly).

So, please:

  • change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
  • rebase your commits from master onto 3.4 branch. For example:
    git rebase -i --onto upstream/3.4 upstream/master
    (check list of your commits, save and quit (Esc + "wq" + Enter)
    where upstream is configured by following this GitHub guide and fetched (git fetch upstream).
  • push rebased commits into source branch of your fork (with --force option)

Note: no needs to re-open PR, apply changes "inplace".

@asmorkalov asmorkalov added the pr: needs rebase Rebase patch (and squash fixup commits) on the top of target branch label Jan 29, 2020
@nh2 nh2 changed the base branch from master to 3.4 January 29, 2020 15:39
@nh2
Copy link
Copy Markdown
Contributor Author

nh2 commented Jan 29, 2020

Will do, thanks!

Just like with the other headers in the rest of the file.

See e.g. https://stackoverflow.com/questions/36831465/what-difference-does-it-make-when-i-include-limits-or-limits-h-in-my-c-cod
for the reasons, the most important one being that limits.h does not respect
namespaces, which can make problems for downstream consumers of cvdef.h.
@nh2
Copy link
Copy Markdown
Contributor Author

nh2 commented Jan 29, 2020

Rebase done.

opencv-pushbot pushed a commit that referenced this pull request Jan 30, 2020
@opencv-pushbot opencv-pushbot merged commit 70cbc3d into opencv:3.4 Jan 30, 2020
@alalek alalek mentioned this pull request Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants