cppbind: fix exporting integer_sequence and small codingstyle fixes
This commit is contained in:
@@ -9,6 +9,7 @@ set(HEADERS
|
||||
SVGpreserveAspectRatio.hxx
|
||||
argparse.hxx
|
||||
interpolator.hxx
|
||||
integer_sequence.hxx
|
||||
make_new.hxx
|
||||
sg_dir.hxx
|
||||
sg_hash.hxx
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef SIMGEAR_MISC_INTEGER_SEQUENCE_HXX_
|
||||
#define SIMGEAR_MISC_INTEGER_SEQUENCE_HXX_
|
||||
|
||||
#include <simgear_config.h>
|
||||
#include <simgear/simgear_config.h>
|
||||
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
@@ -48,7 +48,7 @@ namespace simgear { namespace detail
|
||||
template<class T, class Seq, T El>
|
||||
struct append;
|
||||
|
||||
template<class T, T ... Ints, T Int>
|
||||
template<class T, T... Ints, T Int>
|
||||
struct append<T, std::integer_sequence<T, Ints...>, Int>
|
||||
{
|
||||
using type = std::integer_sequence<T, Ints..., Int>;
|
||||
|
||||
@@ -8,13 +8,13 @@ void print(const T& v, std::size_t i)
|
||||
std::cout << "arg #" << i << ": '" << v << "', ";
|
||||
}
|
||||
|
||||
template<typename ... Args, std::size_t ... Is>
|
||||
template<class... Args, std::size_t... Is>
|
||||
void doIt_impl(Args ... args, std::index_sequence<Is...>)
|
||||
{
|
||||
std::initializer_list<char>{(print(args, Is), '0')...};
|
||||
}
|
||||
|
||||
template<typename ... Args>
|
||||
template<class... Args>
|
||||
void doIt(Args ... args)
|
||||
{
|
||||
static_assert(sizeof...(Args) == std::index_sequence_for<Args...>::size(), "");
|
||||
|
||||
@@ -44,14 +44,14 @@ namespace nasal
|
||||
String newString(const char* str);
|
||||
|
||||
/** Create a new nasal vector and fill it with the given values */
|
||||
template<class ... Vals>
|
||||
template<class... Vals>
|
||||
naRef newVector(Vals ... vals)
|
||||
{
|
||||
return newVector({to_nasal(vals)...});
|
||||
}
|
||||
|
||||
/** Raise a nasal runtime error */
|
||||
template<class ... Args>
|
||||
template<class... Args>
|
||||
void runtimeError(const char* fmt, Args ... args) const
|
||||
{
|
||||
naRuntimeError(c_ctx(), fmt, args...);
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace nasal
|
||||
|
||||
bool valid() const;
|
||||
|
||||
template<class Ret, class ... Args>
|
||||
template<class Ret, class... Args>
|
||||
Ret callMethod(const std::string& name, Args ... args)
|
||||
{
|
||||
if( !_nasal_impl.valid() )
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace simgear
|
||||
*
|
||||
* @tparam Sig Function signature.
|
||||
*/
|
||||
template<class Ret, class ... Args>
|
||||
template<class Ret, class... Args>
|
||||
class function_list<Ret(Args...)>:
|
||||
public std::vector<boost::function<Ret(Args...)>>
|
||||
{
|
||||
@@ -54,7 +54,7 @@ namespace simgear
|
||||
* Handle a list of callbacks with the same signature as the given
|
||||
* boost::function type.
|
||||
*/
|
||||
template<class Ret, class ... Args>
|
||||
template<class Ret, class... Args>
|
||||
class function_list<boost::function<Ret(Args...)>>:
|
||||
public function_list<Ret(Args...)>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user