imneme / pcg-cpp

PCG — C++ Implementation
Apache License 2.0
735 stars 98 forks source link

Support Case Study for C++03? #47

Open lmachucab opened 5 years ago

lmachucab commented 5 years ago

As currently written, it seems impossible to use the library in a compiler in C++03 mode, this despite the library being otherwise a great addition to a C++ codebase as it should work similarly to the already available <random> utilities in C++03's TR1. This also given that for example I was made aware of this library in a blog entry recommending better random utilities for C++ yet in these circumstances the better clear winner against this is a competing C solution that compiles and can be used generically without issues.

Upon initial inspection of an attempted compile with GCC 5 without -std=c++11 switch, the problems that prevent the library from being compiled in C++03 mode can be categorized in three types:

It would be interesting to see a more involved case study of what backporting to C++03 would require; in particular, while I don't have problems trying to edit the headers myself to seek out a better compile, I am not qualified for and wouldn't venture into ensuring that the statistical properties of the utilities are preserved.

(Disclainer: am the author of cxxomfort, a general backports library for C++, and am using the backports myself for the compile tests, so my experience might not reflect an attempted backport "from scratch")

jwakely commented 5 years ago

C++03 and TR1 are both ancient history.

What does "an official backport" for nullptr mean?