Skip to content

Commit

Permalink
test_tuple_transform_each(): Take transform() parameters as const.
Browse files Browse the repository at this point in the history
Except for the nonconst test. That makes more sense.
  • Loading branch information
murraycu committed Mar 8, 2016
1 parent 8b58e6b commit d857b1a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_tuple_transform_each.cc
Expand Up @@ -24,7 +24,7 @@ template <class T_element_from>
class transform_to_string {
public:
static decltype(auto)
transform(T_element_from& from) {
transform(const T_element_from& from) {
return std::to_string(from);
}
};
Expand Down Expand Up @@ -95,7 +95,7 @@ template <>
class transform_to_something<int> {
public:
static std::string
transform(int& from) {
transform(int from) {
return std::to_string(from);
}
};
Expand All @@ -105,7 +105,7 @@ template <>
class transform_to_something<double> {
public:
static char
transform(double& from) {
transform(double from) {
return std::to_string(from)[0];
}
};
Expand All @@ -115,7 +115,7 @@ template <>
class transform_to_something<std::string> {
public:
static int
transform(std::string& from) {
transform(const std::string& from) {
return std::stoi(from);
}
};
Expand Down

0 comments on commit d857b1a

Please sign in to comment.