source: utilib/branches/restructure/src/utilib/traits.h @ 1871

Revision 1871, 892 bytes checked in by dbhart, 4 years ago (diff)

Restructuring the UTILIB source directories. It is *believed* that this will even build properly, but it hasn't been tested on Linux yet. These were also all _svn move_'d instead of copied, so these should retain the logs. We will also see if that is correct.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1/*  _________________________________________________________________________
2 *
3 *  UTILIB: A utility library for developing portable C++ codes.
4 *  Copyright (c) 2008 Sandia Corporation.
5 *  This software is distributed under the BSD License.
6 *  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
7 *  the U.S. Government retains certain rights in this software.
8 *  For more information, see the README file in the top UTILIB directory.
9 *  _________________________________________________________________________
10 */
11
12/**
13 * \file traits.h
14 *
15 * Defines a macro used to set object traits.
16 */
17
18#ifndef utilib_traits_h
19#define utilib_traits_h
20
21/// Set a trait in a given namespace with a given type and value.
22#define SetTrait(nspace,trait,type,val)\
23namespace nspace { \
24template <> \
25struct trait < type > { \
26public: \
27static const bool value = val; \
28}; }
29
30#endif
Note: See TracBrowser for help on using the repository browser.