Fixed some warnings

This commit is contained in:
Antony Polukhin
2017-06-25 14:05:08 +03:00
parent b0737f4169
commit 93e7b2458b
2 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,4 @@
// Copyright 2013-2016 Antony Polukhin
// Copyright 2013-2017 Antony Polukhin
// Distributed under the Boost Software License, Version 1.0.
// (See the accompanying file LICENSE_1_0.txt
@ -6,6 +6,10 @@
#include <boost/config.hpp>
template <class T>
void do_something(const T&) {}
#if !defined(BOOST_NO_CXX14_CONSTEXPR) && !defined(BOOST_NO_CXX11_CONSTEXPR)
// Implementation of this function is not essential for the example
template <std::size_t N>
@ -62,6 +66,7 @@ namespace my_project {
// Actual implementation of the serialization goes below
// ...
do_something(value);
}
};

View File

@ -55,7 +55,7 @@ constexpr bool is_asc_sorted(types<Lhs, Rhs, TN...>) noexcept {
// Using the newly created `is_asc_sorted` trait:
template <class... T>
void do_something(const types<T...>& t) noexcept {
void do_something(const types<T...>& /*value*/) noexcept {
static_assert(
is_asc_sorted( types<T...>() ),
"T... for do_something(const types<T...>& t) must be sorted ascending"