<commit_before>//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// UNSUPPORTED: c++98, c++03

// <functional>

// template<class T> struct is_bind_expression

#include <functional>
#include "test_macros.h"

template <bool Expected, class T>
void
test(const T&)
{
    static_assert(std::is_bind_expression<T>::value == Expected, "");
#if TEST_STD_VER > 14
    static_assert(std::is_bind_expression_v<T> == Expected, "");
#endif
}

struct C {};

int main(int, char**)
{
    test<true>(std::bind(C()));
    test<true>(std::bind(C(), std::placeholders::_2));<commit_msg>Make the test object callable. libstdc++'s bind checks that (libc++ currently does not). Thanks to <NAME> for the fix.<commit_after>//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// UNSUPPORTED: c++98, c++03

// <functional>

// template<class T> struct is_bind_expression

#include <functional>
#include "test_macros.h"

template <bool Expected, class T>
void
test(const T&)
{
    static_assert(std::is_bind_expression<T>::value == Expected, "");
#if TEST_STD_VER > 14
    static_assert(std::is_bind_expression_v<T> == Expected, "");
#endif
}

struct C {int operator()(...) const { return 0; }};

int main(int, char**)
{
    test<true>(std::bind(C()));
    test<true>(std::bind(C(), std::placeholders::_2));
{'fraction_non_alphanumeric': 0.3086548488008342, 'fraction_numerical': 0.011991657977059436, 'mean_word_length': 2.2803418803418802, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 22, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '4945427', 'n_tokens_mistral': 587, 'n_tokens_neox': 576, 'n_words': 140}