mirror of https://github.com/KLayout/klayout.git
Added more declarations for gcc in release mode
This commit is contained in:
parent
b6a1d035de
commit
279342e61a
|
|
@ -229,5 +229,17 @@ inline LayerProperties &operator+= (LayerProperties &props, const LayerOffset &o
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Special extractors for LayerProperties and LayerOffset
|
||||
*/
|
||||
namespace tl
|
||||
{
|
||||
template<> DB_PUBLIC void extractor_impl<db::LayerProperties> (tl::Extractor &ex, db::LayerProperties &p);
|
||||
template<> DB_PUBLIC void extractor_impl<db::LayerOffset> (tl::Extractor &ex, db::LayerOffset &p);
|
||||
|
||||
template<> DB_PUBLIC bool test_extractor_impl<db::LayerProperties> (tl::Extractor &ex, db::LayerProperties &p);
|
||||
template<> DB_PUBLIC bool test_extractor_impl<db::LayerOffset> (tl::Extractor &ex, db::LayerOffset &p);
|
||||
} // namespace tl
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -2671,6 +2671,7 @@ namespace tl
|
|||
template<> DB_PUBLIC void extractor_impl (tl::Extractor &ex, db::CplxTrans &t);
|
||||
template<> DB_PUBLIC void extractor_impl (tl::Extractor &ex, db::VCplxTrans &t);
|
||||
template<> DB_PUBLIC void extractor_impl (tl::Extractor &ex, db::DCplxTrans &t);
|
||||
template<> DB_PUBLIC void extractor_impl (tl::Extractor &ex, db::ICplxTrans &t);
|
||||
|
||||
template<> DB_PUBLIC bool test_extractor_impl (tl::Extractor &ex, db::UnitTrans &t);
|
||||
template<> DB_PUBLIC bool test_extractor_impl (tl::Extractor &ex, db::DUnitTrans &t);
|
||||
|
|
@ -2683,6 +2684,7 @@ namespace tl
|
|||
template<> DB_PUBLIC bool test_extractor_impl (tl::Extractor &ex, db::CplxTrans &t);
|
||||
template<> DB_PUBLIC bool test_extractor_impl (tl::Extractor &ex, db::VCplxTrans &t);
|
||||
template<> DB_PUBLIC bool test_extractor_impl (tl::Extractor &ex, db::DCplxTrans &t);
|
||||
template<> DB_PUBLIC bool test_extractor_impl (tl::Extractor &ex, db::ICplxTrans &t);
|
||||
|
||||
} // namespace tl
|
||||
|
||||
|
|
|
|||
|
|
@ -44,14 +44,14 @@ static std::locale c_locale ("C");
|
|||
// -------------------------------------------------------------------------
|
||||
// Exception classes
|
||||
|
||||
ExtractorNotImplementedException::ExtractorNotImplementedException ()
|
||||
: Exception (tl::to_string (tr ("No string extractor available")))
|
||||
ExtractorNotImplementedException::ExtractorNotImplementedException (const std::type_info &ti)
|
||||
: Exception (tl::to_string (tr ("No string extractor available for type: ")) + ti.name ())
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
StringConversionException::StringConversionException ()
|
||||
: Exception (tl::to_string (tr ("No string conversion available")))
|
||||
StringConversionException::StringConversionException (const std::type_info &ti)
|
||||
: Exception (tl::to_string (tr ("No string conversion available for type: ")) + ti.name ())
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include "tlCommon.h"
|
||||
|
||||
#include <string>
|
||||
#include <typeinfo>
|
||||
#include <stdexcept>
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
|
|
@ -48,7 +49,7 @@ class TL_PUBLIC ExtractorNotImplementedException
|
|||
: public tl::Exception
|
||||
{
|
||||
public:
|
||||
ExtractorNotImplementedException ();
|
||||
ExtractorNotImplementedException (const std::type_info &ti);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -58,12 +59,12 @@ class TL_PUBLIC StringConversionException
|
|||
: public tl::Exception
|
||||
{
|
||||
public:
|
||||
StringConversionException ();
|
||||
StringConversionException (const std::type_info &ti);
|
||||
};
|
||||
|
||||
class Extractor;
|
||||
template <class T> void extractor_impl (tl::Extractor &, T &) { throw ExtractorNotImplementedException (); }
|
||||
template <class T> bool test_extractor_impl (tl::Extractor &, T &) { throw ExtractorNotImplementedException (); }
|
||||
template <class T> void extractor_impl (tl::Extractor &, T &) { throw ExtractorNotImplementedException (typeid (T)); }
|
||||
template <class T> bool test_extractor_impl (tl::Extractor &, T &) { throw ExtractorNotImplementedException (typeid (T)); }
|
||||
|
||||
/**
|
||||
* @brief Another string class
|
||||
|
|
@ -289,7 +290,7 @@ TL_PUBLIC std::string to_local (const std::string &s);
|
|||
|
||||
template <class T, bool> struct __redirect_to_string;
|
||||
template <class T> struct __redirect_to_string<T, true> { static std::string to_string (const T &t) { return t.to_string (); } };
|
||||
template <class T> struct __redirect_to_string<T, false> { static std::string to_string (const T &) { throw StringConversionException (); } };
|
||||
template <class T> struct __redirect_to_string<T, false> { static std::string to_string (const T &) { throw StringConversionException (typeid (T)); } };
|
||||
template <class T> inline std::string to_string (const T &o) { return __redirect_to_string<T, tl::has_to_string<T>::value>::to_string (o); }
|
||||
|
||||
template <> inline std::string to_string (const double &d) { return to_string (d, 12); }
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ namespace tl
|
|||
|
||||
class Extractor;
|
||||
class EvalClass;
|
||||
template <class T> void extractor_impl (tl::Extractor &, T &);
|
||||
template <class T> bool test_extractor_impl (tl::Extractor &, T &);
|
||||
|
||||
/**
|
||||
* @brief A base class which describes a class, i.e. an object capable of converting and handling void *
|
||||
|
|
@ -1662,6 +1664,12 @@ template<> inline bool Variant::can_convert_to<const char *> () const {
|
|||
*/
|
||||
void initialize_variant_class_table ();
|
||||
|
||||
/**
|
||||
* @brief Special extractors for Variant
|
||||
*/
|
||||
template<> TL_PUBLIC void extractor_impl<Variant> (tl::Extractor &ex, Variant &v);
|
||||
template<> TL_PUBLIC bool test_extractor_impl<Variant> (tl::Extractor &ex, Variant &v);
|
||||
|
||||
} // namespace tl
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue