Arithmetic type emulator helper class for testcases.
Chris Fairles
chris.fairles@gmail.com
Tue Jul 15 15:44:00 GMT 2008
On Tue, Jul 15, 2008 at 6:37 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> ... the definition of struct system_clock (not a template) seems indeed an excellent candidate for a *.cc file (by the way, as-is, you have a static const bool which needs a definition and a pure header solution is not an option)
>
> Paolo.
>
>
Attached is a patch with just a subset of the full patch. I moved the
is_monotonic static member var and the "now()" static member function
to chrono.cc. I tried to model it after mutex and condition_variable
but linking anything against libstdc++.so gives two linker error's.
(Note that, on my x86_64 machine, the configuration does define
_GLIBCXX_USE_GETTIMEOFDAY)
libstdc++.so: undefined reference to
'std::common_type<std::chrono::duration<long, std::ratio<1l, 1l> >,
std::chrono::duration<long, std::ratio<1l, 1000000l> > >::type
std::chrono::operator+<long, std::ratio<1l, 1l>, long, std::ratio<1l,
1000000l> >(std::chrono::duration<long, std::ratio<1l, 1l> > const&,
std::chrono::duration<long, std::ratio<1l, 1000000l> > const&)'
libstdc++.so: undefined reference to
'std::common_type<std::chrono::duration<long, std::ratio<1l, 1000000l>
>, std::chrono::duration<long, std::ratio<1l, 1000000l> > >::type
std::chrono::operator+<long, std::ratio<1l, 1000000l>, long,
std::ratio<1l, 1000000l> >(std::chrono::duration<long, std::ratio<1l,
1000000l> > const&, std::chrono::duration<long, std::ratio<1l,
1000000l> > const&)'
Sorry for the formatting but basically it can't find operator+ for
durations (the first is the seconds + microseconds). Both additions
are valid so I figure I haven't integrated chrono.cc correctly into
the build system or I'm just doing something silly...
Chris
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: chrono_patch_link_error.txt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080715/c363f6bc/attachment.txt>
More information about the Libstdc++
mailing list