
From: Christopher Kohlhoff <chris@kohlhoff.com>
--- Rob Stewart <stewart@sig.com> wrote:
I'd say that unless you know that using virtual functions causes problems, you shouldn't presume that they do. If users say the library is too big and this technique significantly affects the size, then it may be worth considering at that time.
As I said in another reply, I did find a need to do this change to eliminate code bloat with several compilers. As an example, Borland C++ 5.6.4 seems to add approximately 100 bytes to the executable for each asynchronous call if a virtual function is used in win_iocp_operation. As the change didn't impact the public interface of asio, it seemed like a win.
Was that 100 bytes per async call or per type of call? As I understand it, you have a class template derived from win_iocp_operation. Is it 100 bytes for each class created by specializing that template? Is there a reasonable upper bound on the number of such types in a given application? -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;