diff --git a/.gitmodules b/.gitmodules index e68787b19f..4e09a75462 100644 --- a/.gitmodules +++ b/.gitmodules @@ -56,9 +56,6 @@ [submodule "cmake/external/SafeInt/safeint"] path = cmake/external/SafeInt/safeint url = https://github.com/dcleblanc/SafeInt.git -[submodule "cmake/external/optional-lite"] - path = cmake/external/optional-lite - url = https://github.com/martinmoene/optional-lite.git [submodule "cmake/external/mp11"] path = cmake/external/mp11 url = https://github.com/boostorg/mp11.git diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index c1368fdcc1..b0a448c18a 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -837,11 +837,6 @@ set(SAFEINT_INCLUDE_DIR ${REPO_ROOT}/cmake/external/SafeInt) add_library(safeint_interface INTERFACE) target_include_directories(safeint_interface INTERFACE ${SAFEINT_INCLUDE_DIR}) -set(OPTIONAL_LITE_INCLUDE_DIR ${REPO_ROOT}/cmake/external/optional-lite/include) -if (onnxruntime_DISABLE_EXCEPTIONS) - add_compile_definitions(optional_CONFIG_NO_EXCEPTIONS=1) -endif() - if (onnxruntime_PREFER_SYSTEM_LIB) find_package(boost_mp11) endif() diff --git a/cmake/external/optional-lite b/cmake/external/optional-lite deleted file mode 160000 index 4acf4553ba..0000000000 --- a/cmake/external/optional-lite +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4acf4553baa886e10e6613fe1452b706b0250e78 diff --git a/include/onnxruntime/core/common/optional.h b/include/onnxruntime/core/common/optional.h index ab32cf6bc5..f7106a3bbf 100644 --- a/include/onnxruntime/core/common/optional.h +++ b/include/onnxruntime/core/common/optional.h @@ -2,23 +2,22 @@ // Licensed under the MIT License. #pragma once - -#include +#include namespace onnxruntime { -using nonstd::optional; +using std::optional; #ifndef ORT_NO_EXCEPTIONS -using nonstd::bad_optional_access; +using std::bad_optional_access; #endif -using nonstd::nullopt; -using nonstd::nullopt_t; +using std::nullopt; +using std::nullopt_t; -using nonstd::in_place; -using nonstd::in_place_t; +using std::in_place; +using std::in_place_t; -using nonstd::make_optional; +using std::make_optional; } // namespace onnxruntime diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index f0f59a771e..793fced048 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -454,7 +454,7 @@ def parse_arguments(): help="Enable operator implemented in language other than cpp") parser.add_argument( "--cmake_generator", - choices=['Visual Studio 15 2017', 'Visual Studio 16 2019', 'Ninja'], + choices=['Visual Studio 15 2017', 'Visual Studio 16 2019', 'Visual Studio 17 2022', 'Ninja'], default='Visual Studio 16 2019' if is_windows() else None, help="Specify the generator that CMake invokes. " "This is only supported on Windows")