diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-06-21 19:51:34 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-06-21 19:51:34 +0300 |
commit | be612cbab27967afcc60175ce78ea88b7108659e (patch) | |
tree | b7715ddd869bb14e4492e4b0fafadc52886da7de /cxx | |
parent | README updates (diff) | |
download | aes-tools-be612cbab27967afcc60175ce78ea88b7108659e.tar.gz aes-tools-be612cbab27967afcc60175ce78ea88b7108659e.zip |
fix GCC errors
Diffstat (limited to '')
-rw-r--r-- | cxx/CMakeLists.txt | 4 | ||||
-rw-r--r-- | cxx/include/aesxx/api.hpp | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/cxx/CMakeLists.txt b/cxx/CMakeLists.txt index 418f004..97cb9a5 100644 --- a/cxx/CMakeLists.txt +++ b/cxx/CMakeLists.txt @@ -3,3 +3,7 @@ find_package(Boost REQUIRED) add_library(libaesxx INTERFACE) target_include_directories(libaesxx INTERFACE include/ ${Boost_INCLUDE_DIRS}) target_link_libraries(libaesxx INTERFACE libaes) + +if(CMAKE_COMPILER_IS_GNUCC) + target_compile_options(libaesxx INTERFACE -std=c++11) +endif() diff --git a/cxx/include/aesxx/api.hpp b/cxx/include/aesxx/api.hpp index 0b183a8..bfe453c 100644 --- a/cxx/include/aesxx/api.hpp +++ b/cxx/include/aesxx/api.hpp @@ -69,20 +69,20 @@ namespace aes const typename Types<algorithm>::RoundKeys& encryption_keys, typename Types<algorithm>::RoundKeys& decryption_keys); - template <Algorithm algorithm, Mode mode, typename std::enable_if<ModeRequiresInitializationVector<mode>::value>::type* = 0> + template <Algorithm algorithm, Mode mode, typename std::enable_if<ModeRequiresInitializationVector<mode>::value>::type* = nullptr> inline void encrypt_block( const typename Types<algorithm>::Block& plaintext, const typename Types<algorithm>::RoundKeys& round_keys, typename Types<algorithm>::Block& iv, typename Types<algorithm>::Block& ciphertext); - template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitializationVector<mode>::value>::type* = 0> + template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitializationVector<mode>::value>::type* = nullptr> inline void encrypt_block( const typename Types<algorithm>::Block& plaintext, const typename Types<algorithm>::RoundKeys& round_keys, typename Types<algorithm>::Block& ciphertext); - template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitializationVector<mode>::value>::type* = 0> + template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitializationVector<mode>::value>::type* = nullptr> inline void encrypt_block( const typename Types<algorithm>::Block& plaintext, const typename Types<algorithm>::RoundKeys& round_keys, @@ -92,20 +92,20 @@ namespace aes encrypt_block<algorithm, mode>(plaintext, round_keys, ciphertext); } - template <Algorithm algorithm, Mode mode, typename std::enable_if<ModeRequiresInitializationVector<mode>::value>::type* = 0> + template <Algorithm algorithm, Mode mode, typename std::enable_if<ModeRequiresInitializationVector<mode>::value>::type* = nullptr> inline void decrypt_block( const typename Types<algorithm>::Block& ciphertext, const typename Types<algorithm>::RoundKeys& round_keys, typename Types<algorithm>::Block& iv, typename Types<algorithm>::Block& plaintext); - template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitializationVector<mode>::value>::type* = 0> + template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitializationVector<mode>::value>::type* = nullptr> inline void decrypt_block( const typename Types<algorithm>::Block& ciphertext, const typename Types<algorithm>::RoundKeys& round_keys, typename Types<algorithm>::Block& plaintext); - template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitializationVector<mode>::value>::type* = 0> + template <Algorithm algorithm, Mode mode, typename std::enable_if<!ModeRequiresInitializationVector<mode>::value>::type* = nullptr> inline void decrypt_block( const typename Types<algorithm>::Block& ciphertext, const typename Types<algorithm>::RoundKeys& round_keys, |