Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

Why Make the Switch?

You might ask, why should we upgrade? Well, boredom played a part, but there’s a multitude of benefits that come with embracing C++17. Let’s dive into the upgrade process!

Step 1: Configuring Visual Studio for C++17

To get started, we need to set Visual Studio to compile using the /std:c++17 flag. To achieve this, select all the projects in the Solution Explorer on the right side and then click on Properties.

Visual Studio Properties

Don’t forget to click Apply to confirm your changes!

Step 2: Tackling std::byte Implementation

Next, we need to address the introduction of std::byte. You might find some instances of:

 
This is the hidden content, please

Remove these occurrences entirely. This practice should be avoided to prevent potential namespace conflicts.

Step 3: Updating Standard Library Functions

Now, it’s time to refine the usage of standard functions throughout your code. For instance, convert:

 
This is the hidden content, please

to:

 
This is the hidden content, please

Make sure to prepend std:: to all standard library functions such as make_pair, string definitions, and containers like maps and vectors. Compile the code after each change and fix any occurrences as needed.

Step 4: Modifying the Stl.h File in EterBase

Open the Stl.h file located within the EterBase directory. You will notice code that looks something like this:

 
This is the hidden content, please

Take out this outdated code. It is unnecessary and incompatible with C++17.

Step 5: Replace std::void_mem_fun

As part of modernizing the code, search for instances of std::void_mem_fun and replace them with std::mem_fn.

In the cipher.cpp file, swap out:

 
std::auto_ptr
    

with:

 
std::unique_ptr
    

Step 6: Handling Boost Library Warnings

Next, you may encounter warnings related to the Boost library. For instance, you might see an error message similar to this:

 
This is the hidden content, please

To resolve this, it's advisable to disable the error message for the projects that encounter it. Alternatively, updating Boost to the latest version could resolve the issues.

Step 7: Compiling and Final Adjustments

Prepare for additional warnings, particularly from Python-related code:

 
This is the hidden content, please

If you’ve followed the previous steps, your code should compile without major issues.

Final Note for Ikarus Users

If you’re running the Ikarus offline shop, ensure you recompile libconfig with the same compiler settings. You might also want to verify if cryptopp needs similar recompilation; unfortunately, I can't recall the exact details.

By following these steps, you'll successfully upgrade your client compilation to make the most of C++17 features.

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...