Added constexpr modifiers for C++14 mode and some tests

This commit is contained in:
Antony Polukhin
2016-01-25 13:11:01 +03:00
parent 61a4bd45fb
commit 8d095e9d30
19 changed files with 111 additions and 71 deletions

View File

@ -15,6 +15,7 @@
#include <algorithm> // for std::partition_copy, if available
#include <utility> // for make_pair
#include <boost/config.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
@ -38,7 +39,7 @@ namespace boost { namespace algorithm {
/// otherwise we have our own implementation.
template <typename InputIterator,
typename OutputIterator1, typename OutputIterator2, typename UnaryPredicate>
std::pair<OutputIterator1, OutputIterator2>
BOOST_CXX14_CONSTEXPR std::pair<OutputIterator1, OutputIterator2>
partition_copy ( InputIterator first, InputIterator last,
OutputIterator1 out_true, OutputIterator2 out_false, UnaryPredicate p )
{
@ -60,7 +61,7 @@ partition_copy ( InputIterator first, InputIterator last,
///
template <typename Range, typename OutputIterator1, typename OutputIterator2,
typename UnaryPredicate>
std::pair<OutputIterator1, OutputIterator2>
BOOST_CXX14_CONSTEXPR std::pair<OutputIterator1, OutputIterator2>
partition_copy ( const Range &r, OutputIterator1 out_true, OutputIterator2 out_false,
UnaryPredicate p )
{