Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Broken backward compability: libBoost 1.66 -> libBoost 1.67

Open
#74 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start with the minimal Boost.Optional example in the issue and compare constructor overload resolution between libBoost 1.66 and 1.67. Read the optional constructor implementation and existing compatibility tests, if present; done means the example has consistent intended behavior across the affected versions and the regression is covered by a test.

Written by the indexing model from the issue text.

Description

Problematic code:

#include <boost/optional/optional.hpp>

struct A
{
    A(int a) : a(a) {}

    int a;
};

 #define TRUE 1

int main()
{
    return boost::optional<A>(TRUE , 5)->a;
}

libBoost 1.66 calls here:
optional ( bool cond, rval_reference_type val )
boost::optional(1, A(5));
and returns 5,

libBoost 1.67 and newer calls here:
template
explicit optional ( Expr&& expr,
BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_val_init_candidate<T, Expr>, bool>::type = true
)
and returns 1.

This is change of behavior without any warring.

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.