Support C++17

Open Beginner friendly
#19 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
cpp
Domain
compilers

Research direction

Open src/MeshEditor.cc and locate the two uses of std::bind2nd described in the issue. Replace them with the shown C++17-compatible lambda form, then build the project with C++17 enabled. Done means both instances are updated and the project builds successfully without std::bind2nd.

Written by the indexing model from the issue text.

Description

C++17 removes std::bind2nd from the std library. It's easy to replace the two instances of it in src/MeshEditor.cc.

Original code:
replace_if(mNodeMask.begin(), mNodeMask.end(), bind2nd(equal_to<unsigned>(), 2), 1);

New code:
replace_if(mNodeMask.begin(), mNodeMask.end(), [] (unsigned val) { return val == 2; }, 1);

Dominant language
C++
Stars
10
Forks
4
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from llnl/polytope

All issues in llnl/polytope

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.