Loading...
Searching...
No Matches
Classes | Namespaces
attribute.h File Reference

A warpper class to attach a properties to a class via a property struct. The propert expects by default at least a type. More...

#include <type_traits>
#include "concepts/attribute.h"
#include "concepts/convertible.h"
#include "util/attribute_value.h"
#include "core/stringconvert.h"

Go to the source code of this file.

Classes

struct  attribute< PROP >
 Attributes for non-scalars (leverage inheritance) More...
 

Namespaces

namespace  bbm
 

Macros

Friend operators with attributes

Handle the case of 'scalar OP attribute' by explicitely casting attribute to its value.

#define BBM_ATTR_POST(OP)   template<typename U, typename P> requires std::is_scalar_v<U> inline constexpr auto operator OP (U&& u, const attribute<P>& a) { return (std::forward<U>(u) OP a.value()); }
 

Detailed Description

A warpper class to attach a properties to a class via a property struct. The propert expects by default at least a type.

Macro Definition Documentation

◆ BBM_ATTR_POST

#define BBM_ATTR_POST (   OP)    template<typename U, typename P> requires std::is_scalar_v<U> inline constexpr auto operator OP (U&& u, const attribute<P>& a) { return (std::forward<U>(u) OP a.value()); }