blob: ecc8d4441e69d6007c3b4b7a2e3b370df78a017f [file] [log] [blame]
// Part of the Crubit project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#ifndef CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_OPERATORS_H_
#define CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_OPERATORS_H_
#pragma clang lifetime_elision
class AddableConstMember final {
public:
AddableConstMember operator+(const AddableConstMember& rhs) const;
private:
int field_;
};
class AddableNonConstMember final {
public:
AddableNonConstMember operator+(const AddableNonConstMember& rhs);
private:
int field_;
};
class AddableFriend final {
public:
friend AddableFriend operator+(const AddableFriend& lhs,
const AddableFriend& rhs);
private:
int field_;
};
class AddableFreeByConstRef final {};
class AddableFreeByMutRef final {};
class AddableFreeByValue final {};
class AddableFreeByRValueRef final {};
AddableFreeByConstRef operator+(const AddableFreeByConstRef& lhs,
const AddableFreeByConstRef& rhs);
AddableFreeByMutRef operator+(AddableFreeByMutRef& lhs,
AddableFreeByMutRef& rhs);
AddableFreeByValue operator+(AddableFreeByValue lhs, AddableFreeByValue rhs);
AddableFreeByRValueRef operator+(AddableFreeByRValueRef&& lhs,
AddableFreeByRValueRef rhs);
class Overloaded final {};
int operator+(const Overloaded& lhs, int rhs);
int operator+(const Overloaded& lhs, unsigned int rhs);
class IncompatibleLHS final {};
IncompatibleLHS operator+(int lhs, const IncompatibleLHS& rhs);
IncompatibleLHS operator+(int& lhs, const IncompatibleLHS& rhs);
class AddableReturnsVoid final {
public:
void operator+(const AddableReturnsVoid& rhs) const;
private:
int field_;
};
class AddableConstMemberNonunpin final {
public:
AddableConstMemberNonunpin operator+(
const AddableConstMemberNonunpin& rhs) const;
~AddableConstMemberNonunpin() {}
private:
int field_;
};
struct AddAssignMemberInt final {
int operator+=(int rhs);
};
struct AddAssignMemberByConstRef final {
AddAssignMemberByConstRef& operator+=(const AddAssignMemberByConstRef& rhs);
};
struct AddAssignFreeByConstRef final {};
AddAssignFreeByConstRef& operator+=(AddAssignFreeByConstRef& lhs,
const AddAssignFreeByConstRef& rhs);
struct AddAssignFreeByValue final {};
AddAssignFreeByValue& operator+=(AddAssignFreeByValue& lhs,
AddAssignFreeByValue rhs);
struct AddAssignFriendByConstRef final {
friend AddAssignFriendByConstRef& operator+=(
AddAssignFriendByConstRef& lhs, const AddAssignFriendByConstRef& rhs);
};
struct AddAssignFriendByValue final {
friend AddAssignFriendByValue& operator+=(AddAssignFriendByValue& lhs,
AddAssignFriendByValue rhs);
};
struct AddAssignProhibitedConstMember final {
int operator+=(int rhs) const;
};
struct AddAssignProhibitedFriendConstLhs final {
friend int operator+=(const AddAssignProhibitedFriendConstLhs& lhs, int rhs);
};
struct ManyOperators final {
ManyOperators operator+() const;
ManyOperators operator-() const;
ManyOperators operator!() const;
ManyOperators operator~() const;
ManyOperators operator+(const ManyOperators& rhs) const;
ManyOperators operator-(const ManyOperators& rhs) const;
ManyOperators operator*(const ManyOperators& rhs) const;
ManyOperators operator/(const ManyOperators& rhs) const;
ManyOperators operator%(const ManyOperators& rhs) const;
ManyOperators operator&(const ManyOperators& rhs) const;
ManyOperators operator|(const ManyOperators& rhs) const;
ManyOperators operator^(const ManyOperators& rhs) const;
ManyOperators operator<<(const ManyOperators& rhs) const;
ManyOperators operator>>(const ManyOperators& rhs) const;
ManyOperators& operator+=(const ManyOperators& rhs);
ManyOperators& operator-=(const ManyOperators& rhs);
ManyOperators& operator*=(const ManyOperators& rhs);
ManyOperators& operator/=(const ManyOperators& rhs);
ManyOperators& operator%=(const ManyOperators& rhs);
ManyOperators& operator&=(const ManyOperators& rhs);
ManyOperators& operator|=(const ManyOperators& rhs);
ManyOperators& operator^=(const ManyOperators& rhs);
ManyOperators& operator<<=(const ManyOperators& rhs);
ManyOperators& operator>>=(const ManyOperators& rhs);
};
#endif // CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_OPERATORS_H_