File: container_fwd_test.cpp

package info (click to toggle)
boost1.74 1.74.0-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 464,084 kB
  • sloc: cpp: 3,338,324; xml: 131,293; python: 33,088; ansic: 14,336; asm: 4,034; sh: 3,351; makefile: 1,193; perl: 1,036; yacc: 478; php: 212; ruby: 102; lisp: 24; sql: 13; csh: 6
file content (112 lines) | stat: -rw-r--r-- 2,332 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112

// Copyright 2005-2009 Daniel James.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#include <boost/detail/container_fwd.hpp>

#if BOOST_WORKAROUND(__GNUC__, < 3) && \
    !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
template <class charT, class Allocator>
static void test(
    std::basic_string<charT, std::string_char_traits<charT>, Allocator> const&)
{
}
#else
template <class charT, class Allocator>
static void test(
    std::basic_string<charT, std::char_traits<charT>, Allocator> const&)
{
}
#endif
    
template <class T, class Allocator>
static void test(std::deque<T, Allocator> const&)
{
}

template <class T, class Allocator>
static void test(std::list<T, Allocator> const&)
{
}

template <class T, class Allocator>
static void test(std::vector<T, Allocator> const&)
{
}

template <class Key, class T, class Compare, class Allocator>
static void test(std::map<Key, T, Compare, Allocator> const&)
{
}

template <class Key, class T, class Compare, class Allocator>
static void test(std::multimap<Key, T, Compare, Allocator> const&)
{
}

template <class Key, class Compare, class Allocator>
static void test(std::set<Key, Compare, Allocator> const&)
{
}

template <class Key, class Compare, class Allocator>
static void test(std::multiset<Key, Compare, Allocator> const&)
{
}

template <std::size_t N>
static void test(std::bitset<N> const&)
{
}

template <class T>
static void test(std::complex<T> const&)
{
}

template <class X, class Y>
static void test(std::pair<X, Y> const&)
{
}

#include <deque>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <complex>
#include <utility>

int main()
{
    std::deque<int> x1;
    std::list<std::string> x2;
    std::vector<float> x3;
    std::vector<bool> x4;
    std::map<int, int> x5;
    std::multimap<float, int*> x6;
    std::set<std::string> x7;
    std::multiset<std::vector<int> > x8;
    std::bitset<10> x9;
    std::string x10;
    std::complex<double> x11;
    std::pair<std::list<int>, char***> x12;

    test(x1);
    test(x2);
    test(x3);
    test(x4);
    test(x5);
    test(x6);
    test(x7);
    test(x8);
    test(x9);
    test(x10);
    test(x11);
    test(x12);

    return 0;
}