mirror of
https://github.com/tristanpenman/valijson.git
synced 2025-03-03 12:58:03 +01:00
Include <optional> from dedicated file optional.hpp
This commit is contained in:
parent
b1a1120602
commit
20ea506b31
@ -5,16 +5,8 @@
|
||||
#include <stdint.h>
|
||||
#include <sstream>
|
||||
|
||||
// This should be removed once C++17 is widely available
|
||||
#if __has_include(<optional>)
|
||||
# include <optional>
|
||||
namespace opt = std;
|
||||
#else
|
||||
# include <compat/optional.hpp>
|
||||
namespace opt = std::experimental;
|
||||
#endif
|
||||
|
||||
#include <valijson/adapters/adapter.hpp>
|
||||
#include <valijson/internal/optional.hpp>
|
||||
|
||||
namespace valijson {
|
||||
namespace adapters {
|
||||
|
@ -9,15 +9,8 @@
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
#if __has_include(<optional>)
|
||||
# include <optional>
|
||||
namespace opt = std;
|
||||
#else
|
||||
# include <compat/optional.hpp>
|
||||
namespace opt = std::experimental;
|
||||
#endif
|
||||
|
||||
#include <valijson/adapters/adapter.hpp>
|
||||
#include <valijson/internal/optional.hpp>
|
||||
|
||||
namespace valijson {
|
||||
namespace internal {
|
||||
|
@ -5,13 +5,7 @@
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
#if __has_include(<optional>)
|
||||
# include <optional>
|
||||
namespace opt = std;
|
||||
#else
|
||||
# include <compat/optional.hpp>
|
||||
namespace opt = std::experimental;
|
||||
#endif
|
||||
#include <valijson/internal/optional.hpp>
|
||||
|
||||
namespace valijson {
|
||||
namespace internal {
|
||||
|
14
include/valijson/internal/optional.hpp
Normal file
14
include/valijson/internal/optional.hpp
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#ifndef __VALIJSON_OPTIONAL_HPP
|
||||
#define __VALIJSON_OPTIONAL_HPP
|
||||
|
||||
// This should be removed once C++17 is widely available
|
||||
#if __has_include(<optional>)
|
||||
# include <optional>
|
||||
namespace opt = std;
|
||||
#else
|
||||
# include <compat/optional.hpp>
|
||||
namespace opt = std::experimental;
|
||||
#endif
|
||||
|
||||
#endif
|
@ -6,16 +6,8 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
// This should be removed once C++17 is widely available
|
||||
#if __has_include(<optional>)
|
||||
# include <optional>
|
||||
namespace opt = std;
|
||||
#else
|
||||
# include <compat/optional.hpp>
|
||||
namespace opt = std::experimental;
|
||||
#endif
|
||||
|
||||
#include <valijson/constraints/constraint.hpp>
|
||||
#include <valijson/internal/optional.hpp>
|
||||
|
||||
namespace valijson {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user