boostorg / chrono

Boost.org chrono module
http://boost.org/libs/chrono
15 stars 52 forks source link

-Wzero-as-null-pointer-constant leads to compiler error in g++ #48

Open joernschellhaas opened 4 years ago

joernschellhaas commented 4 years ago

As of boost 1.72, I'm getting "error: zero as null pointer constant" when using e.g. boost::chrono::milliseconds. This can IMO be fixed by using nullptr instead.

I've spotted the following places, but there might be more:

viboes commented 4 years ago

Boost is compatible with C++98.

A PR is more than welcome if you manage with this fact.

joernschellhaas commented 4 years ago

Seems that NULL can be used to ensure compatibility. Not sure if I'll create a PR.