]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Add includefile for arrays 27455/head
authorWillem Jan Withagen <wjw@digiware.nl>
Tue, 9 Apr 2019 09:24:49 +0000 (11:24 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Tue, 9 Apr 2019 09:24:49 +0000 (11:24 +0200)
Otherwise Clang will complain on FreeBSD:
```
/home/jenkins/workspace/ceph-master/src/test/test_weighted_shuffle.cc:9:23: error: implicit instantiation of undefined template 'std::__1::array<char, 5>'
  std::array<char, 5> choices{'a', 'b', 'c', 'd', 'e'};
                      ^
/usr/include/c++/v1/__tuple:223:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^
/home/jenkins/workspace/ceph-master/src/test/test_weighted_shuffle.cc:10:22: error: implicit instantiation of undefined template 'std::__1::array<int, 5>'
  std::array<int, 5> weights{100, 50, 25, 10, 1};
                     ^
/usr/include/c++/v1/__tuple:223:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
```

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/test/test_weighted_shuffle.cc

index f920329c09ef7a1e5108219ff925db637c2b2f64..9f92cbdc09519308745c6d274de922df1ea98244 100644 (file)
@@ -2,6 +2,7 @@
 // vim: ts=8 sw=2 smarttab
 
 #include "common/weighted_shuffle.h"
+#include <array>
 #include <map>
 #include "gtest/gtest.h"