From be612cbab27967afcc60175ce78ea88b7108659e Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 21 Jun 2016 19:51:34 +0300 Subject: fix GCC errors --- cxx/CMakeLists.txt | 4 ++++ cxx/include/aesxx/api.hpp | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'cxx') 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::RoundKeys& encryption_keys, typename Types::RoundKeys& decryption_keys); - template ::value>::type* = 0> + template ::value>::type* = nullptr> inline void encrypt_block( const typename Types::Block& plaintext, const typename Types::RoundKeys& round_keys, typename Types::Block& iv, typename Types::Block& ciphertext); - template ::value>::type* = 0> + template ::value>::type* = nullptr> inline void encrypt_block( const typename Types::Block& plaintext, const typename Types::RoundKeys& round_keys, typename Types::Block& ciphertext); - template ::value>::type* = 0> + template ::value>::type* = nullptr> inline void encrypt_block( const typename Types::Block& plaintext, const typename Types::RoundKeys& round_keys, @@ -92,20 +92,20 @@ namespace aes encrypt_block(plaintext, round_keys, ciphertext); } - template ::value>::type* = 0> + template ::value>::type* = nullptr> inline void decrypt_block( const typename Types::Block& ciphertext, const typename Types::RoundKeys& round_keys, typename Types::Block& iv, typename Types::Block& plaintext); - template ::value>::type* = 0> + template ::value>::type* = nullptr> inline void decrypt_block( const typename Types::Block& ciphertext, const typename Types::RoundKeys& round_keys, typename Types::Block& plaintext); - template ::value>::type* = 0> + template ::value>::type* = nullptr> inline void decrypt_block( const typename Types::Block& ciphertext, const typename Types::RoundKeys& round_keys, -- cgit v1.2.3