Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented BOOST_PFR_ENABLED macro #86

Merged
merged 10 commits into from
Dec 18, 2022

Conversation

denzor200
Copy link
Contributor

@denzor200 denzor200 commented Jun 20, 2021

New macro tested on the Godbolt in so many variants:
case 1 (before) : https://godbolt.org/z/hjhKf3h5n
case 1 (after) : https://godbolt.org/z/vfeKfcMh7
case 2 (before) : https://godbolt.org/z/bvfocY1v1
case 2 (after) : https://godbolt.org/z/bnYboGYa5
case 3 (before) : https://godbolt.org/z/es7cEoo75
case 3 (after) : https://godbolt.org/z/sMdr1vGPW

@denzor200 denzor200 marked this pull request as draft June 20, 2021 12:33
@coveralls
Copy link

Pull Request Test Coverage Report for Build 954428715

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 931559387: 0.0%
Covered Lines: 332
Relevant Lines: 332

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 20, 2021

Pull Request Test Coverage Report for Build 3725964878

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 3725610787: 0.0%
Covered Lines: 337
Relevant Lines: 337

💛 - Coveralls

@denzor200
Copy link
Contributor Author

denzor200 commented Jun 20, 2021

I think this is a bad idea.. But we will not close it yet

@denzor200
Copy link
Contributor Author

I think this is a bad idea.. But we will not close it yet

This idea may become good if we provide the way to override compiler's decision manually. Like this:

#define BOOST_NO_PFR 1    //< force set to 'disallowed'
#include <boost/pfr.hpp>  //< compile time error, PFR not supported by user's decision
#define BOOST_NO_PFR 0    //< force set to 'allowed'
#include <boost/pfr.hpp>  //< good when your compiler really supports pfr
// #define BOOST_NO_PFR 0  //< let compiler set PFR's status
#include <boost/pfr.hpp>   //< good when your compiler support pfr

I'll continue working on it.

@denzor200 denzor200 marked this pull request as ready for review December 16, 2022 20:37
…o_pfr_macro

 Conflicts:
	doc/pfr.qbk
	include/boost/pfr/detail/config.hpp
	test/print_config.cpp
doc/pfr.qbk Outdated Show resolved Hide resolved
doc/pfr.qbk Outdated Show resolved Hide resolved
include/boost/pfr/detail/config.hpp Show resolved Hide resolved
include/boost/pfr/detail/config.hpp Outdated Show resolved Hide resolved
test/print_config.cpp Show resolved Hide resolved
@denzor200 denzor200 changed the title Implemented BOOST_NO_PFR macro Implemented BOOST_PFR_ENABLED macro Dec 18, 2022
@apolukhin apolukhin merged commit dac40b2 into boostorg:develop Dec 18, 2022
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.

None yet

3 participants