diff --git a/include/ebcl/Filesystem.hh b/include/ebcl/Filesystem.hh index 89d4fe1..8c456d9 100644 --- a/include/ebcl/Filesystem.hh +++ b/include/ebcl/Filesystem.hh @@ -66,6 +66,9 @@ class T_FSPathStyle constexpr bool isSeparator( T_Character chr ) const noexcept; bool isValidRoot( T_String const& string ) const noexcept; + constexpr bool operator ==( T_FSPathStyle const& other ) const noexcept; + constexpr bool operator !=( T_FSPathStyle const& other ) const noexcept; + //---------------------------------------------------------------------- // Pre-initialised styles diff --git a/include/ebcl/inline/Filesystem.hh b/include/ebcl/inline/Filesystem.hh index 179d24e..5146d0e 100644 --- a/include/ebcl/inline/Filesystem.hh +++ b/include/ebcl/inline/Filesystem.hh @@ -83,6 +83,22 @@ inline constexpr bool T_FSPathStyle::isSeparator( || ( ( pathSeparators_ & E_FSPathSeparator::SLASH ) && chr == '\\' ); } +inline constexpr bool T_FSPathStyle::operator ==( + T_FSPathStyle const& other ) const noexcept +{ + return pathSeparators_ == other.pathSeparators_ + && caseSensitive_ == other.caseSensitive_ + && hasDriveLetter_ == other.hasDriveLetter_; +} + +inline constexpr bool T_FSPathStyle::operator !=( + T_FSPathStyle const& other ) const noexcept +{ + return pathSeparators_ != other.pathSeparators_ + || caseSensitive_ != other.caseSensitive_ + || hasDriveLetter_ != other.hasDriveLetter_; +} + /*----------------------------------------------------------------------------*/ inline constexpr T_FSPathStyle T_FSPathStyle::Unix( )