Warning: "Possible misuse of comma operator"

Open
#12 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start with include/boost/array.hpp at line 185 and inspect the surrounding expression and its uses. Check how the comma expression interacts with boost::throw_exception and why Xcode 10.3 reports it; done means the warning is addressed without changing the expression's intended behavior.

Written by the indexing model from the issue text.

Description

I'm seeing a warning being emitted by this library when I'm using Xcode 10.3:

https://github.com/boostorg/array/blob/92f66a9f14ca1eef03b6028b01a1cab05e989991/include/boost/array.hpp#L185

Possible misuse of comma operator here

image

Initially I thought of making a PR to address it, but I don't really understand the expression at that line. Why is boost::throw_exception followed by , true ?

Dominant language
C++
Stars
24
Forks
55
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/array

All issues in boostorg/array

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.