Oracle Business Intelligence Applications

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

solaris studio 12.4 variadic template compile error

Received Response
1
Views
1
Comments

Hi, I'm dealing with c++11 library, cereal, on my project.

I got compile error using solaris studio 12.4. I have no problem with solaris stuidio 12.5.

Is there a work around way for this?

1. serialization.hpp

// https://uscilab.github.io/cereal/assets/doxygen/traits_8hpp_source.html#include <cstdint>#include <type_traits>#include <typeindex>namespace cereal{    namespace traits    {        using yes = std::true_type;        using no  = std::false_type;        namespace detail        {            enum class sfinae {};            template <bool H, bool ... T> struct meta_bool_and : std::integral_constant<bool, H && meta_bool_and<T...>::value> {};            template <bool B> struct meta_bool_and<B> : std::integral_constant<bool, B> {};        } // namespace detail        static const detail::sfinae sfinae = {};    }}

2. c11_ex.cpp

#include "seiralizations.hpp"int main(){        return 0;}

3. compile result

3.1 solaris studio 12.5 (ok)

$ /opt/developerstudio12.5/bin/CC c11_ex.cpp -m64 -std=c++11

3.2 solaris studio 12.4 (not ok)

$ /opt/solarisstudio12.4/bin/CC  c11_ex.cpp -m64 -std=c++11

"seiralizations.hpp", line 18: Error: Template parameter H requires a type argument.    <--  std::integral_constant<bool, H && meta_bool_and<T...>::value> {};

1 Error(s) detected.

Thanks in advance.

BS Lee

Answers