Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <utility>
- struct Vertex{};
- typedef std::pair<int,int> Facet;
- struct Simplex {
- operator Vertex() { return Vertex();}
- operator Facet() { return std::make_pair(1,1);}
- };
- int main()
- {
- Vertex v;
- Facet f;
- Simplex s;
- v = s;
- f = s; // pair& operator=(const volatile pair&) = delete;
- return 0;
- }
- /*
- [ 50%] Building CXX object CMakeFiles/simplex.dir/simplex.cpp.obj
- simplex.cpp
- C:\cgal\git\Skin_surface_3\examples\Skin_surface_3\simplex.cpp(20): error C2679: binary '=': no operator found which takes a right-hand operand of type 'Simplex' (or there is no acceptable conversion)
- c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\utility(276): note: could be 'std::pair<int,int> &std::pair<int,int>::operator =(volatile const std::pair<int,int> &)'
- C:\cgal\git\Skin_surface_3\examples\Skin_surface_3\simplex.cpp(20): note: while trying to match the argument list '(Facet, Simplex)'
- */
Add Comment
Please, Sign In to add comment