2
0
mirror of https://github.com/boostorg/asio.git synced 2026-01-23 05:22:08 +00:00

Move existing examples into a C++03-specific directory, and add a new

directory for C++11-specific examples. A limited subset of the C++03
examples have been converted to their C++11 equivalents.


[SVN r84312]
This commit is contained in:
Christopher Kohlhoff
2013-05-17 02:25:10 +00:00
parent e4b53793cc
commit 4f1d36c7a1
246 changed files with 3583 additions and 136 deletions

View File

@@ -0,0 +1,30 @@
//
// timer.cpp
// ~~~~~~~~~
//
// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#include <iostream>
#include <boost/asio.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
void print(const boost::system::error_code& /*e*/)
{
std::cout << "Hello, world!\n";
}
int main()
{
boost::asio::io_service io;
boost::asio::deadline_timer t(io, boost::posix_time::seconds(5));
t.async_wait(&print);
io.run();
return 0;
}