Boost logo

Boost Users :

From: William Xue (william.xue_at_[hidden])
Date: 2006-10-13 01:00:34


On Fri, 13 Oct 2006 11:40:49 +0800, Gottlob Frege <gottlobfrege_at_[hidden]>
wrote:
>>
> IIR/UC, MS used PURE because the code actually compiled in both C and
> C++.
> Under C++ it became '=0', but under C it was empty (I think). Basically,
> you often saw this in interface definitions for COM objects, which,
> under C,
> compiled into a struct of function pointers, and under C++ as a pure
> interface class (and in memory, looked the same either way).
>
> Tony

Yes, it's a good explanation. Thanks a lot.

For the reason I mentioned above, I perfer to do the job like this:
---8<--------------------------------------------->8---
#ifdef cplusplus
class ...
{
...
int foo(...) = 0;
...
};
#else
class ...
{
...
int foo(...);
...
};
#endif
---8<--------------------------------------------->8---

OK, it's just a example for something of this thread.;)

-- 
Sincerely yours,
William

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net