Fix a couple of 'C++11'-isms from the last checkin, which broke the '03 bot.

llvm-svn: 298422
This commit is contained in:
Marshall Clow 2017-03-21 19:12:21 +00:00
parent 163e7166d7
commit 0fa287b7ec
3 changed files with 11 additions and 4 deletions

View File

@ -1947,6 +1947,13 @@ template <class _Tp> using make_unsigned_t = typename make_unsigned<_Tp>::type;
#ifdef _LIBCPP_HAS_NO_VARIADICS
template <>
struct _LIBCPP_TEMPLATE_VIS common_type<void, void, void>
{
public:
typedef void type;
};
template <class _Tp, class _Up = void, class _Vp = void>
struct _LIBCPP_TEMPLATE_VIS common_type
{

View File

@ -37,8 +37,8 @@ int main()
{
typedef std::chrono::duration<int, std::ratio<10,10> > D10;
typedef std::chrono::duration<int, std::ratio< 1, 1> > D1;
D10 zero{0};
D10 one{1};
D10 zero(0);
D10 one(1);
static_assert( (std::is_same< decltype(+one), decltype(zero-one) >::value), "");
static_assert( (std::is_same< decltype(zero+one), D1>::value), "");
static_assert( (std::is_same< decltype(+one), D1>::value), "");

View File

@ -37,8 +37,8 @@ int main()
{
typedef std::chrono::duration<int, std::ratio<10,10> > D10;
typedef std::chrono::duration<int, std::ratio< 1, 1> > D1;
D10 zero{0};
D10 one{1};
D10 zero(0);
D10 one(1);
static_assert( (std::is_same< decltype(-one), decltype(zero-one) >::value), "");
static_assert( (std::is_same< decltype(zero-one), D1>::value), "");
static_assert( (std::is_same< decltype(-one), D1>::value), "");