lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] C++ modernization [Was: Replacing boost with std C++11]


From: Greg Chicares
Subject: [lmi] C++ modernization [Was: Replacing boost with std C++11]
Date: Tue, 10 Jan 2017 04:46:05 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1

On 2017-01-09 16:49, Vadim Zeitlin wrote:
[...]
> Personally I'd prefer if you could have a look at the pending ones
> (https://github.com/vadz/lmi/pull/46, 47 and 48), especially because the
> likelihood of conflicts when doing such global changes is pretty high.

https://github.com/vadz/lmi/commit/ae1e7a5d33b92e2c354a31e8a0332c4a44e7bb68.patch

actuarial_table.hpp: This file has been changed--it no longer contains
base and derived classes, so no 'override' is wanted here.

Observations: As expected, 'override' applies to sections commented as
"overrides" or "required implementation"; here's a spot check:
  grep -A2 overrides *.?pp |less -S
  grep -A2 'required implementation' *.?pp |less -S
It looks like 'override' comes last in every declaration; that's to be
expected, as nothing can follow it except a pure-specifier, but lmi
doesn't use pure overrides (I never conceived of them as possible anyway).
And this command:
  grep 'virtual.*override' *.?pp
would find nothing at all if I restricted its components to full words,
but I don't want to learn how to do that in 'grep' ('-w' won't do it)
because it'll interfere with my developing vim knowledge.

$vim --cmd "vim '\<virtual_function\>.*\<override\>' *.?pp"
about_dialog.cpp"any_member_test.cpp" line 1 of 657 --0%-- col 1
(1 of 1): int virtual_function() override {return 1729;}

$vim --cmd "vim '\<virtual\>.*\<override\>' *.?pp"         
about_dialog.cppError detected while processing pre-vimrc command line:
E480: No match: \<virtual\>.*\<override\>

https://github.com/vadz/lmi/commit/f64ce270db53655383e43abeed87c72fece67d58.patch

Rejected because '-Wno-mismatched-tags"' has been added in the meantime.
Instead I applied this, which I think does exactly what you intend:

diff --git a/configure.ac b/configure.ac
index 85774de..e788a25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -556,7 +556,6 @@ fi
 if test "x$GXX" == "xyes"; then
     if test "$CLANG" = "yes"; then
         cxx_warnings_flags="$cxx_warnings_flags \
-            -Wno-inconsistent-missing-override \
             -Wno-mismatched-tags"
     else
         cxx_warnings_flags="$cxx_warnings_flags \

Changeset 46 is all set. I've committed and pushed it:

$git push
Enter passphrase for key '/home/greg/.ssh/id_rsa': 
Counting objects: 86, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (86/86), done.
Writing objects: 100% (86/86), 17.62 KiB | 0 bytes/s, done.
Total 86 (delta 83), reused 0 (delta 0)
To address@hidden:/srv/git/lmi.git
   92a813a..5e67683  master -> master

However, now I can't sync my local mirror (which may seem superfluous,
but helps detect problems like this):

$git pull
Enter passphrase for key '/home/greg/.ssh/id_rsa': 
remote: Counting objects: 166, done.
remote: fatal: unable to create thread: Resource temporarily unavailable
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the 
remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header

I'll look into that tomorrow when I'm more awake.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]