From bbaff93af4be14829a3c990faf48f77536588d19 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 15 Mar 2018 15:27:13 -0700 Subject: Add nullptr_t to the "system STL"'s . Bug: http://b/65466378 Test: test builds Change-Id: Id9693ae4749d15b01a0f04d32f3b790bd089c5a8 --- sources/cxx-stl/system/include/cstddef | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'sources') diff --git a/sources/cxx-stl/system/include/cstddef b/sources/cxx-stl/system/include/cstddef index cb06b49c8..91fb7af00 100644 --- a/sources/cxx-stl/system/include/cstddef +++ b/sources/cxx-stl/system/include/cstddef @@ -1,4 +1,3 @@ -/* -*- c++ -*- */ /* * Copyright (C) 2009 The Android Open Source Project * All rights reserved. @@ -30,21 +29,21 @@ #ifndef BIONIC_LIBSTDCPP_INCLUDE_CSTDDEF__ #define BIONIC_LIBSTDCPP_INCLUDE_CSTDDEF__ -/* - * Standard C++ Library wrapper around the C stddef.h header file. - * The following 2 types are also declared in the 'std' namespace: - * . ptrdiff_t - * . size_t - */ #include extern "C++" { namespace std { + using ::ptrdiff_t; using ::size_t; -} // namespace std -} // extern C++ +#if __cplusplus >= 201103L +typedef decltype(nullptr) nullptr_t; +#endif + +} + +} -#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTDDEF__ +#endif -- cgit v1.2.3