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

Support compiling with C++17/C++2a #1747

Merged
merged 1 commit into from
May 7, 2019
Merged

Conversation

emfrias
Copy link
Contributor

@emfrias emfrias commented May 2, 2019

Bitshares used 'using namespace std' in several places, and this
caused conflicts between fc::variant and the new std::variant.
Fixed by just importing the specific identifiers we use from
namespace std.

@abitmore
Copy link
Member

abitmore commented May 2, 2019

@emfrias please send pull request to develop branch.

@abitmore abitmore added this to the 3.2.0 - Feature Release milestone May 2, 2019
@emfrias emfrias changed the base branch from master to develop May 2, 2019 20:55
@abitmore
Copy link
Member

abitmore commented May 2, 2019

Please undo the change on FC submodule.

@pmconrad
Copy link
Contributor

pmconrad commented May 3, 2019

Looks good, except for the fc downgrade.

Bitshares used 'using namespace std' in several places, and this
caused conflicts between fc::variant and the new std::variant.
Fixed by just importing the specific identifiers we use from
namespace std.
Copy link
Contributor

@pmconrad pmconrad left a comment

Choose a reason for hiding this comment

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

Thanks!
@jmjatlanta can you test this on windows?

@jmjatlanta
Copy link
Contributor

jmjatlanta commented May 7, 2019

@jmjatlanta can you test this on windows?

Tested on Windows 10 / Boost 1.69 / Visual Studio 2017 with no problems.

Note unrelated to this ticket: With the current status of fc and bitshares-core, to compile with Visual Studio 2017 you must

cd libraries/fc
git checkout master
cd ../../

And then edit the file libraries/chain/include/graphene/chain/protocol/types.hpp and remove the section between the //TODO comments near the top. Then compile as normal. For me that is:

cmake -G %VS_VERSION% -A x64 -DBOOST_ROOT=%BOOST_DIR% -DCURL_STATICLIB=ON -DCURL_LIBRARY=%CURL_DIR%\lib\libcurl_imp.lib -DCURL_INCLUDE_DIR=%CURL_DIR%\include -DOPENSSL_CONF_SOURCE="C:\Program Files\Common Files\SSL\openssl.cnf"
cmake --build . --target install --config Release

(replace the variables with values specific to your environment)

This should become easier as we approach the 3.2.0 release.

@jmjatlanta jmjatlanta merged commit 40f0419 into bitshares:develop May 7, 2019
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.

4 participants