diff options
author | Murray Cumming <murrayc@murrayc.com> | 2013-07-04 10:27:35 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2015-07-09 23:27:29 +0200 |
commit | f4e15e79601e47b1e56ef7c32d70bb68c2641ed5 (patch) | |
tree | 273f546728b295fc3a80b7d06c1462ad7a0cc675 /examples/regex | |
parent | 8de5b1c659df65d0cc381a32ef7a7cd84a8e1038 (diff) | |
download | glibmm-f4e15e79601e47b1e56ef7c32d70bb68c2641ed5.tar.gz |
C++11: examples: more use of auto.
Diffstat (limited to 'examples/regex')
-rw-r--r-- | examples/regex/main.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/regex/main.cc b/examples/regex/main.cc index cc128ab2..ed6ac567 100644 --- a/examples/regex/main.cc +++ b/examples/regex/main.cc @@ -24,7 +24,7 @@ int main(int, char**) Glib::init(); /* Reusing one regex pattern: */ - Glib::RefPtr<Glib::Regex> regex = Glib::Regex::create("(a)?(b)"); + const auto regex = Glib::Regex::create("(a)?(b)"); std::cout << "Pattern=" << regex->get_pattern() << ", with string=abcd, result=" << std::boolalpha << regex->match("abcd") |