]> www.ginac.de Git - ginac.git/blobdiff - ginac/container.pl
- Cleanups: My evil plot of making ex::bp private may finally be carried
[ginac.git] / ginac / container.pl
index 8374b9b9065cc8c5563d57b2f9b33938603fe214..8004383a3a1d995b59a022ca3bc391192a6dead5 100755 (executable)
@@ -271,24 +271,12 @@ protected:
 
 // utility functions
 
-/** Return the ${CONTAINER} object handled by an ex.  Deprecated: use ex_to<${CONTAINER}>().
- *  This is unsafe: you need to check the type first. */
-inline const ${CONTAINER} &ex_to_${CONTAINER}(const ex &e)
-{
-       return static_cast<const ${CONTAINER} &>(*e.bp);
-}
-
 /** Specialization of is_exactly_a<${CONTAINER}>(obj) for ${CONTAINER} objects. */
 template<> inline bool is_exactly_a<${CONTAINER}>(const basic & obj)
 {
        return obj.tinfo()==TINFO_${CONTAINER};
 }
 
-inline ${CONTAINER} &ex_to_nonconst_${CONTAINER}(const ex &e)
-{
-       return static_cast<${CONTAINER} &>(*e.bp);
-}
-
 } // namespace GiNaC
 
 #endif // ndef __GINAC_${CONTAINER_UC}_H__
@@ -495,7 +483,7 @@ ex ${CONTAINER}::subs(const lst & ls, const lst & lr, bool no_pattern) const
 {
        ${STLT} *vp = subschildren(ls, lr, no_pattern);
        if (vp)
-               return this${CONTAINER}(vp).bp->basic::subs(ls, lr, no_pattern);
+               return ex_to<basic>(this${CONTAINER}(vp)).basic::subs(ls, lr, no_pattern);
        else
                return basic::subs(ls, lr, no_pattern);
 }