Created
November 20, 2018 11:33
-
-
Save afabri/8a28b1c30cedbc6e9dfc492a419e399a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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)' | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The line
f = s;
does not compile with VC2017 and the preview release. It is the condensed version of the Skin_surface_3 testsuite.