Fix for Windows, both oF v0.12.1 / oF v0.12.0 - #3
Merged
Conversation
Contributor
Author
|
Now it's working also on oF v0.12.0 ( the same one to #2. ) |
Owner
|
Thank you! |
Contributor
Author
|
Thank you for merging. As an aside, I myself was troubled by the mixing of |
Contributor
Author
|
I recently confirmed Now it's OK that now using another optional class. FIY, I'm using this in my another project to make #pragma once
#if __cplusplus >= 201703L
#if __has_include(<optional>)
#define USE_STD_OPTIONAL
#endif // __has_include(<optional>)
#endif // __cplusplus >= 201703L
#ifdef USE_STD_OPTIONAL
#include <optional>
#else
#include "nonstd/optional.hpp"
#endif // USE_STD_OPTIONAL
namespace opt { // as you like
#ifdef USE_STD_OPTIONAL
using std::optional;
using std::nullopt;
static std::nullopt_t none = std::nullopt;
#else
using nonstd::optional;
using nonstd::nullopt;
static nonstd::nullopt_t none = nonstd::nullopt;
#endif // USE_STD_OPTIONAL
}
// now you can use optional as opt::optional
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Confirmed working both macOS / Windows oF v0.12.1
( I also confirmed that without
.string()not works on Windows. )