mutable_error.cpp 502 B

1234567891011121314
  1. // Copyright (C) 2008-2018 Lorenzo Caminiti
  2. // Distributed under the Boost Software License, Version 1.0 (see accompanying
  3. // file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
  4. // See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
  5. // Test compiler error when invariant() not declared const.
  6. #undef BOOST_CONTRACT_PERMISSIVE
  7. #include "mutable.hpp"
  8. #ifdef BOOST_CONTRACT_NO_INVARIANTS
  9. #error "Forcing error even when invariants not checked"
  10. #endif