Warning, file /include/boost/test/data/monomorphic/fwd.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef BOOST_TEST_DATA_MONOMORPHIC_FWD_HPP_102212GER
0013 #define BOOST_TEST_DATA_MONOMORPHIC_FWD_HPP_102212GER
0014
0015
0016 #include <boost/test/data/config.hpp>
0017 #include <boost/test/data/size.hpp>
0018
0019 #include <boost/test/utils/is_forward_iterable.hpp>
0020
0021
0022 #include <boost/type_traits/remove_const.hpp>
0023 #include <boost/type_traits/remove_reference.hpp>
0024 #include <boost/type_traits/is_array.hpp>
0025 #include <boost/mpl/bool.hpp>
0026
0027
0028 #include <tuple>
0029
0030 #include <boost/test/detail/suppress_warnings.hpp>
0031
0032
0033 #include <initializer_list>
0034
0035
0036
0037 namespace boost {
0038 namespace unit_test {
0039 namespace data {
0040
0041 namespace monomorphic {
0042
0043
0044 #if !defined(BOOST_TEST_DOXYGEN_DOC__)
0045
0046 template<typename T>
0047 class singleton;
0048
0049 template<typename C>
0050 class collection;
0051
0052 template<typename T>
0053 class array;
0054
0055 template<typename T>
0056 class init_list;
0057
0058 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
0059 !defined(BOOST_NO_CXX11_HDR_TUPLE)
0060 template<class dataset_t, class ...Args>
0061 class delayed_dataset;
0062 #endif
0063
0064 #endif
0065
0066
0067
0068
0069
0070
0071 template<typename DataSet>
0072 struct is_dataset : mpl::false_ {};
0073
0074
0075
0076
0077 template<typename DataSet>
0078 struct is_dataset<DataSet&> : is_dataset<DataSet> {};
0079 template<typename DataSet>
0080 struct is_dataset<DataSet&&> : is_dataset<DataSet> {};
0081
0082
0083
0084
0085 template<typename DataSet>
0086 struct is_dataset<DataSet const> : is_dataset<DataSet> {};
0087
0088 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
0089
0090
0091 template<class DataSet, class...>
0092 struct has_dataset : is_dataset<DataSet> {};
0093
0094 template<class DataSet0, class DataSet1, class... DataSetTT>
0095 struct has_dataset<DataSet0, DataSet1, DataSetTT...>
0096 : std::integral_constant<bool, is_dataset<DataSet0>::value || has_dataset<DataSet1, DataSetTT...>::value>
0097 {};
0098 #endif
0099
0100 }
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125 template<typename DataSet>
0126 inline typename std::enable_if<monomorphic::is_dataset<DataSet>::value,DataSet>::type
0127 make(DataSet&& ds)
0128 {
0129 return std::forward<DataSet>( ds );
0130 }
0131
0132
0133
0134
0135
0136
0137
0138 template<typename T>
0139 inline typename std::enable_if<!is_container_forward_iterable<T>::value &&
0140 !monomorphic::is_dataset<T>::value &&
0141 !is_array<typename remove_reference<T>::type>::value,
0142 monomorphic::singleton<T>>::type
0143 make( T&& v );
0144
0145
0146
0147
0148 template<typename C>
0149 inline typename std::enable_if<is_container_forward_iterable<C>::value,monomorphic::collection<C>>::type
0150 make( C&& c );
0151
0152
0153
0154
0155 template<typename T, std::size_t size>
0156 inline monomorphic::array< typename boost::remove_const<T>::type >
0157 make( T (&a)[size] );
0158
0159
0160
0161
0162 inline monomorphic::singleton<char*>
0163 make( char* str );
0164
0165
0166
0167
0168 inline monomorphic::singleton<char const*>
0169 make( char const* str );
0170
0171
0172
0173
0174 template<typename T>
0175 inline monomorphic::init_list<T>
0176 make( std::initializer_list<T>&& );
0177
0178
0179
0180 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
0181 !defined(BOOST_TEST_ERRONEOUS_INIT_LIST)
0182
0183 template<class T, class ...Args>
0184 inline typename std::enable_if<
0185 !monomorphic::has_dataset<T, Args...>::value,
0186 monomorphic::init_list<T>
0187 >::type
0188 make( T&& arg0, Args&&... args );
0189 #endif
0190
0191
0192
0193 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
0194 !defined(BOOST_NO_CXX11_HDR_TUPLE)
0195 template<class dataset_t, class ...Args>
0196 inline typename std::enable_if<
0197 monomorphic::is_dataset< dataset_t >::value,
0198 monomorphic::delayed_dataset<dataset_t, Args...>
0199 >::type
0200 make_delayed(Args... args);
0201 #endif
0202
0203
0204
0205 namespace result_of {
0206
0207
0208 template<typename DataSet>
0209 struct make {
0210 typedef decltype( data::make( declval<DataSet>() ) ) type;
0211 };
0212
0213 }
0214
0215 }
0216 }
0217 }
0218
0219 #include <boost/test/detail/enable_warnings.hpp>
0220
0221 #endif
0222