Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set() set_external(), =operator() overloads, etc are ambiguous on Windows (Visual Studio) #4

Closed
cyrush opened this issue Jul 18, 2016 · 3 comments
Labels
Milestone

Comments

@cyrush
Copy link
Member

cyrush commented Jul 18, 2016

From Kathleen B.:
Wow, I have this in my test :
proc0["cycle"] = 120;
worked fine on linux, but Visual studio complains that it is ambiguous:
15> error C2593: 'operator =' is ambiguous
15> Node.h(923): could be 'conduit::Node &conduit::Node::operator =(conduit::float64)'
15> Node.h(922): or 'conduit::Node &conduit::Node::operator =(conduit::float32)'
15> Node.h(920): or 'conduit::Node &conduit::Node::operator =(conduit::uint64)'
15> Node.h(919): or 'conduit::Node &conduit::Node::operator =(conduit::uint32)'
15> Node.h(918): or 'conduit::Node &conduit::Node::operator =(conduit::uint16)'
15> Node.h(917): or 'conduit::Node &conduit::Node::operator =(conduit::uint8)'
15> Node.h(915): or 'conduit::Node &conduit::Node::operator =(conduit::int64)'
15> Node.h(914): or 'conduit::Node &conduit::Node::operator =(conduit::int32)'
15> Node.h(913): or 'conduit::Node &conduit::Node::operator =(conduit::int16)'
15> Node.h(912): or 'conduit::Node &conduit::Node::operator =(conduit::int8)'
15> d): or 'conduit::Node &conduit::Node::operator =(conduit::bool8)'
15> while trying to match the argument list '(conduit::Node, int)'

@cyrush
Copy link
Member Author

cyrush commented Jul 18, 2016

From Kathleen:
We aren't the only ones with this puzzle:
http://stackoverflow.com/questions/21971278/ambiguous-call-of-long-unsigned-int-for-uint32-t
Form Cyrus:
We have a case where to types are actually the same underlying type. Some how we are able to generate both set methods, but when it comes time to use them the compiler can't figure out how to select which one.

@cyrush
Copy link
Member Author

cyrush commented Jul 18, 2016

I am working on resolving this in a sandboxed repo here:
https://github.com/cyrush/msvsover

I have this repo setup to build w/ co on windows (appveyor) and osx + linux (travis)

@cyrush cyrush added the bug label Jul 18, 2016
@cyrush cyrush modified the milestones: 0.2.0, 0.3.0 Jul 24, 2016
@cyrush cyrush modified the milestones: 0.2.0, 0.3.0 Sep 23, 2016
@cyrush
Copy link
Member Author

cyrush commented Sep 30, 2016

resolved in PR #63

@cyrush cyrush closed this as completed Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant