summaryrefslogtreecommitdiff
path: root/tools/conf_tests/have_template_sequence_ctors.cc
blob: 6423684b1ac2ee85c6948007f2363d3878a2c0b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Configuration-time test program, used in Meson build.
// Check whether the STL containers have templated sequence ctors,
// Corresponds to the M4 macro GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS.

#include <vector>
#include <deque>
#include <list>

int main()
{
  const int array[8] = { 0, };
  std::vector<int>  test_vector(&array[0], &array[8]);
  std::deque<short> test_deque(test_vector.begin(), test_vector.end());
  std::list<long>   test_list(test_deque.begin(),  test_deque.end());
  test_vector.assign(test_list.begin(), test_list.end());
  return 0;
}