Commit 622f6303 authored by Dominik Charousset's avatar Dominik Charousset

fix pedantic compiler warnings

this patch fixed a warning regarding the return type of lambda
expressions consisting of more than just a return statement
parent 757009ec
......@@ -192,7 +192,7 @@ class parse_tree {
typedef std::pair<Iterator, Iterator> range;
std::vector<range> subranges;
/* lifetime scope of temporary variables needed to fill 'subranges' */ {
auto find_end = [&](Iterator from) {
auto find_end = [&](Iterator from) -> Iterator {
auto open = 1;
for (auto i = from + 1; i != last && open > 0; ++i) {
switch (*i) {
......@@ -214,7 +214,7 @@ class parse_tree {
vector<string> tokens;
tokens.push_back("");
vector<Iterator> scope_resolution_ops;
auto is_in_subrange = [&](Iterator i) {
auto is_in_subrange = [&](Iterator i) -> bool {
for (auto& r : subranges) {
if (i >= r.first && i < r.second) return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment