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

template parameter 'Enum' is ambiguous #53

Open
GoogleCodeExporter opened this issue May 21, 2015 · 1 comment
Open

template parameter 'Enum' is ambiguous #53

GoogleCodeExporter opened this issue May 21, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\sstream(318): 
error C2782: 'mili::bitwise_enum<Enum> mili::operator &(Enum,Enum)' : template 
parameter 'Enum' is ambiguous
1>          h:\projects\mili\mili\bitwise_enums.h(189) : see declaration of 
'mili::operator &'
1>          could be 'mili::bitwise_enum<Enum>'
1>          with
1>          [
1>              Enum=
1>          ]
1>          or       'std::basic_stringbuf<_Elem,_Traits,_Alloc>::_Strstate'
1>          with
1>          [
1>              _Elem=char,
1>              _Traits=std::char_traits<char>,
1>              _Alloc=std::allocator<char>
1>          ]
1>          c:\program files (x86)\microsoft visual studio 
10.0\vc\include\sstream(313) : while compiling class template member function 
'void std::basic_stringbuf<_Elem,_Traits,_Alloc>::_Init(const _Elem 
*,size_t,std::basic_stringbuf<_Elem,_Traits,_Alloc>::_Strstate)'
1>          with
1>          [
1>              _Elem=char,
1>              _Traits=std::char_traits<char>,
1>              _Alloc=std::allocator<char>
1>          ]
1>          c:\program files (x86)\microsoft visual studio 
10.0\vc\include\sstream(723) : see reference to class template instantiation 
'std::basic_stringbuf<_Elem,_Traits,_Alloc>' being compiled
1>          with
1>          [
1>              _Elem=char,
1>              _Traits=std::char_traits<char>,
1>              _Alloc=std::allocator<char>
1>          ]
1>          h:\projects\gmock\gtest\include\gtest\gtest-message.h(94) : see 
reference to class template instantiation 
'std::basic_stringstream<_Elem,_Traits,_Alloc>' being compiled
1>          with
1>          [
1>              _Elem=char,
1>              _Traits=std::char_traits<char>,
1>              _Alloc=std::allocator<char>
1>          ]
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\sstream(318): 
error C2782: 'mili::bitwise_enum<Enum> mili::operator &(Enum,const 
mili::bitwise_enum<Enum> &)' : template parameter 'Enum' is ambiguous
1>          h:\projects\mili\mili\bitwise_enums.h(170) : see declaration of 
'mili::operator &'
1>          could be ''
1>          or       'std::basic_stringbuf<_Elem,_Traits,_Alloc>::_Strstate'
1>          with
1>          [
1>              _Elem=char,
1>              _Traits=std::char_traits<char>,
1>              _Alloc=std::allocator<char>
1>          ]
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\sstream(318): 
error C2677: binary '&' : no global operator found which takes type 
'mili::bitwise_enum<Enum>' (or there is no acceptable conversion)
1>          with
1>          [
1>              Enum=
1>          ]
1>  type-mapper_test.cpp

Original issue reported on code.google.com by [email protected] on 7 Jan 2012 at 10:09

@GoogleCodeExporter
Copy link
Author

what about just renaming the parameter tu e.g. _Enum?
This needs to be coordinated with issue40.

Original comment by [email protected] on 9 Jan 2012 at 3:18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant