- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

# special_char_traits.hh

    00001 // special_char_traits.hh: this file is part of the Vaucanson project.
    00002 //
    00003 // Vaucanson, a generic library for finite state machines.
    00004 //
    00005 // Copyright (C) 2004, 2005, 2006 The Vaucanson Group.
    00006 //
    00007 // This program is free software; you can redistribute it and/or
    00008 // modify it under the terms of the GNU General Public License
    00009 // as published by the Free Software Foundation; either version 2
    00010 // of the License, or (at your option) any later version.
    00011 //
    00012 // The complete GNU General Public Licence Notice can be found as the
    00013 // `COPYING' file in the root directory.
    00014 //
    00015 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
    00016 //
    00017 #ifndef VCSN_MISC_SPECIAL_CHAR_TRAITS_HH
    00018 # define VCSN_MISC_SPECIAL_CHAR_TRAITS_HH
    00019
    00037 # include <vaucanson/misc/char_traits.hh>
    00038
    00039 # define VCSN_USE_GENERIC_CHAR_TRAITS_FOR(Type)                         \
    00040   template <>                                                           \
    00041   struct char_traits<Type> : public ::vcsn::misc::char_traits<Type> { }
    00042
    00043 namespace std
    00044 {
    00045   // Specialize char_traits for builtin types.
    00046   VCSN_USE_GENERIC_CHAR_TRAITS_FOR (int);
    00047   VCSN_USE_GENERIC_CHAR_TRAITS_FOR (long int);
    00048   VCSN_USE_GENERIC_CHAR_TRAITS_FOR (unsigned int);
    00049   VCSN_USE_GENERIC_CHAR_TRAITS_FOR (unsigned long int);
    00050   VCSN_USE_GENERIC_CHAR_TRAITS_FOR (float);
    00051   VCSN_USE_GENERIC_CHAR_TRAITS_FOR (double);
    00052   VCSN_USE_GENERIC_CHAR_TRAITS_FOR (long double);
    00053
    00054   // Specialize char_traits for pointers.
    00055   template <class T>
    00056   struct char_traits<T*> : public ::vcsn::misc::char_traits<T*> { };
    00057
    00058   // Specialize char_traits for pairs.
    00059   template <class U, class V>
    00060   struct char_traits< pair<U, V> > :
    00061       public ::vcsn::misc::char_traits< pair<U, V> >
    00062   {
    00063   };
    00064 } // end of namespace std
    00065
    00066 #endif // ! VCSN_MISC_SPECIAL_CHAR_TRAITS_HH