Boost logo

Boost Users :

Subject: Re: [Boost-users] [units] Creating a velocity unit
From: Ryan (boost_at_[hidden])
Date: 2013-02-26 10:23:38


>
> That will cause a different linker error.
> (multiple definitions instead of undefined symbol)
>
> It takes a bit of magic to define these in a header.
> BOOST_UNITS_STATIC_CONSTANT handles it, but it only
> works at namespace scope. The only to to define
> them inside the class and keep it header only, is
> to turn A into a template.

Okay. I'll just define them outside the class in the classes namespace.
 I'd rather keep the header only implementation than get the static defines
in the class.

Thanks again for the help.

Ryan



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