Newest C++ standard allowed for inclusion in plugin library?

I see that the plugin SDK uses -std=c++11, is it allowed to go higher than that and have the code in the VCV plugin library?

1 Like

I think this question rather answers itself. When you build a plugin, you don’t uses your own custom makefile, you use the standard, and it determines the flags.

Using features unavailable in C++11 would mean your plugin is nonstandard with respect to anyone other than you building it. And I’m really not sure what is in post C+±11 that’s essential to express something essential.

Right, good point. :wink:

Well, so far there hasn’t been anything from C++17 that I would have absolutely needed while developing a VCV plugin, but the need (or want) could arise at some point. Perhaps VCV Rack itself starts using a newer standard at some point.

A plugin Makefile is capable of modifying flags with something like

CXXFLAGS := $(filter-out -std=c++11,$(CXXFLAGS))
CXXFLAGS += -std=c++20

but you must use C++11 if you want to distribute your plugin to other users due to compiler versions used by my build system. Remember that plugins must be built with libstdc++ 5.4.0 on Linux, which I doubt supports C++20. Not sure about C++14 or 17.

1 Like