[libcxx] r284002 - Remove usages of _LIBCPP_CONSTEXPR under test/std
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 12 03:28:09 PDT 2016
Author: ericwf
Date: Wed Oct 12 05:28:09 2016
New Revision: 284002
URL: http://llvm.org/viewvc/llvm-project?rev=284002&view=rev
Log:
Remove usages of _LIBCPP_CONSTEXPR under test/std
Modified:
libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp
libcxx/trunk/test/std/utilities/time/rep.h
Modified: libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp?rev=284002&r1=284001&r2=284002&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp Wed Oct 12 05:28:09 2016
@@ -17,6 +17,8 @@
#include <random>
#include <cassert>
+#include "test_macros.h"
+
template <class UIntType, UIntType Min, UIntType Max>
class rand1
{
@@ -30,14 +32,14 @@ private:
static_assert(Min < Max, "rand1 invalid parameters");
public:
-#ifdef _LIBCPP_HAS_NO_CONSTEXPR
+#if TEST_STD_VER < 11 && defined(_LIBCPP_VERSION)
// Workaround for lack of constexpr in C++03
static const result_type _Min = Min;
static const result_type _Max = Max;
#endif
- static _LIBCPP_CONSTEXPR result_type min() {return Min;}
- static _LIBCPP_CONSTEXPR result_type max() {return Max;}
+ static TEST_CONSTEXPR result_type min() {return Min;}
+ static TEST_CONSTEXPR result_type max() {return Max;}
explicit rand1(result_type sd = Min) : x_(sd)
{
Modified: libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp?rev=284002&r1=284001&r2=284002&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp Wed Oct 12 05:28:09 2016
@@ -19,6 +19,8 @@
#include <random>
#include <type_traits>
+#include "test_macros.h"
+
template <class UIntType, UIntType Min, UIntType Max>
class rand1
{
@@ -32,14 +34,14 @@ private:
static_assert(Min < Max, "rand1 invalid parameters");
public:
-#ifdef _LIBCPP_HAS_NO_CONSTEXPR
+#if TEST_STD_VER < 11 && defined(_LIBCPP_VERSION)
// Workaround for lack of constexpr in C++03
static const result_type _Min = Min;
static const result_type _Max = Max;
#endif
- static _LIBCPP_CONSTEXPR result_type min() {return Min;}
- static _LIBCPP_CONSTEXPR result_type max() {return Max;}
+ static TEST_CONSTEXPR result_type min() {return Min;}
+ static TEST_CONSTEXPR result_type max() {return Max;}
explicit rand1(result_type sd = Min) : x_(sd)
{
Modified: libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp?rev=284002&r1=284001&r2=284002&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp Wed Oct 12 05:28:09 2016
@@ -17,6 +17,8 @@
#include <random>
#include <cassert>
+#include "test_macros.h"
+
template <class UIntType, UIntType Min, UIntType Max>
class rand1
{
@@ -30,14 +32,14 @@ private:
static_assert(Min < Max, "rand1 invalid parameters");
public:
-#ifdef _LIBCPP_HAS_NO_CONSTEXPR
+#if TEST_STD_VER < 11 && defined(_LIBCPP_VERSION)
// Workaround for lack of constexpr in C++03
static const result_type _Min = Min;
static const result_type _Max = Max;
#endif
- static _LIBCPP_CONSTEXPR result_type min() {return Min;}
- static _LIBCPP_CONSTEXPR result_type max() {return Max;}
+ static TEST_CONSTEXPR result_type min() {return Min;}
+ static TEST_CONSTEXPR result_type max() {return Max;}
explicit rand1(result_type sd = Min) : x_(sd)
{
Modified: libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp?rev=284002&r1=284001&r2=284002&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp Wed Oct 12 05:28:09 2016
@@ -19,6 +19,8 @@
#include <random>
#include <type_traits>
+#include "test_macros.h"
+
template <class UIntType, UIntType Min, UIntType Max>
class rand1
{
@@ -32,14 +34,14 @@ private:
static_assert(Min < Max, "rand1 invalid parameters");
public:
-#ifdef _LIBCPP_HAS_NO_CONSTEXPR
+#if TEST_STD_VER < 11 && defined(_LIBCPP_VERSION)
// Workaround for lack of constexpr in C++03
static const result_type _Min = Min;
static const result_type _Max = Max;
#endif
- static _LIBCPP_CONSTEXPR result_type min() {return Min;}
- static _LIBCPP_CONSTEXPR result_type max() {return Max;}
+ static TEST_CONSTEXPR result_type min() {return Min;}
+ static TEST_CONSTEXPR result_type max() {return Max;}
explicit rand1(result_type sd = Min) : x_(sd)
{
Modified: libcxx/trunk/test/std/utilities/time/rep.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/rep.h?rev=284002&r1=284001&r2=284002&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/time/rep.h (original)
+++ libcxx/trunk/test/std/utilities/time/rep.h Wed Oct 12 05:28:09 2016
@@ -10,15 +10,17 @@
#ifndef REP_H
#define REP_H
+#include "test_macros.h"
+
class Rep
{
int data_;
public:
- _LIBCPP_CONSTEXPR Rep() : data_(-1) {}
- explicit _LIBCPP_CONSTEXPR Rep(int i) : data_(i) {}
+ TEST_CONSTEXPR Rep() : data_(-1) {}
+ explicit TEST_CONSTEXPR Rep(int i) : data_(i) {}
- bool _LIBCPP_CONSTEXPR operator==(int i) const {return data_ == i;}
- bool _LIBCPP_CONSTEXPR operator==(const Rep& r) const {return data_ == r.data_;}
+ bool TEST_CONSTEXPR operator==(int i) const {return data_ == i;}
+ bool TEST_CONSTEXPR operator==(const Rep& r) const {return data_ == r.data_;}
Rep& operator*=(Rep x) {data_ *= x.data_; return *this;}
Rep& operator/=(Rep x) {data_ /= x.data_; return *this;}
More information about the cfe-commits
mailing list