Vaucanson  1.4.1
monoid_rep.hxx
1 // monoid_rep.hxx: this file is part of the Vaucanson project.
2 //
3 // Vaucanson, a generic library for finite state machines.
4 //
5 // Copyright (C) 2008 The Vaucanson Group.
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
11 //
12 // The complete GNU General Public Licence Notice can be found as the
13 // `COPYING' file in the root directory.
14 //
15 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
16 //
17 
18 #ifndef VCSN_ALGEBRA_IMPLEMENTATION_MONOID_MONOID_REP_HXX
19 # define VCSN_ALGEBRA_IMPLEMENTATION_MONOID_MONOID_REP_HXX
20 
21 # include <vaucanson/algebra/implementation/monoid/monoid_rep.hh>
22 
23 namespace vcsn
24 {
25  namespace algebra
26  {
27  template <typename M>
28  bool
29  operator==(boost::shared_ptr<MonoidRep<M> > lhs,
30  boost::shared_ptr<MonoidRep<M> > rhs)
31  {
32  // Type helpers.
33  typedef MonoidRepBase<MonoidRep, M> monoid_rep_base_t;
34  typedef boost::shared_ptr<monoid_rep_base_t> p_t;
35 
36  return (static_cast<p_t>(lhs) == static_cast<p_t>(rhs));
37  }
38 
39  } // ! algebra
40 
41 } // ! vcsn
42 
43 #endif // !VCSN_ALGEBRA_IMPLEMENTATION_MONOID_MONOID_REP_HXX