mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 08:29:32 -05:00
Add C++14 template types helpers that seems missing in TravisCI MacOSX
This commit is contained in:
parent
da66719b83
commit
fc5ad40c90
@ -495,7 +495,8 @@ HEADERS += util/folderiterator.h \
|
||||
util/rstime.h \
|
||||
util/stacktrace.h \
|
||||
util/rsdeprecate.h \
|
||||
util/cxx11retrocompat.h \
|
||||
util/cxx11retrocompat.h \
|
||||
util/cxx14retrocompat.h \
|
||||
util/cxx17retrocompat.h \
|
||||
util/rsurl.h \
|
||||
util/rserrno.h
|
||||
|
@ -40,6 +40,8 @@
|
||||
#include "serialiser/rsserializable.h"
|
||||
#include "util/rsjson.h"
|
||||
#include "util/rsdebug.h"
|
||||
#include "util/cxx14retrocompat.h"
|
||||
|
||||
|
||||
struct RsTypeSerializer
|
||||
{
|
||||
|
38
libretroshare/src/util/cxx14retrocompat.h
Normal file
38
libretroshare/src/util/cxx14retrocompat.h
Normal file
@ -0,0 +1,38 @@
|
||||
/*******************************************************************************
|
||||
* *
|
||||
* libretroshare < C++14 retro-compatibility helpers *
|
||||
* *
|
||||
* Copyright (C) 2020 Gioacchino Mazzurco <gio@eigenlab.org> *
|
||||
* Copyright (C) 2020 Asociación Civil Altermundi <info@altermundi.net> *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 3 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public License *
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
*******************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#if __cplusplus < 201402L
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace std
|
||||
{
|
||||
template<class T> using decay_t = typename decay<T>::type;
|
||||
|
||||
template<bool B, class T = void>
|
||||
using enable_if_t = typename enable_if<B,T>::type;
|
||||
|
||||
template<class T>
|
||||
using remove_const_t = typename remove_const<T>::type;
|
||||
}
|
||||
#endif // __cplusplus < 201402L
|
Loading…
Reference in New Issue
Block a user