From 4319ee521b1a82bc631a90136dc02b580563ca40 Mon Sep 17 00:00:00 2001 From: kiritow <1362050620@qq.com> Date: Fri, 23 Jun 2017 11:50:44 +0800 Subject: [PATCH] Add optional. Change IncludeAll Header. --- SDLWrapper/IncludeAll.h | 24 +++++++++++++------ SDLWrapper/{Noncopyable.h => __Noncopyable.h} | 0 SDLWrapper/__Optional.h | 10 ++++++++ 3 files changed, 27 insertions(+), 7 deletions(-) rename SDLWrapper/{Noncopyable.h => __Noncopyable.h} (100%) create mode 100644 SDLWrapper/__Optional.h diff --git a/SDLWrapper/IncludeAll.h b/SDLWrapper/IncludeAll.h index 094bec2..aa7499e 100644 --- a/SDLWrapper/IncludeAll.h +++ b/SDLWrapper/IncludeAll.h @@ -1,11 +1,21 @@ #pragma once -#include "Rect.h" -#include "Point.h" -#include "Renderer.h" -#include "Texture.h" -#include "Surface.h" -#include "Window.h" +/// Sorted by alphabet sequence. Some files are ignored. +#include "ColorMode.h" +#include "Cursor.h" +#include "ErrorViewer.h" #include "Font.h" -#include "Music.h" #include "Log.h" +#include "MessageBox.h" +#include "Music.h" +#include "Point.h" +#include "Rect.h" +#include "Renderer.h" +#include "RGBA.h" +#include "RWOP.h" #include "SDLSystem.h" +#include "SharedLibrary.h" +#include "Sound.h" +#include "Surface.h" +#include "Texture.h" +#include "Timer.h" +#include "Window.h" diff --git a/SDLWrapper/Noncopyable.h b/SDLWrapper/__Noncopyable.h similarity index 100% rename from SDLWrapper/Noncopyable.h rename to SDLWrapper/__Noncopyable.h diff --git a/SDLWrapper/__Optional.h b/SDLWrapper/__Optional.h new file mode 100644 index 0000000..f9978b1 --- /dev/null +++ b/SDLWrapper/__Optional.h @@ -0,0 +1,10 @@ +#pragma once +#include +#include "begin_code.h" +template +using Optional = std::experimental::optional; + +using BadOptionalAccess = std::experimental::bad_optional_access; + +constexpr std::experimental::nullopt_t NullOpt = std::experimental::nullopt; +#include "end_code.h"