dsdlc: fixed linker error (multiple definitions)

This commit is contained in:
Pavel Kirienko
2015-07-11 13:51:01 +03:00
parent fc3f0808a6
commit 1b7ff0693f
@@ -181,14 +181,14 @@ public:
* If the union is set to another type, returns null pointer. * If the union is set to another type, returns null pointer.
*/ */
template <typename Tag::Type T> template <typename Tag::Type T>
const typename TagToType<T>::StorageType* as() const; inline const typename TagToType<T>::StorageType* as() const;
/** /**
* Switches the union to the given type and returns a mutable reference to the appropriate field. * Switches the union to the given type and returns a mutable reference to the appropriate field.
* If the previous type was different, a default constructor will be called first. * If the previous type was different, a default constructor will be called first.
*/ */
template <typename Tag::Type T> template <typename Tag::Type T>
typename TagToType<T>::StorageType& to(); inline typename TagToType<T>::StorageType& to();
% endif % endif
<!--(end)--> <!--(end)-->
@@ -362,7 +362,7 @@ struct ${scope_prefix}<0>::TagToType<${scope_prefix}<0>::Tag::${a.name}>
template <> template <>
template <> template <>
const typename ${scope_prefix}<0>::TagToType< ${scope_prefix}<0>::Tag::${a.name} >::StorageType* inline const typename ${scope_prefix}<0>::TagToType< ${scope_prefix}<0>::Tag::${a.name} >::StorageType*
${scope_prefix}<0>::as< ${scope_prefix}<0>::Tag::${a.name} >() const ${scope_prefix}<0>::as< ${scope_prefix}<0>::Tag::${a.name} >() const
{ {
return is(${scope_prefix}<0>::Tag::${a.name}) ? &${a.name} : NULL; return is(${scope_prefix}<0>::Tag::${a.name}) ? &${a.name} : NULL;
@@ -370,7 +370,7 @@ ${scope_prefix}<0>::as< ${scope_prefix}<0>::Tag::${a.name} >() const
template <> template <>
template <> template <>
typename ${scope_prefix}<0>::TagToType< ${scope_prefix}<0>::Tag::${a.name} >::StorageType& inline typename ${scope_prefix}<0>::TagToType< ${scope_prefix}<0>::Tag::${a.name} >::StorageType&
${scope_prefix}<0>::to< ${scope_prefix}<0>::Tag::${a.name} >() ${scope_prefix}<0>::to< ${scope_prefix}<0>::Tag::${a.name} >()
{ {
if (_tag_ != ${idx}) if (_tag_ != ${idx})