Skip to content

boost::rational issue with ios_base constructor #44

@john-d-murphy

Description

@john-d-murphy

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 <boost/rational.hpp>

void foo(void(*)()) {}
void foo(boost::rational<int>) {}

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions