I have std::chrono::duration< Rep, Period >
, and I understand that Rep is pertaining to what format you want the duration count to be transcribed in and Period is an std::ratio< n, d> where the numerator is the amount of seconds and the denominator is the amount to get a single unit. But as I'm looking over the internet, I find std::chrono::duration < int , std::ratio<60, 1>> minute ( 60 );
says
Expected parameter declarator [ missing_param ]
when I look at reference std::chrono::milliseconds has two properties, rep and period.
the exact code is
#include <string>
#include <chrono>
#include <ratio>
class object {
private:
std::string location ;
std::chrono::milliseconds creation(30) ;
protected:
public:
};
when I put this in, std::chrono::milliseconds<int , std::ratio<1,1000>> creation;
and an error likes this shoots out
Expected member name or ';'
now keeping in consideration that just making an instance of this with no params creates the error
In template: no member named 'value' in 'std::chrono::__is_duration'
code looks something similar to std::chrono::miliseconds creation;
I'm using Ale for VIM to get the errors, i believe ALE returns it's own variations of GNU CPP Compiler. I could be mistaken. Ale is a linter.