Vicente Botet wrote
Hi,
Naming the getters with the same name as the type
chrono::year year() const;
results in a lot of error with gcc <= 4.8.0
../../../boost/chrono/date/ymd_date.hpp:267:7: erreur: declaration of ‘boost::chrono::year boost::chrono::ymd_date::year() const’ [-fpermissive] ../../../boost/chrono/date/year.hpp:36:11: error: changes meaning of ‘year’ from ‘class boost::chrono::year’ [-fpermissive]
When I add -fpermissive I get yet the warning
../../../boost/chrono/date/year.hpp:36:11: attention : changes meaning of ‘year’ from ‘class boost::chrono::year’ [-fpermissive]
Do someone how to get ride of this warning/spam?
In addition, no way to make it working with gcc-4.2.1.
No issue with clang-3.1, 3.2. Not checked with msvc.
Is this a bug on gcc?
Hi, To solve these issues, I have been forced to replace the accessors dt.year() by conversion year(dt). This has the advantage of making uniform the unit specifier syntax. E.g date dt; ... date dt2(year(dt), month(dt), day(13)); Best, Vicente -- View this message in context: http://boost.2283326.n4.nabble.com/chrono-date-name-of-getters-error-changes... Sent from the Boost - Dev mailing list archive at Nabble.com.