From 397717b7c8b7576fbdd2f5b7ec7dec531f305c98 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Fri, 20 Jul 2012 19:20:49 +0000 Subject: constexpr applied to . llvm-svn: 160564 --- .../containers/sequences/array/array.size/size.pass.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libcxx/test') diff --git a/libcxx/test/containers/sequences/array/array.size/size.pass.cpp b/libcxx/test/containers/sequences/array/array.size/size.pass.cpp index 87344ae5373..4078fd5ca9f 100644 --- a/libcxx/test/containers/sequences/array/array.size/size.pass.cpp +++ b/libcxx/test/containers/sequences/array/array.size/size.pass.cpp @@ -28,4 +28,18 @@ int main() C c = {}; assert(c.size() == 0); } +#ifndef _LIBCPP_HAS_NO_CONSTEXPR + { + typedef double T; + typedef std::array C; + constexpr C c = {1, 2, 3.5}; + static_assert(c.size() == 3, ""); + } + { + typedef double T; + typedef std::array C; + constexpr C c = {}; + static_assert(c.size() == 0, ""); + } +#endif } -- cgit v1.2.3