Skip to content
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

Replace tl::index_sequence with C++14 std::index_sequence #3404

Merged
Merged
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
4 changes: 0 additions & 4 deletions pkg/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ Files: src/3rdparty/gsl_finally.h
Copyright: 2015 Microsoft Corporation
License: Expat

Files: src/3rdparty/integer_sequence.hpp
Copyright: 2017 by Simon Brand
License: CC0

Files: src/3rdparty/physfs.hpp
Copyright: 2013 Kevin Howell and others
2018 Arthur Brainville (Ybalrid)
Expand Down
70 changes: 0 additions & 70 deletions src/3rdparty/integer_sequence.hpp

This file was deleted.

6 changes: 3 additions & 3 deletions src/quickjs_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ MSVC_PRAGMA(warning( pop ))
#pragma GCC diagnostic pop
#endif
#include "3rdparty/gsl_finally.h"
#include "3rdparty/integer_sequence.hpp"
#include <utility>

// Alternatives for C++ - can't use the JS_CFUNC_DEF / JS_CGETSET_DEF / etc defines
// #define JS_CFUNC_DEF(name, length, func1) { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, 0, .u = { .func = { length, JS_CFUNC_generic, { .generic = func1 } } } }
Expand Down Expand Up @@ -2126,7 +2126,7 @@ static JSValue callFunction(JSContext *ctx, const std::string &function, std::ve

template<typename...T> struct UnboxTupleIndex;
template<size_t...I, typename...T>
struct UnboxTupleIndex<tl::index_sequence<I...>, T...>
struct UnboxTupleIndex<std::index_sequence<I...>, T...>
{
public:
typedef std::tuple<const wzapi::execution_context&, T...> tuple_type;
Expand Down Expand Up @@ -2164,7 +2164,7 @@ static JSValue callFunction(JSContext *ctx, const std::string &function, std::ve
tuple_ref_type value;
};

template<typename...T> using UnboxTuple = UnboxTupleIndex<tl::make_index_sequence<sizeof...(T)>, T...>;
template<typename...T> using UnboxTuple = UnboxTupleIndex<std::make_index_sequence<sizeof...(T)>, T...>;

MSVC_PRAGMA(warning( push )) // see matching "pop" below
MSVC_PRAGMA(warning( disable : 4189 )) // disable "warning C4189: 'idx': local variable is initialized but not referenced"
Expand Down
Loading