Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ag-ohlberger
dune-community
dune-xt
Commits
fa200d1d
Commit
fa200d1d
authored
11 years ago
by
René Fritze
Browse files
Options
Downloads
Patches
Plain Diff
remove c++11 guards in source
parent
c7b47dde
No related branches found
No related tags found
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/stuff/common/string.hh
+1
-3
1 addition, 3 deletions
dune/stuff/common/string.hh
dune/stuff/test/common_string.cc
+0
-2
0 additions, 2 deletions
dune/stuff/test/common_string.cc
with
1 addition
and
5 deletions
dune/stuff/common/string.hh
+
1
−
3
View file @
fa200d1d
...
...
@@ -67,7 +67,6 @@ std::string whitespaceify(const T& t, const char whitespace = ' ')
return
ret
;
}
// std::string whitespaceify(const std::string s, const char whitespace = ' ')
#if HAS_LAMBDA_FUNCTIONS && HAS_STD_BEGIN_END
/** \brief convenience wrapper around boost::algorithm::split to split one string into a vector of strings
* \param msg the spring to be split
* \param seperators a list of seperaors, duh
...
...
@@ -89,9 +88,8 @@ tokenize(const std::string& msg, const std::string& seperators,
std
::
begin
(
ret
),
std
::
end
(
ret
),
[
&
]()
{
return
strings
[
i
++
].
empty
()
?
T
()
:
fromString
<
T
>
(
strings
[
i
-
1
]);
});
return
ret
;
}
//! if the compiler isn't recent enough we make tokenize avalilable for string only
template
<
>
#endif // HAS_LAMBDA_FUNCTIONS && HAS_STD_BEGIN_END
inline
std
::
vector
<
std
::
string
>
tokenize
(
const
std
::
string
&
msg
,
const
std
::
string
&
seperators
,
const
boost
::
algorithm
::
token_compress_mode_type
mode
)
{
...
...
This diff is collapsed.
Click to expand it.
dune/stuff/test/common_string.cc
+
0
−
2
View file @
fa200d1d
...
...
@@ -50,13 +50,11 @@ TEST(StringTest, Tokenizer)
const
vector
<
string
>
tokens_compressed
=
{
"a"
,
"t"
,
"kk"
,
"g"
};
EXPECT_EQ
(
tokens_default
,
tokenize
(
msg
,
seps
,
boost
::
algorithm
::
token_compress_off
));
EXPECT_EQ
(
tokens_compressed
,
tokenize
(
msg
,
seps
,
boost
::
algorithm
::
token_compress_on
));
#if HAS_LAMBDA_FUNCTIONS && HAS_STD_BEGIN_END
const
string
num_msg
(
"-1 2;;4"
);
vector
<
int
>
numbers_default
=
{
-
1
,
2
,
0
,
4
};
vector
<
int
>
numbers_compressed
=
{
-
1
,
2
,
4
};
EXPECT_EQ
(
numbers_default
,
tokenize
<
int
>
(
num_msg
,
seps
,
boost
::
algorithm
::
token_compress_off
));
EXPECT_EQ
(
numbers_compressed
,
tokenize
<
int
>
(
num_msg
,
seps
,
boost
::
algorithm
::
token_compress_on
));
#endif
}
TEST
(
StringTest
,
TimeString
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment