Boost GIL


error.hpp
1//
2// Copyright 2007-2008 Christian Henning, Andreas Pokorny, Lubomir Bourdev
3//
4// Distributed under the Boost Software License, Version 1.0
5// See accompanying file LICENSE_1_0.txt or copy at
6// http://www.boost.org/LICENSE_1_0.txt
7//
8#ifndef BOOST_GIL_IO_ERROR_HPP
9#define BOOST_GIL_IO_ERROR_HPP
10
11#include <ios>
12
13namespace boost { namespace gil {
14
15inline void io_error(const char* descr)
16{
17 throw std::ios_base::failure(descr);
18}
19
20inline void io_error_if(bool expr, const char* descr)
21{
22 if (expr)
23 io_error(descr);
24}
25
26} // namespace gil
27} // namespace boost
28
29#endif
defined(BOOST_NO_CXX17_HDR_MEMORY_RESOURCE)
Definition algorithm.hpp:36