You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe that OF_USE_MINIMAL_STD is a best-effort way to maintain compatibility. However, I think it would be good to provide a method to disable it entirely as well.
For example, like the following:
#ifndef OF_DISABLE_INCLUDE_STD
#ifdef OF_LEGACY_INCLUDE_STD
using namespace std;
#else
// this will eventually be disabled by default
#define OF_USE_MINIMAL_STD
#ifdef OF_USE_MINIMAL_STD
using std::cout;
using std::deque;
using std::endl;
using std::make_shared;
using std::map;
using std::max;
using std::pair;
using std::shared_ptr;
using std::string;
using std::stringstream;
using std::swap;
using std::to_string;
using std::vector;
using std::weak_ptr;
#endif // OF_USE_MINIMAL_STD
#endif // OF_LEGACY_INCLUDE_STD
#endif // ifndef OF_DISABLE_INCLUDE_STD
This is a method that ignores both using statements by defining OF_DISABLE_INCLUDE_STD.
Is there a better approach?
The text was updated successfully, but these errors were encountered:
2bbb
changed the title
Disabling OF_USE_MINIMAL_STD
How to Disable Both OF_LEGACY_INCLUDE_STD and OF_USE_MINIMAL_STD
Mar 1, 2025
@2bbb yes this was a compromise to immediately get the bad byte and other conflicts out of the way, while providing a "manual" access point for updating core with no using. the idea is to make these opt-in, so the temporary line #define OF_USE_MINIMAL_STD will be removed after the next release (12.1), then the conditionals will make more sense.
I believe that OF_USE_MINIMAL_STD is a best-effort way to maintain compatibility. However, I think it would be good to provide a method to disable it entirely as well.
For example, like the following:
This is a method that ignores both
using
statements by definingOF_DISABLE_INCLUDE_STD
.Is there a better approach?
The text was updated successfully, but these errors were encountered: