eclipse-iceoryx / eclipse-iceoryx/iceoryx
Issue in iox::cxx::optional class
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 492
- Avg merge
- 18h 57m
- Merged PRs (30d)
- 1
Description
## Required information
**Operating system:**
E.g. Ubuntu 18.04 LTS
**Compiler version:**
E.g. GCC 7.4.0
**Observed result or behaviour:**

I am getting the build error while compiling the above line.
As we are no able to pass "const" as template argument.
invalid conversion from 'const void*' to 'void*' [-fpermissive]
269 | new (static_cast(static_cast(m_data))) T(std::forward(args)...);
| ^~~~~~
| |
| const void*
**Expected result or behaviour:**
Same code we are able to compile using std::optional.
**Conditions where it occurred / Performed steps:**

Contributor guide
Research direction
Start with the iox::cxx::optional implementation around line 269, using the code and build error shown in the issue to reproduce the failure. Compare the const template-argument case with std::optional; done means the reported code compiles without the const void* to void* conversion error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100