hemmingway / mili

Automatically exported from code.google.com/p/mili
Boost Software License 1.0
0 stars 0 forks source link

template parameter 'Enum' is ambiguous #53

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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 esteban....@gmail.com on 7 Jan 2012 at 10:09

GoogleCodeExporter commented 8 years ago
what about just renaming the parameter tu e.g. _Enum?
This needs to be coordinated with issue40.

Original comment by daniel.g...@fudepan.org.ar on 9 Jan 2012 at 3:18