Warning, file /include/boost/test/data/monomorphic/array.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_ARRAY_HPP_121411GER
0013 #define BOOST_TEST_DATA_MONOMORPHIC_ARRAY_HPP_121411GER
0014
0015
0016 #include <boost/test/data/config.hpp>
0017 #include <boost/test/data/monomorphic/fwd.hpp>
0018
0019 #include <boost/test/detail/suppress_warnings.hpp>
0020
0021
0022
0023 namespace boost {
0024 namespace unit_test {
0025 namespace data {
0026 namespace monomorphic {
0027
0028
0029
0030
0031
0032
0033 template<typename T>
0034 class array {
0035 public:
0036 typedef T sample;
0037
0038 static const int arity = 1;
0039
0040 typedef T const* iterator;
0041
0042
0043 array( T const* arr_, std::size_t size_ )
0044 : m_arr( arr_ )
0045 , m_size( size_ )
0046 {}
0047
0048
0049 data::size_t size() const { return m_size; }
0050 iterator begin() const { return m_arr; }
0051
0052 private:
0053
0054 T const* m_arr;
0055 std::size_t m_size;
0056 };
0057
0058
0059
0060
0061 template<typename T>
0062 struct is_dataset<array<T>> : mpl::true_ {};
0063
0064 }
0065
0066
0067
0068
0069 template<typename T, std::size_t size>
0070 inline monomorphic::array<typename boost::remove_const<T>::type>
0071 make( T (&a)[size] )
0072 {
0073 return monomorphic::array<typename boost::remove_const<T>::type>( a, size );
0074 }
0075
0076 }
0077 }
0078 }
0079
0080 #include <boost/test/detail/enable_warnings.hpp>
0081
0082 #endif
0083