Broken backward compability: libBoost 1.66 -> libBoost 1.67
Open
- Dominant language
- C++
- Stars
- 60
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
Problematic code:
```
#include
struct A
{
A(int a) : a(a) {}
int a;
};
#define TRUE 1
int main()
{
return boost::optional(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, bool>::type = true
)
and returns 1.
This is change of behavior without any warring.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.