Browse Source

Moved nullopt monostate out of optional

master
Ludovic 'Archivist' Lagouardette 2 years ago
parent
commit
6713b56da6
2 changed files with 8 additions and 3 deletions
  1. +7
    -0
      include/gp/functional/monostates.hpp
  2. +1
    -3
      include/gp/functional/optional.hpp

+ 7
- 0
include/gp/functional/monostates.hpp View File

@ -0,0 +1,7 @@
#pragma once
namespace gp{
struct nullopt_t final{};
constexpr nullopt_t nullopt;
}

+ 1
- 3
include/gp/functional/optional.hpp View File

@ -3,6 +3,7 @@
#include "gp_config.hpp"
#include "gp/functional/bind_front.hpp"
#include "gp/functional/monostates.hpp"
#include "gp/algorithms/move.hpp"
#include "gp/exception.hpp"
@ -10,9 +11,6 @@
#include <new>
namespace gp{
struct nullopt_t final{};
constexpr nullopt_t nullopt;
template<typename T>
class optional final{

Loading…
Cancel
Save