Book a Demo

Author Topic: howto c++ template example import and export  (Read 2116 times)

cabongo

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
howto c++ template example import and export
« on: January 08, 2009, 01:31:52 am »
uisng a class model and importing a c++ header and sync model to source differ.

My question: what I have to do? The result after sync doesn't work

Thanks in advance!

e.g.
###############################
imported header:

namespace example
{
        struct stru_1 {
            template<typename T>
            struct stru_2 {
                template<typename F>
                inline T& operator ()(F& obj) const {
                    return do_something<T&>(obj);
                }
                template<typename F>
                inline const T& operator ()(const F& obj) const {
                    return do_something<const T&>(obj);
                }      
            };
        };      
}

###############################
result after sync model to source:
namespace example
{
        struct stru_1 {
            template<typename T>
        struct stru_2 {
                inline const T& operator ()(const F& obj) const {
                    return do_something<T&>(obj);
                }
                inline T& operator ()(F& obj) const {
                    return do_something<const T&>(obj);
                }
            };
        };
}