mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 12:02:36 +08:00
Fix warnings in array and assoc containers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242629 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -11,14 +11,18 @@
|
||||
|
||||
// template <size_t I, class T, size_t N> T&& get(array<T, N>&& a);
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <cassert>
|
||||
|
||||
#include "../suppress_array_warnings.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
{
|
||||
typedef std::unique_ptr<double> T;
|
||||
typedef std::array<T, 1> C;
|
||||
@@ -26,5 +30,4 @@ int main()
|
||||
T t = std::get<0>(std::move(c));
|
||||
assert(*t == 3.5);
|
||||
}
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user