| 1 | /* |
| 2 | * Distributed under the Boost Software License, Version 1.0. |
| 3 | * (See accompanying file LICENSE_1_0.txt or copy at |
| 4 | * https://www.boost.org/LICENSE_1_0.txt) |
| 5 | * |
| 6 | * Copyright (c) 2023 Andrey Semashev |
| 7 | */ |
| 8 | /*! |
| 9 | * \file unique_resource_non_deducible_def_res.cpp |
| 10 | * \author Andrey Semashev |
| 11 | * |
| 12 | * \brief This file tests that \c unique_resource template parameters are not deducible from \c default_resource keyword. |
| 13 | */ |
| 14 | |
| 15 | #include <boost/scope/unique_resource.hpp> |
| 16 | |
| 17 | struct nop_resource_deleter |
| 18 | { |
| 19 | template< typename Resource > |
| 20 | void operator() (Resource const& res) const noexcept |
| 21 | { |
| 22 | } |
| 23 | }; |
| 24 | |
| 25 | int main() |
| 26 | { |
| 27 | boost::scope::unique_resource ur{ boost::scope::default_resource, nop_resource_deleter() }; |
| 28 | |
| 29 | return 0; |
| 30 | } |
| 31 | |