diff --git a/src/OpenFOAM/containers/Bits/bitSet/bitSet.H b/src/OpenFOAM/containers/Bits/bitSet/bitSet.H
index 2c5c283136ce51a4bcbb12439a46bdd4d423a472..59429e7d701218e58bf4d4ba699e8c2b2427ebc5 100644
--- a/src/OpenFOAM/containers/Bits/bitSet/bitSet.H
+++ b/src/OpenFOAM/containers/Bits/bitSet/bitSet.H
@@ -513,10 +513,6 @@ public:
         //- Move assignment
         inline bitSet& operator=(bitSet&& bitset);
 
-        //- Complement operator.
-        //  Return a copy of the existing set with all its bits flipped.
-        inline bitSet operator~() const;
-
         //- Bitwise-AND all the bits in other with the bits in this bitset.
         //  The operands may have dissimilar sizes without affecting the size
         //  of the set.
@@ -576,6 +572,9 @@ Ostream& operator<<(Ostream& os, const bitSet& bitset);
 Ostream& operator<<(Ostream& os, const InfoProxy<bitSet>& info);
 
 
+//- Bitset complement, returns a copy of the bitset with all its bits flipped
+inline bitSet operator~(const bitSet& bitset);
+
 //- Bitwise-AND of two bitsets.
 //  See bitSet::operator&= for more details.
 inline bitSet operator&(const bitSet& a, const bitSet& b);
diff --git a/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H b/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H
index afc7d93f9719743939df5ad61387773b0172e991..5312caa3d1b1c086890ab94a5423e34e9158e568 100644
--- a/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H
+++ b/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -663,14 +663,6 @@ inline Foam::bitSet& Foam::bitSet::operator=(bitSet&& bitset)
 }
 
 
-inline Foam::bitSet Foam::bitSet::operator~() const
-{
-    bitSet result(*this);
-    result.flip();
-    return result;
-}
-
-
 inline Foam::bitSet& Foam::bitSet::operator&=(const bitSet& other)
 {
     return andEq(other);
@@ -697,6 +689,14 @@ inline Foam::bitSet& Foam::bitSet::operator-=(const bitSet& other)
 
 // * * * * * * * * * * * * * * * Global Operators  * * * * * * * * * * * * * //
 
+inline Foam::bitSet Foam::operator~(const bitSet& bitset)
+{
+    bitSet result(bitset);
+    result.flip();
+    return result;
+}
+
+
 inline Foam::bitSet Foam::operator&(const bitSet& a, const bitSet& b)
 {
     bitSet result(a);