Skip to content

Native std::optional (from C++17) #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/bindings/em/auto-wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#include <emscripten/val.h>
#include "flat_set.h"
#include "marker-index.h"
#include "optional.h"
#include <optional>
using std::optional;
#include "point.h"
#include "text.h"

Expand Down
3 changes: 2 additions & 1 deletion src/bindings/marker-index-wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#include "marker-index.h"
#include "nan.h"
#include "noop.h"
#include "optional.h"
#include <optional>
using std::optional;
#include "point-wrapper.h"
#include "range.h"

Expand Down
3 changes: 2 additions & 1 deletion src/bindings/marker-index-wrapper.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "nan.h"
#include "marker-index.h"
#include "optional.h"
#include <optional>
using std::optional;
#include "range.h"

class MarkerIndexWrapper : public Nan::ObjectWrap {
Expand Down
3 changes: 2 additions & 1 deletion src/bindings/number-conversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#define SUPERSTRING_NUMBER_CONVERSION_H

#include "nan.h"
#include "optional.h"
#include <optional>
using std::optional;

namespace number_conversion {
template<typename T>
Expand Down
3 changes: 2 additions & 1 deletion src/bindings/point-wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#define SUPERSTRING_POINT_WRAPPER_H

#include "nan.h"
#include "optional.h"
#include <optional>
using std::optional;
#include "point.h"

class PointWrapper : public Nan::ObjectWrap {
Expand Down
3 changes: 2 additions & 1 deletion src/bindings/range-wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#define SUPERSTRING_RANGE_WRAPPER_H

#include "nan.h"
#include "optional.h"
#include <optional>
using std::optional;
#include "point.h"
#include "range.h"

Expand Down
3 changes: 2 additions & 1 deletion src/bindings/string-conversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

#include <string>
#include "nan.h"
#include "optional.h"
#include <optional>
using std::optional;
#include "text.h"

namespace string_conversion {
Expand Down
3 changes: 2 additions & 1 deletion src/core/encoding-conversion.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#ifndef SUPERSTRING_ENCODING_CONVERSION_H_
#define SUPERSTRING_ENCODING_CONVERSION_H_

#include "optional.h"
#include <optional>
using std::optional;
#include "text.h"
#include <stdio.h>

Expand Down
29 changes: 0 additions & 29 deletions src/core/optional.h

This file was deleted.

3 changes: 2 additions & 1 deletion src/core/patch.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "patch.h"
#include "optional.h"
#include <optional>
using std::optional;
#include "text.h"
#include "text-slice.h"
#include <assert.h>
Expand Down
3 changes: 2 additions & 1 deletion src/core/patch.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#ifndef PATCH_H_
#define PATCH_H_

#include "optional.h"
#include <optional>
using std::optional;
#include "point.h"
#include "serializer.h"
#include "text.h"
Expand Down
3 changes: 2 additions & 1 deletion src/core/regex.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#ifndef REGEX_H_
#define REGEX_H_

#include "optional.h"
#include <optional>
using std::optional;
#include <string>

struct pcre2_real_code_16;
Expand Down
3 changes: 2 additions & 1 deletion src/core/text.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#include <ostream>
#include "serializer.h"
#include "point.h"
#include "optional.h"
#include <optional>
using std::optional;

class TextSlice;

Expand Down