FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src: simplify SFINAE of `ToStringHelper::BaseConvert` by F3n67u · Pull Request #44306 · nodejs/node · GitHub

/ node Public

src: simplify SFINAE of ToStringHelper::BaseConvert - #44306

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
F3n67u:simplify_enable_if
Sep 1, 2022
Merged

src: simplify SFINAE of ToStringHelper::BaseConvert#44306
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
F3n67u:simplify_enable_if

Conversation

F3n67u commented Aug 20, 2022
edited
Loading

Copy link
Copy Markdown
Contributor

Simplify SFINAE of ToStringHelper::BaseConvert using technique from https://www.fluentcpp.com/2018/05/18/make-sfinae-pretty-2-hidden-beauty-sfinae/

nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Aug 20, 2022
F3n67u changed the title src: simplify enable_if logic of ToStringHelper::BaseConvert src: simplify SFINAE of ToStringHelper::BaseConvert Aug 20, 2022
F3n67u added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 20, 2022
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 20, 2022

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

RaisinTen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

RaisinTen added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Aug 31, 2022
F3n67u added the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 1, 2022
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 1, 2022
nodejs-github-bot merged commit f36813c into nodejs:main Sep 1, 2022

Copy link
Copy Markdown
Collaborator

Landed in f36813c

F3n67u deleted the simplify_enable_if branch September 1, 2022 06:38
RafaelGSS pushed a commit that referenced this pull request Sep 5, 2022
PR-URL: #44306
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Sep 6, 2022
PR-URL: #44306
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Sep 7, 2022
PR-URL: #44306
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>

Copy link
Copy Markdown
Member

For some reason, this is not compiling in the v16.x branch. It may be related to a cpp version or something.

esult -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++14 -MMD -MF /home/juanarbol/GitHub/node/out/Release/.deps//home/juanarbol/GitHub/node/out/Release/obj.target/libnode/src/module_wrap.o.d.raw   -c
In file included from ../src/js_stream.cc:5:
In file included from ../src/node_errors.h:6:
../src/debug_utils-inl.h:32:46: error: no template named 'is_integral_v' in namespace 'std'; did you mean 'is_integral'?
            typename = std::enable_if_t<std::is_integral_v<T>>>
                                        ~~~~~^~~~~~~~~~~~~
                                             is_integral
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/type_traits:392:12: note: 'is_integral' declared here
    struct is_integral
           ^
In file included from ../src/js_stream.cc:5:
In file included from ../src/node_errors.h:6:
../src/debug_utils-inl.h:32:41: error: template argument for non-type template parameter must be an expression
            typename = std::enable_if_t<std::is_integral_v<T>>>

And the complaints grow and grow.

Copy link
Copy Markdown
Member

is_integral_v is C++17 only, so we would need to replace that with is_integral<T>::value if we want to backport (probably fine if we don't backport this too)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL