"inline" linkage necessary

Open
#65 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start in optional.hpp at the two in_place_init and in_place_init_if definitions shown in the issue. Review how their linkage is declared and check the header's use in a C++ module context. Done means both definitions have inline linkage and the header can be used in a module without linkage problems; no test file is mentioned.

Written by the indexing model from the issue text.

Description

The following lines in optional.hpp should have "inline" linkage. This is necessary for using <boost/optional/optional.hpp> in a module.

    const in_place_init_t in_place_init((in_place_init_t::init_tag()));

   const in_place_init_if_t
       in_place_init_if((in_place_init_if_t::init_tag()));

Dominant language
C++
Stars
60
Forks
75
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 boostorg/optional

All issues in boostorg/optional

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.