The problem is that asio::deadline_timer has a constructor that requires a non-const reference to a service. However, when you use make_shared its parameter is const. That is, this part of make_shared is the problem:
template< class T, class A1 > // service is passed by const-reference
boost::shared_ptr< T > make_shared( A1 const & a1 )
{
// ...
::new( pv ) T( a1 ); // but the constructor requires a non-const reference
// ...
}
What you can do is wrap the service up into a reference_wrapper, using ref:
#include <boost/ref.hpp>
asio::io_service io1;
shared_ptr<asio::deadline_timer> dt = // pass a "reference"
make_shared<asio::deadline_timer>(boost::ref(io1));
This takes your instance, and puts it into an object that can be converted implicitly to a reference to your isntance. You've then essentially passed an object representing a non-const reference to your instance.
This works because the reference_wrapper really stores a pointer to your instance. It can therefore return that pointer dereferenced while still being const.