boost::rational issue with ios_base constructor
- Dominant language
- C++
- Stars
- 24
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
Code fails to compile if boost::rational is used as the parameter to a function that also shares a signature with a void* - for example:
```
#include
void foo(void(*)()) {}
void foo(boost::rational) {}
void fun() {}
int main() {
foo(fun);
}
```
https://wandbox.org/permlink/a06FvkYIP5asIys0
This returns an error in from /opt/wandbox/gcc-head/include/c++/11.0.0/bits/ios_base.h:41,
Apologies since I'm not familiar with the code enough to give a better example/understanding of what's happening. Please let me know what other information I can provide or how I can help get this sorted.
thanks,
John
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the overload example using boost/rational.hpp and the Wandbox link, then inspect the interaction with the ios_base.h error reported from GCC's standard library. Confirm what causes the compilation failure and define done as making the shown program compile without regressing rational behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100