/Src/Dependencies/Boost/libs/phoenix/doc/starter_kit/object.qbk

http://hadesmem.googlecode.com/ · text · 26 lines · 18 code · 8 blank · 0 comment · 0 complexity · cf9ea4ad3d5cca49bd1cc79e1bda8458 MD5 · raw file

  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]