<commit_before>/*
 *  Copyright 2008-2013 NVIDIA Corporation
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

#pragma once

#include <thrust/detail/config.h>
#include <thrust/detail/type_traits.h>
#include <thrust/detail/type_traits/function_traits.h>

#if __cplusplus >= 201103L
// necessary for std::result_of
#include <type_traits>
#endif

namespace thrust
{
namespace detail
{

#if __cplusplus >= 201103L

template<typename Signature>
  struct result_of
{
  using type = typename std::result_of<Signature>::type;
};

#else

template<typename Signature, typename Enable = void> struct result_of;

// specialization for unary invocations of things which have result_type<commit_msg>added additional check for __cpp_lib_result_of_sfinae in case compiler reports a too low _cplusplus version but supports std::result_of<commit_after>/*
 *  Copyright 2008-2013 NVIDIA Corporation
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

#pragma once

#include <thrust/detail/config.h>
#include <thrust/detail/type_traits.h>
#include <thrust/detail/type_traits/function_traits.h>

#if __cplusplus >= 201103L || defined(__cpp_lib_result_of_sfinae)
// necessary for std::result_of
#include <type_traits>
#endif

namespace thrust
{
namespace detail
{

#if __cplusplus >= 201103L || defined(__cpp_lib_result_of_sfinae)

template<typename Signature>
  struct result_of
{
  using type = typename std::result_of<Signature>::type;
};

#else

template<typename Signature, typename Enable = void> struct result_of;

// specialization for unary invocations of things which have result_type
{'fraction_non_alphanumeric': 0.08186687069625095, 'fraction_numerical': 0.018362662586074982, 'mean_word_length': 4.552016985138004, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3853656', 'n_tokens_mistral': 799, 'n_tokens_neox': 745, 'n_words': 281}