|
|
If the header file is standalone, i.e. doesn't use any fltk headers, you can try using compiler-explorer: https://godbolt.org/
You can find many compilers including g++4, you can also pass `-std=c++98 -pedantic-errors` in the compiler options field. Unfortunately the oldest msvc compiler is v19. So even if it compiles with gcc, you can't be sure it compiles with msvc. For that you might need a virtual machine running some old version of windows. You can find visual studio 6 images as well.
On Saturday, May 6, 2023 at 3:26:14 PM UTC+3 Albrecht Schlosser wrote:
I think I have a
great solution for our limited callback functionality that is
compatible with C++98,
What new capabilities would it provide? Can we see code or
documentation?
but how can I test
that? It uses some extensive and unreadable macros and
requires __VA_ARGS__, which was only "standardised" in C++99,
but most older compiler "just had it".
I don't like macros and "unreadable macros" even less. If your
solution uses non-C++98-standard features we should probably not
include it.
Anyway, the
solution is a header-only file that generates more complex
callbacks on the fly, so simply not including the header would
keep full compatibility.
OK, header-only sounds a bit
better. Nobody needs to compile it. But then we can't have a
test suite and example (demo) programs unless we make sure that
they are compiled only optionally or dependent on C++ standard
version.
My question
is, is there any way to test if my code would compile on old
compilers?
Setting the C++ standard to compile wouldn't help if you know
already that it's not C++ 98 compliant.
Docker can be helpful to test old system environments w/o installing
an entire VM or such. But that wouldn't help with any "exotic"
platforms that don't have this feature and that we don't test
explicitly...
Or should I
just merge it, and we will wait for feedback?
We should at least see the code and vote whether it should be
included. IMHO such non-standard features require a vote by devs.
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/1b827ae1-1562-48cb-8f3c-1103aa66d67dn%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |