14#ifndef FORTRAN_COMMON_REFERENCE_H_
15#define FORTRAN_COMMON_REFERENCE_H_
38 operator std::conditional_t<std::is_const_v<type>, type &,
void>()
40 if constexpr (std::is_const_v<type>) {
45 type &get()
const noexcept {
return *p_; }
46 type *operator->()
const {
return p_; }
47 type &operator*()
const {
return *p_; }
49 bool operator==(std::add_const_t<A> &that)
const {
50 return p_ == &that || *p_ == that;
52 bool operator!=(std::add_const_t<A> &that)
const {
return !(*
this == that); }
53 bool operator==(
const Reference &that)
const {
54 return p_ == that.p_ || *
this == *that.p_;
56 bool operator!=(
const Reference &that)
const {
return !(*
this == that); }
Definition: reference.h:18
Definition: bit-population-count.h:20