value_init_test_fail3.cpp 551 B

123456789101112131415161718192021222324252627
  1. // Copyright 2002, Fernando Luis Cacciola Carballal.
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See
  4. // accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // Test program for "boost/utility/value_init.hpp"
  8. //
  9. // Initial: 21 Agu 2002
  10. #include <iostream>
  11. #include <string>
  12. #include "boost/utility/value_init.hpp"
  13. #ifdef __BORLANDC__
  14. #pragma hdrstop
  15. #endif
  16. int main()
  17. {
  18. boost::value_initialized<int const> const cx_c ;
  19. get(cx_c) = 1234 ; // this should produce an ERROR
  20. return 0;
  21. }