[boost.asio] passing a boost::asio::io_service in to a constructure

Hi: I'm new to working with asio, and have the following currently as two global variables: boost::asio::io_service FolderMonitoringService; boost::asio::dir_monitor dm(FolderMonitoringService); This works fine, but what I'd like to do is to make both variables private. When I do that, I get an error c2061 syntax error on the second line, in visual studio 2010. How can I pass a non-copyable class in to a constructor? Cheers Sean.

I’m new to working with asio, and have the following currently as two global variables:
boost::asio::io_service FolderMonitoringService;
boost::asio::dir_monitor dm(FolderMonitoringService);
This works fine, but what I’d like to do is to make both variables private.
When I do that, I get an error c2061 syntax error on the second line, in visual studio 2010.
How can I pass a non-copyable class in to a constructor?
c2061 is unrelated to non-copyable problem: http://msdn.microsoft.com/en-us/library/yha416c7(v=VS.100).aspx
participants (3)
-
Igor R
-
Kenny Riddile
-
Sean Farrow