mirror of
https://github.com/boostorg/optional.git
synced 2025-07-30 04:27:19 +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