#ifndef SPROUT_SUB_ARRAY_SUB_HPP #define SPROUT_SUB_ARRAY_SUB_HPP #include #include #include #include #include #include #include namespace sprout { // // sub // template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub( Container& arr, typename sprout::container_traits >::const_iterator first, typename sprout::container_traits >::const_iterator last ) { return sprout::sub_array(arr, first, last); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub( Container& arr, typename sprout::container_traits >::difference_type first, typename sprout::container_traits >::difference_type last ) { return sprout::sub_array(arr, first, last); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub( Container& arr, typename sprout::container_traits >::const_iterator first ) { return sprout::sub(arr, first, sprout::end(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub( Container& arr, typename sprout::container_traits >::difference_type first ) { return sprout::sub(arr, first, sprout::size(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub( Container& arr ) { return sprout::sub(arr, sprout::begin(arr), sprout::end(arr)); } // // sub // template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub( Container const& arr, typename sprout::container_traits >::const_iterator first, typename sprout::container_traits >::const_iterator last ) { return sprout::sub_array(arr, first, last); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub( Container const& arr, typename sprout::container_traits >::difference_type first, typename sprout::container_traits >::difference_type last ) { return sprout::sub_array(arr, first, last); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub( Container const& arr, typename sprout::container_traits >::const_iterator first ) { return sprout::sub(arr, first, sprout::end(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub( Container const& arr, typename sprout::container_traits >::difference_type first ) { return sprout::sub(arr, first, sprout::size(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub( Container const& arr ) { return sprout::sub(arr, sprout::begin(arr), sprout::end(arr)); } // // sub // template inline SPROUT_CONSTEXPR typename std::enable_if::value, Container>::type sub( Container const& arr, typename sprout::container_traits::const_iterator first, typename sprout::container_traits::const_iterator last ) { return Container(arr, first, last); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, Container>::type sub( Container const& arr, typename sprout::container_traits::difference_type first, typename sprout::container_traits::difference_type last ) { return Container(arr, first, last); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, Container>::type sub( Container const& arr, typename sprout::container_traits::const_iterator first ) { return sprout::sub(arr, first, sprout::end(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, Container>::type sub( Container const& arr, typename sprout::container_traits::difference_type first ) { return sprout::sub(arr, first, sprout::size(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, Container>::type sub( Container const& arr ) { return sprout::sub(arr, sprout::begin(arr), sprout::end(arr)); } // // csub // template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type csub( Container const& arr, typename sprout::container_traits >::const_iterator first, typename sprout::container_traits >::const_iterator last ) { return sprout::sub_array(arr, first, last); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type csub( Container const& arr, typename sprout::container_traits >::difference_type first, typename sprout::container_traits >::difference_type last ) { return sprout::sub_array(arr, first, last); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type csub( Container const& arr, typename sprout::container_traits >::const_iterator first ) { return sprout::csub(arr, first, sprout::end(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type csub( Container const& arr, typename sprout::container_traits >::difference_type first ) { return sprout::csub(arr, first, sprout::size(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type csub( Container const& arr ) { return sprout::csub(arr, sprout::begin(arr), sprout::end(arr)); } // // csub // template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type csub( Container const& arr, typename sprout::container_traits::const_iterator first, typename sprout::container_traits::const_iterator last ) { return sprout::sub_array(arr.get_array(), first, last); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type csub( Container const& arr, typename sprout::container_traits::difference_type first, typename sprout::container_traits::difference_type last ) { return sprout::sub_array( arr.get_array(), sprout::next(sprout::begin(arr), first), sprout::next(sprout::begin(arr), last) ); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type csub( Container const& arr, typename sprout::container_traits::const_iterator first ) { return sprout::csub(arr, first, sprout::end(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type csub( Container const& arr, typename sprout::container_traits::difference_type first ) { return sprout::csub(arr, first, sprout::size(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type csub( Container const& arr ) { return sprout::csub(arr, sprout::begin(arr), sprout::end(arr)); } // // sub_copy // template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub_copy( Container const& arr, typename sprout::container_traits::const_iterator first, typename sprout::container_traits::const_iterator last ) { return sprout::sub_array(arr, first, last); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub_copy( Container const& arr, typename sprout::container_traits::difference_type first, typename sprout::container_traits::difference_type last ) { return sprout::sub_array(arr, first, last); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub_copy( Container const& arr, typename sprout::container_traits::const_iterator first ) { return sprout::sub_copy(arr, first, sprout::end(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub_copy( Container const& arr, typename sprout::container_traits::difference_type first ) { return sprout::sub_copy(arr, first, sprout::size(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type ub_copy( Container const& arr ) { return sprout::sub_copy(arr, sprout::begin(arr), sprout::end(arr)); } // // sub_copy // template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub_copy( Container const& arr, typename sprout::container_traits::const_iterator first, typename sprout::container_traits::const_iterator last ) { return sprout::sub_array(arr.get_array(), first, last); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub_copy( Container const& arr, typename sprout::container_traits::difference_type first, typename sprout::container_traits::difference_type last ) { return sprout::sub_array( arr.get_array(), sprout::next(sprout::begin(arr), first), sprout::next(sprout::begin(arr), last) ); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub_copy( Container const& arr, typename sprout::container_traits::const_iterator first ) { return sprout::sub_copy(arr, first, sprout::end(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub_copy( Container const& arr, typename sprout::container_traits::difference_type first ) { return sprout::sub_copy(arr, first, sprout::size(arr)); } template inline SPROUT_CONSTEXPR typename std::enable_if::value, sprout::sub_array >::type sub_copy( Container const& arr ) { return sprout::sub_copy(arr, sprout::begin(arr), sprout::end(arr)); } } // namespace sprout #endif // #ifndef SPROUT_SUB_ARRAY_SUB_HPP