The issue of using the increase timer

I have a really simple question, but I cannot find an answer for it. I think I'm missing something in using boost timer.hpp. Here is my code, which unfortunately gives me an error message:

#include <boost/timer.hpp>

int main() {
    boost::timer t;
}

And the error messages look like this:

/usr/include/boost/timer.hpp: In member function ‘double boost::timer::elapsed_max() const’:
/usr/include/boost/timer.hpp:59: error: ‘numeric_limits’ is not a member of ‘std’
/usr/include/boost/timer.hpp:59: error:::max’ has not been declared
/usr/include/boost/timer.hpp:59: error: expected primary-expression before ‘double’
/usr/include/boost/timer.hpp:59: error: expected `)' before ‘double’

The library used is activated 1.36 (SUSE 11.1).

Thanks in advance!

+3
source share
2 answers

On the side of the note should be fine, are you sure you are typing #includeinstead include?

You do not need, but you can also try:

#include <limits>

Before turning on boost, it seems that you can fix at least some of your problems.

+3
source

, , , g++ Boost 1.4.2 Windows. g++? g++ --version. , - max, , .

0

Source: https://habr.com/ru/post/1743832/


All Articles