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

Remove boost::value_initialized (including AUTO_VAL_INIT) and BOOST_FOREACH #921

Merged
merged 1 commit into from Oct 31, 2019

Conversation

@jagerman
Copy link

jagerman commented Oct 31, 2019

Neither of these have a place in modern C++11; boost::value_initialized
is entirely superseded by Type var{}; which does value initialization
(or default construction if a default constructor is defined). More
problematically, each boost::value_initialized<T> requires
instantiation of another wrapping templated type which is a pointless
price to pay the compiler in C++11 or newer.

Also removed is the AUTO_VAL_INIT macro (which is just a simple macro
around constructing a boost::value_initialized).

BOOST_FOREACH is a similarly massive pile of code to implement
C++11-style for-each loops in pre-C++11 compilers. (And bizarrely it
doesn't appear to fall back to C++ for-each loops even when under
a C++11 compiler!)

This removes both entirely from the codebase.

Neither of these have a place in modern C++11; boost::value_initialized
is entirely superseded by `Type var{};` which does value initialization
(or default construction if a default constructor is defined).  More
problematically, each `boost::value_initialized<T>` requires
instantiation of another wrapping templated type which is a pointless
price to pay the compiler in C++11 or newer.

Also removed is the AUTO_VAL_INIT macro (which is just a simple macro
around constructing a boost::value_initialized<T>).

BOOST_FOREACH is a similarly massive pile of code to implement
C++11-style for-each loops. (And bizarrely it *doesn't* appear to fall
back to C++ for-each loops even when under a C++11 compiler!)

This removes both entirely from the codebase.
@Doy-lee Doy-lee merged commit a9294cd into loki-project:dev Oct 31, 2019
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.