X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Frelational.h;h=7426e19ecea8af712554ba7ba9575fa1fc179e86;hp=6f5009df33998a28498dfad456aaf2012dfdac0a;hb=0a68f1165c65a61d6f6ab6ef47485c9c8193b560;hpb=66c0f31c678e6c1938d637636b230ea376c157c1 diff --git a/ginac/relational.h b/ginac/relational.h index 6f5009df..7426e19e 100644 --- a/ginac/relational.h +++ b/ginac/relational.h @@ -1,7 +1,8 @@ /** @file relational.h * - * Interface to relations between expressions. - * + * Interface to relations between expressions. */ + +/* * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify @@ -25,6 +26,8 @@ #include #include +namespace GiNaC { + /** This class holds a relation consisting of two expressions and a logical * relation between them. */ class relational : public basic @@ -94,8 +97,12 @@ protected: extern const relational some_relational; extern type_info const & typeid_relational; -#define ex_to_relational(X) static_cast(*(X).bp) - -#endif // ndef __GINAC_RELATIONAL_H__ +// utility functions +inline const relational &ex_to_relational(const ex &e) +{ + return static_cast(*e.bp); +} +} // namespace GiNaC +#endif // ndef __GINAC_RELATIONAL_H__