mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 987290 - Follow-up: fix TestTypedEnum to avoid requiring behavior that relies on explicit conversions, when they are not available. Fixes the build on MSVC 2012 - no review, bustage fix
This commit is contained in:
parent
89f10a3539
commit
a8a9cf90c0
@ -3,6 +3,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/TypedEnum.h"
|
||||
#include "mozilla/TypedEnumBits.h"
|
||||
|
||||
@ -158,7 +159,8 @@ void
|
||||
TestNonConvertibilityForOneType()
|
||||
{
|
||||
using mozilla::IsConvertible;
|
||||
#ifdef MOZ_HAVE_CXX11_STRONG_ENUMS
|
||||
|
||||
#if defined(MOZ_HAVE_CXX11_STRONG_ENUMS) && defined(MOZ_HAVE_EXPLICIT_CONVERSION)
|
||||
static_assert(!IsConvertible<T, bool>::value, "should not be convertible");
|
||||
static_assert(!IsConvertible<T, int>::value, "should not be convertible");
|
||||
static_assert(!IsConvertible<T, uint64_t>::value, "should not be convertible");
|
||||
|
Loading…
Reference in New Issue
Block a user