Public Member Functions | List of all members
beluga::weight_detail::weight_fn Struct Reference

Customization point object type for accessing the weight of a particle. More...

#include <primitives.hpp>

Public Member Functions

template<class T , std::enable_if_t< std::conjunction_v< has_member_variable_weight< T >, std::negation< has_member_weight< T >>, std::negation< has_non_member_weight< T >>>, int > = 0>
constexpr decltype(auto) operator() (T &&t) const noexcept
 Overload for when the particle type defines a member variable. More...
 
template<class T , std::enable_if_t< std::conjunction_v< std::negation< has_member_variable_weight< T >>, std::negation< has_member_weight< T >>, std::negation< has_non_member_weight< T >>, is_tuple_like< T >, has_single_element< beluga::Weight, std::decay_t< T >>>, int > = 0>
constexpr decltype(auto) operator() (T &&t) const noexcept(noexcept(element< beluga::Weight >(std::forward< T >(t))))
 Overload for tuple-like types. More...
 
template<class T , std::enable_if_t< std::conjunction_v< std::negation< has_member_variable_weight< T >>, has_member_weight< T >, std::negation< has_non_member_weight< T >>>, int > = 0>
constexpr decltype(auto) operator() (T &&t) const noexcept(noexcept(std::forward< T >(t).weight()))
 Overload for when the particle type defines a member method. More...
 
template<class T , std::enable_if_t< std::conjunction_v< std::negation< has_member_variable_weight< T >>, std::negation< has_member_weight< T >>, has_non_member_weight< T >>, int > = 0>
constexpr decltype(auto) operator() (T &&t) const noexcept(noexcept(weight(std::forward< T >(t))))
 Overload for when there is an external function that takes this particle type. More...
 

Detailed Description

Customization point object type for accessing the weight of a particle.

See https://en.cppreference.com/w/cpp/ranges/cpo.

Definition at line 202 of file primitives.hpp.

Member Function Documentation

◆ operator()() [1/4]

template<class T , std::enable_if_t< std::conjunction_v< has_member_variable_weight< T >, std::negation< has_member_weight< T >>, std::negation< has_non_member_weight< T >>>, int > = 0>
constexpr decltype(auto) beluga::weight_detail::weight_fn::operator() ( T &&  t) const
inlineconstexprnoexcept

Overload for when the particle type defines a member variable.

Definition at line 212 of file primitives.hpp.

◆ operator()() [2/4]

template<class T , std::enable_if_t< std::conjunction_v< std::negation< has_member_variable_weight< T >>, std::negation< has_member_weight< T >>, std::negation< has_non_member_weight< T >>, is_tuple_like< T >, has_single_element< beluga::Weight, std::decay_t< T >>>, int > = 0>
constexpr decltype(auto) beluga::weight_detail::weight_fn::operator() ( T &&  t) const
inlineconstexprnoexcept

Overload for tuple-like types.

Definition at line 256 of file primitives.hpp.

◆ operator()() [3/4]

template<class T , std::enable_if_t< std::conjunction_v< std::negation< has_member_variable_weight< T >>, has_member_weight< T >, std::negation< has_non_member_weight< T >>>, int > = 0>
constexpr decltype(auto) beluga::weight_detail::weight_fn::operator() ( T &&  t) const
inlineconstexprnoexcept

Overload for when the particle type defines a member method.

Definition at line 225 of file primitives.hpp.

◆ operator()() [4/4]

template<class T , std::enable_if_t< std::conjunction_v< std::negation< has_member_variable_weight< T >>, std::negation< has_member_weight< T >>, has_non_member_weight< T >>, int > = 0>
constexpr decltype(auto) beluga::weight_detail::weight_fn::operator() ( T &&  t) const
inlineconstexprnoexcept

Overload for when there is an external function that takes this particle type.

The non-member function must be in T's namespace so it can be found by ADL.

Definition at line 241 of file primitives.hpp.


The documentation for this struct was generated from the following file:


beluga
Author(s):
autogenerated on Tue Jul 16 2024 02:59:54