|
Boost Users : |
Subject: Re: [Boost-users] [units] Creating a velocity unit
From: Ryan (boost_at_[hidden])
Date: 2013-02-25 19:33:34
>
> at namespace scope in A.cpp:
>
> const metric::nautical_mile_base_unit::unit_type A::nautical_miles;
>
I don't have a .cpp. Everything is in the header. I tried doing the const
thing after the class but it didn't work. Do I have to have a .cpp for it
to work?
Ryan
//The following doesn't work.
class A
{
static const metric::nautical_mile_base_unit::unit_type nautical_miles;
static const metric::hour_base_unit::unit_type hours;
static const decltype(nautical_miles / hours) nautical_miles_per_hour;
}
const metric::nautical_mile_base_unit::unit_type A::nautical_miles;
const metric::hour_base_unit::unit_type A::hours;
const decltype(nautical_miles / hours) A::nautical_miles_per_hour;
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