object.qbk 1.1 KB

1234567891011121314151617181920212223242526
  1. [/==============================================================================
  2. Copyright (C) 2001-2010 Joel de Guzman
  3. Copyright (C) 2001-2005 Dan Marsden
  4. Copyright (C) 2001-2010 Thomas Heller
  5. Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. ===============================================================================/]
  8. [section Construct, New, Delete, Casts]
  9. You'll probably want to work with objects. There are lazy versions of
  10. constructor calls, `new`, `delete` and the suite of C++ casts. Examples:
  11. construct<std::string>(arg1, arg2) // constructs a std::string from arg1, arg2
  12. new_<std::string>(arg1, arg2) // makes a new std::string from arg1, arg2
  13. delete_(arg1) // deletes arg1 (assumed to be a pointer)
  14. static_cast_<int*>(arg1) // static_cast's arg1 to an int*
  15. [note Take note that, by convention, names that conflict with C++
  16. reserved words are appended with a single trailing underscore `'_'`]
  17. [blurb __tip__ Learn more about this [link phoenix.modules.object here.]]
  18. [endsect]