Once more w/o the typo.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224298 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cde7ca0a97
commit
e51267e2d1
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
// <optional>
|
// <optional>
|
||||||
|
|
||||||
// T* optional<T>::operator->();
|
// constexpr T* optional<T>::operator->();
|
||||||
|
|
||||||
#ifdef _LIBCPP_DEBUG
|
#ifdef _LIBCPP_DEBUG
|
||||||
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
|
#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
|
||||||
@ -25,8 +25,7 @@ using std::experimental::optional;
|
|||||||
|
|
||||||
struct X
|
struct X
|
||||||
{
|
{
|
||||||
int test() const {return 2;}
|
constexpr int test() {return 3;}
|
||||||
int test() {return 3;}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _LIBCPP_STD_VER > 11
|
#endif // _LIBCPP_STD_VER > 11
|
||||||
@ -35,8 +34,8 @@ int main()
|
|||||||
{
|
{
|
||||||
#if _LIBCPP_STD_VER > 11
|
#if _LIBCPP_STD_VER > 11
|
||||||
{
|
{
|
||||||
optional<X> opt(X{});
|
constexpr optional<X> opt(X{});
|
||||||
assert(opt->test() == 3);
|
static_assert(opt->test() == 3, "");
|
||||||
}
|
}
|
||||||
#ifdef _LIBCPP_DEBUG
|
#ifdef _LIBCPP_DEBUG
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user