From 1025c361539856bc5fe2bc6f3b1c7aa90d9b5ed9 Mon Sep 17 00:00:00 2001 From: Peter Conrad Date: Mon, 3 Jun 2019 13:57:21 +0200 Subject: [PATCH] Replaced fc::nullptr_t with std::nullptr_t --- include/fc/log/logger.hpp | 5 +++-- include/fc/utility.hpp | 1 - include/fc/variant.hpp | 3 ++- src/log/logger.cpp | 2 +- src/variant.cpp | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/fc/log/logger.hpp b/include/fc/log/logger.hpp index 0d29eb8..2ddfebf 100644 --- a/include/fc/log/logger.hpp +++ b/include/fc/log/logger.hpp @@ -3,6 +3,7 @@ #include #include #include +#include #include namespace fc @@ -30,8 +31,8 @@ namespace fc ~logger(); logger& operator=(const logger&); logger& operator=(logger&&); - friend bool operator==( const logger&, nullptr_t ); - friend bool operator!=( const logger&, nullptr_t ); + friend bool operator==( const logger&, std::nullptr_t ); + friend bool operator!=( const logger&, std::nullptr_t ); logger& set_log_level( log_level e ); log_level get_log_level()const; diff --git a/include/fc/utility.hpp b/include/fc/utility.hpp index 7c7983c..ff3c604 100644 --- a/include/fc/utility.hpp +++ b/include/fc/utility.hpp @@ -17,7 +17,6 @@ namespace fc { using std::size_t; - typedef decltype(nullptr) nullptr_t; struct true_type { enum _value { value = 1 }; }; struct false_type { enum _value { value = 0 }; }; diff --git a/include/fc/variant.hpp b/include/fc/variant.hpp index 58e54ad..279b7de 100644 --- a/include/fc/variant.hpp +++ b/include/fc/variant.hpp @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include #include @@ -212,7 +213,7 @@ namespace fc /// Constructs a null_type variant variant(); /// Constructs a null_type variant - variant( nullptr_t, uint32_t max_depth = 1 ); + variant( std::nullptr_t, uint32_t max_depth = 1 ); /// @param str - UTF8 string variant( const char* str, uint32_t max_depth = 1 ); diff --git a/src/log/logger.cpp b/src/log/logger.cpp index b8743b9..019793b 100644 --- a/src/log/logger.cpp +++ b/src/log/logger.cpp @@ -28,7 +28,7 @@ namespace fc { logger::logger() :my( new impl() ){} - logger::logger(nullptr_t){} + logger::logger(std::nullptr_t){} logger::logger( const string& name, const logger& parent ) :my( new impl() ) diff --git a/src/variant.cpp b/src/variant.cpp index 026e2ab..d823f32 100644 --- a/src/variant.cpp +++ b/src/variant.cpp @@ -28,7 +28,7 @@ variant::variant() set_variant_type( this, null_type ); } -variant::variant( fc::nullptr_t, uint32_t max_depth ) +variant::variant( std::nullptr_t, uint32_t max_depth ) { set_variant_type( this, null_type ); }