|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r50030 - sandbox/compile-in-place
From: doomster_at_[hidden]
Date: 2008-11-29 17:08:32
Author: eckhardt
Date: 2008-11-29 17:08:32 EST (Sat, 29 Nov 2008)
New Revision: 50030
URL: http://svn.boost.org/trac/boost/changeset/50030
Log:
- Add example test for Boost.System.
Added:
sandbox/compile-in-place/test-system.cpp (contents, props changed)
Added: sandbox/compile-in-place/test-system.cpp
==============================================================================
--- (empty file)
+++ sandbox/compile-in-place/test-system.cpp 2008-11-29 17:08:32 EST (Sat, 29 Nov 2008)
@@ -0,0 +1,28 @@
+/* example to demonstrate compile-in-place for Boost.System
+
+Compile with
+ $CXX -I path/to/boost_X_YY_Z test-system.cpp
+
+Notes:
+
+$Id$
+*/
+
+#include <iostream>
+#include <ostream>
+#include <boost/system/system_error.hpp>
+
+int main()
+{
+ try
+ {
+ std::cout << "throwing ENOENT" << std::endl;
+ throw boost::system::system_error(ENOENT, boost::system::get_posix_category());
+ }
+ catch(std::exception const& e)
+ {
+ std::cout << "caught '" << e.what() << '\'' << std::endl;
+ }
+}
+
+#include <boost/system/compile_in_place.cpp>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk