diff options
Diffstat (limited to 'test/support/test.workarounds/c1xx_broken_nullptr_conversion_operator.pass.cpp')
-rw-r--r-- | test/support/test.workarounds/c1xx_broken_nullptr_conversion_operator.pass.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/test/support/test.workarounds/c1xx_broken_nullptr_conversion_operator.pass.cpp b/test/support/test.workarounds/c1xx_broken_nullptr_conversion_operator.pass.cpp deleted file mode 100644 index 250d06d2b902..000000000000 --- a/test/support/test.workarounds/c1xx_broken_nullptr_conversion_operator.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03 - -// Verify TEST_WORKAROUND_C1XX_BROKEN_NULLPTR_CONVERSION_OPERATOR. - -#include <type_traits> - -#include "test_workarounds.h" - -struct ConvertsToNullptr { - using DestType = decltype(nullptr); - operator DestType() const { return nullptr; } -}; - -int main() { -#if defined(TEST_WORKAROUND_C1XX_BROKEN_NULLPTR_CONVERSION_OPERATOR) - static_assert(!std::is_convertible<ConvertsToNullptr, decltype(nullptr)>::value, ""); -#else - static_assert(std::is_convertible<ConvertsToNullptr, decltype(nullptr)>::value, ""); -#endif -} |