ben_scott1.py 555 B

1234567891011121314151617
  1. # Copyright David Abrahams 2004. Distributed under the Boost
  2. # Software License, Version 1.0. (See accompanying
  3. # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. # This regression test checks that call_method<T>(...) where T is a
  5. # non-reference, non-pointer type that happens to be held inside the
  6. # result object (and thus is found as an lvalue) works.
  7. from ben_scott1_ext import *
  8. class CreatorImpl(Creator):
  9. def create(self):
  10. return Product()
  11. factory = Factory()
  12. c = CreatorImpl()
  13. factory.reg(c)
  14. a = factory.create()