📄 tag.h
字号:
/* * ASTL - the Automaton Standard Template Library. * C++ generic components for Finite State Automata handling. * Copyright (C) 2000-2003 Vincent Le Maout (vincent.lemaout@chello.fr). * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */#ifndef ASTL_TAG_H
#define ASTL_TAG_H
// This file defines the default tag type "empty_tag"
#include <iostream>
ASTL_BEGIN_NAMESPACE
struct empty_tag {};
bool operator==(const empty_tag&, const empty_tag&) {
return true;
}
bool operator<(const empty_tag&, const empty_tag&) {
return false;
}
ostream& operator<<(ostream &out, const empty_tag&) {
return out;
}
istream& operator>>(istream &in, empty_tag&) {
return in;
}
#ifdef __GNUG__
// Specialized type_traits for empty_tag
struct __type_traits<empty_tag>
{
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
#endif
ASTL_END_NAMESPACE
#endif // ASTL_TAG_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -