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

@ -14,6 +14,7 @@
#include <algorithm> // for std::mismatch
#include <utility> // for std::pair
#include <boost/config.hpp>
namespace boost { namespace algorithm {
@ -28,7 +29,7 @@ namespace boost { namespace algorithm {
/// \param last2 One past the end of the second range.
/// \param pred A predicate for comparing the elements of the ranges
template <class InputIterator1, class InputIterator2, class BinaryPredicate>
std::pair<InputIterator1, InputIterator2> mismatch (
BOOST_CXX14_CONSTEXPR std::pair<InputIterator1, InputIterator2> mismatch (
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
BinaryPredicate pred )
@ -48,7 +49,7 @@ std::pair<InputIterator1, InputIterator2> mismatch (
/// \param first2 The start of the second range.
/// \param last2 One past the end of the second range.
template <class InputIterator1, class InputIterator2>
std::pair<InputIterator1, InputIterator2> mismatch (
BOOST_CXX14_CONSTEXPR std::pair<InputIterator1, InputIterator2> mismatch (
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2 )
{