mirror of
https://github.com/boostorg/optional.git
synced 2025-07-29 12:07:21 +02:00
Testing MSVC bugs
This commit is contained in:
16
test/optional_test_COMPILER_CONVERSION_BUGS1.cpp
Normal file
16
test/optional_test_COMPILER_CONVERSION_BUGS1.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
struct A
|
||||
{
|
||||
A(int) {}
|
||||
A(A &&) {}
|
||||
};
|
||||
|
||||
struct B
|
||||
{
|
||||
operator A() { return A(1); }
|
||||
operator int() { return 0; }
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
A t = B();
|
||||
}
|
14
test/optional_test_COMPILER_CONVERSION_BUGS2.cpp
Normal file
14
test/optional_test_COMPILER_CONVERSION_BUGS2.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
struct A
|
||||
{
|
||||
A(int) {}
|
||||
};
|
||||
|
||||
struct B
|
||||
{
|
||||
operator int() { return 0; }
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
A t = B();
|
||||
}
|
Reference in New Issue
Block a user