]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/contract/test/specify/auto_pre_error.cpp
2 // Copyright (C) 2008-2018 Lorenzo Caminiti
3 // Distributed under the Boost Software License, Version 1.0 (see accompanying
4 // file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
5 // See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
7 // Test auto error after pre (for free func, but same for all contracts).
9 #include <boost/config.hpp>
10 // Not just __cplusplus to detect C++17 as MSVC defines it correctly sometimes.
11 #if (defined(__cplusplus) && __cplusplus >= 201703L) || \
12 !defined(BOOST_NO_CXX17_IF_CONSTEXPR)
13 #error "C++17 copy elision invalidates test so forcing expected failure"
16 #include <boost/contract/function.hpp>
19 auto c
= boost::contract::function() // Error (can't use auto).