Boost logo

Boost :

From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2007-05-31 12:52:07


Andy wrote:

> I added 'inline' to the non-template functions. I don't get the error
> for the templated functions. I can still add 'inline' to those if I
> should/need to. I am using visual studio .NET, maybe that makes a
> difference?
>
> I uploaded uuid_v9.zip to the boost vault. Will you give it a try for
> me?

You need to add an explicit 'inline' specifier to any function defined out
of class but in a header, regardless if it's a templatized function or not.
This instructs the compiler to treat this function to be visible inside the
current translation unit only (even if the compiler decides not to inline
the function), avoiding multiple symbol definitions if the header is
included from more than one translation unit.

Regards Hartmut


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk