Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
youngwolf
qme
提交
93708d78
Q
qme
项目概览
youngwolf
/
qme
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qme
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
93708d78
编写于
1月 26, 2024
作者:
Y
youngwolf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Downgrade the requirement of C++ standard (to C++0x only).
上级
5f551d08
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
13 deletion
+13
-13
makefile
makefile
+1
-1
question_exp.h
question_exp.h
+12
-12
未找到文件。
makefile
浏览文件 @
93708d78
cflag
=
-Wall
-fexceptions
cflag
=
-Wall
-fexceptions
-std
=
c++0x
ifeq
(${MAKECMDGOALS}, debug)
ifeq
(${MAKECMDGOALS}, debug)
cflag
+=
-g
-DDEBUG
cflag
+=
-g
-DDEBUG
else
else
...
...
question_exp.h
浏览文件 @
93708d78
...
@@ -883,14 +883,14 @@ template <typename T> inline T safe_execute(const std::shared_ptr<data_exp<T>>&
...
@@ -883,14 +883,14 @@ template <typename T> inline T safe_execute(const std::shared_ptr<data_exp<T>>&
dexps
.
push_back
(
std
::
make_pair
(
dexp
,
true
));
dexps
.
push_back
(
std
::
make_pair
(
dexp
,
true
));
std
::
list
<
immediate_data
<
T
>>
res
;
std
::
list
<
immediate_data
<
T
>>
res
;
auto
direction
=
0
;
//0 - left-bottom, 1 - right-bottom, 2 - top-left
auto
direction
=
0
;
//0 - left-bottom, 1 - right-bottom, 2 - top-left
for
(
auto
iter
=
std
::
crbegin
(
dexps
);
iter
!=
std
::
crend
(
dexps
);)
for
(
auto
iter
=
dexps
.
crbegin
();
iter
!=
dexps
.
crend
(
);)
if
(
0
==
direction
)
if
(
0
==
direction
)
{
{
auto
data
=
iter
->
first
->
get_1st_data
();
auto
data
=
iter
->
first
->
get_1st_data
();
if
(
data
->
is_composite
())
if
(
data
->
is_composite
())
{
{
dexps
.
push_back
(
std
::
make_pair
(
data
,
true
));
dexps
.
push_back
(
std
::
make_pair
(
data
,
true
));
iter
=
std
::
crbegin
(
dexps
);
iter
=
dexps
.
crbegin
(
);
}
}
else
else
{
{
...
@@ -904,7 +904,7 @@ template <typename T> inline T safe_execute(const std::shared_ptr<data_exp<T>>&
...
@@ -904,7 +904,7 @@ template <typename T> inline T safe_execute(const std::shared_ptr<data_exp<T>>&
if
(
data
->
is_composite
())
if
(
data
->
is_composite
())
{
{
dexps
.
push_back
(
std
::
make_pair
(
data
,
false
));
dexps
.
push_back
(
std
::
make_pair
(
data
,
false
));
iter
=
std
::
crbegin
(
dexps
);
iter
=
dexps
.
crbegin
(
);
direction
=
0
;
direction
=
0
;
}
}
else
else
...
@@ -940,14 +940,14 @@ template <typename T> inline void safe_delete(const std::shared_ptr<data_exp<T>>
...
@@ -940,14 +940,14 @@ template <typename T> inline void safe_delete(const std::shared_ptr<data_exp<T>>
std
::
list
<
std
::
pair
<
std
::
shared_ptr
<
data_exp
<
T
>>
,
bool
>>
dexps
;
//true - left branch, false - right branch
std
::
list
<
std
::
pair
<
std
::
shared_ptr
<
data_exp
<
T
>>
,
bool
>>
dexps
;
//true - left branch, false - right branch
dexps
.
push_back
(
std
::
make_pair
(
dexp
,
true
));
dexps
.
push_back
(
std
::
make_pair
(
dexp
,
true
));
auto
direction
=
0
;
//0 - left-bottom, 1 - right-bottom, 2 - top-left
auto
direction
=
0
;
//0 - left-bottom, 1 - right-bottom, 2 - top-left
for
(
auto
iter
=
std
::
crbegin
(
dexps
);
iter
!=
std
::
crend
(
dexps
);)
for
(
auto
iter
=
dexps
.
crbegin
();
iter
!=
dexps
.
crend
(
);)
if
(
0
==
direction
)
if
(
0
==
direction
)
{
{
auto
data
=
iter
->
first
->
get_1st_data
();
auto
data
=
iter
->
first
->
get_1st_data
();
if
(
data
->
is_composite
())
if
(
data
->
is_composite
())
{
{
dexps
.
push_back
(
std
::
make_pair
(
data
,
true
));
dexps
.
push_back
(
std
::
make_pair
(
data
,
true
));
iter
=
std
::
crbegin
(
dexps
);
iter
=
dexps
.
crbegin
(
);
}
}
else
else
{
{
...
@@ -961,7 +961,7 @@ template <typename T> inline void safe_delete(const std::shared_ptr<data_exp<T>>
...
@@ -961,7 +961,7 @@ template <typename T> inline void safe_delete(const std::shared_ptr<data_exp<T>>
if
(
data
->
is_composite
())
if
(
data
->
is_composite
())
{
{
dexps
.
push_back
(
std
::
make_pair
(
data
,
false
));
dexps
.
push_back
(
std
::
make_pair
(
data
,
false
));
iter
=
std
::
crbegin
(
dexps
);
iter
=
dexps
.
crbegin
(
);
direction
=
0
;
direction
=
0
;
}
}
else
else
...
@@ -1024,14 +1024,14 @@ template <typename T> inline bool safe_execute(const std::shared_ptr<judge_exp<T
...
@@ -1024,14 +1024,14 @@ template <typename T> inline bool safe_execute(const std::shared_ptr<judge_exp<T
jexps
.
push_back
(
std
::
make_pair
(
jexp
,
true
));
jexps
.
push_back
(
std
::
make_pair
(
jexp
,
true
));
auto
re
=
false
;
auto
re
=
false
;
auto
direction
=
0
;
//0 - left-bottom, 1 - right-bottom, 2 - top-left
auto
direction
=
0
;
//0 - left-bottom, 1 - right-bottom, 2 - top-left
for
(
auto
iter
=
std
::
crbegin
(
jexps
);
iter
!=
std
::
crend
(
jexps
);)
for
(
auto
iter
=
jexps
.
crbegin
();
iter
!=
jexps
.
crend
(
);)
if
(
0
==
direction
)
if
(
0
==
direction
)
{
{
auto
judge
=
iter
->
first
->
get_1st_judge
();
auto
judge
=
iter
->
first
->
get_1st_judge
();
if
(
judge
->
is_composite
())
if
(
judge
->
is_composite
())
{
{
jexps
.
push_back
(
std
::
make_pair
(
judge
,
true
));
jexps
.
push_back
(
std
::
make_pair
(
judge
,
true
));
iter
=
std
::
crbegin
(
jexps
);
iter
=
jexps
.
crbegin
(
);
}
}
else
else
{
{
...
@@ -1056,7 +1056,7 @@ template <typename T> inline bool safe_execute(const std::shared_ptr<judge_exp<T
...
@@ -1056,7 +1056,7 @@ template <typename T> inline bool safe_execute(const std::shared_ptr<judge_exp<T
if
(
judge
->
is_composite
())
if
(
judge
->
is_composite
())
{
{
jexps
.
push_back
(
std
::
make_pair
(
judge
,
false
));
jexps
.
push_back
(
std
::
make_pair
(
judge
,
false
));
iter
=
std
::
crbegin
(
jexps
);
iter
=
jexps
.
crbegin
(
);
direction
=
0
;
direction
=
0
;
}
}
else
else
...
@@ -1083,14 +1083,14 @@ template <typename T> inline void safe_delete(const std::shared_ptr<judge_exp<T>
...
@@ -1083,14 +1083,14 @@ template <typename T> inline void safe_delete(const std::shared_ptr<judge_exp<T>
std
::
list
<
std
::
pair
<
std
::
shared_ptr
<
judge_exp
<
T
>>
,
bool
>>
jexps
;
//true - left branch, false - right branch
std
::
list
<
std
::
pair
<
std
::
shared_ptr
<
judge_exp
<
T
>>
,
bool
>>
jexps
;
//true - left branch, false - right branch
jexps
.
push_back
(
std
::
make_pair
(
jexp
,
true
));
jexps
.
push_back
(
std
::
make_pair
(
jexp
,
true
));
auto
direction
=
0
;
//0 - left-bottom, 1 - right-bottom, 2 - top-left
auto
direction
=
0
;
//0 - left-bottom, 1 - right-bottom, 2 - top-left
for
(
auto
iter
=
std
::
crbegin
(
jexps
);
iter
!=
std
::
crend
(
jexps
);)
for
(
auto
iter
=
jexps
.
crbegin
();
iter
!=
jexps
.
crend
(
);)
if
(
0
==
direction
)
if
(
0
==
direction
)
{
{
auto
judge
=
iter
->
first
->
get_1st_judge
();
auto
judge
=
iter
->
first
->
get_1st_judge
();
if
(
judge
->
is_composite
())
if
(
judge
->
is_composite
())
{
{
jexps
.
push_back
(
std
::
make_pair
(
judge
,
true
));
jexps
.
push_back
(
std
::
make_pair
(
judge
,
true
));
iter
=
std
::
crbegin
(
jexps
);
iter
=
jexps
.
crbegin
(
);
}
}
else
else
{
{
...
@@ -1104,7 +1104,7 @@ template <typename T> inline void safe_delete(const std::shared_ptr<judge_exp<T>
...
@@ -1104,7 +1104,7 @@ template <typename T> inline void safe_delete(const std::shared_ptr<judge_exp<T>
if
(
judge
->
is_composite
())
if
(
judge
->
is_composite
())
{
{
jexps
.
push_back
(
std
::
make_pair
(
judge
,
false
));
jexps
.
push_back
(
std
::
make_pair
(
judge
,
false
));
iter
=
std
::
crbegin
(
jexps
);
iter
=
jexps
.
crbegin
(
);
direction
=
0
;
direction
=
0
;
}
}
else
else
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录