Commit ac2775fa authored by Gregg Reynolds's avatar Gregg Reynolds Committed by Ziran Sun

fix C++11 error with constexpr

error: constexpr function's return type 'std::vector<TypeInfo>' is not a literal type

Change-Id: I3f0e2ac5ba0330698052db962a3ca4b81b3edb39
Signed-off-by: default avatarGregg Reynolds <reynolds-gregg@norc.org>
Reviewed-on: https://gerrit.iotivity.org/gerrit/8487Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarPhil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: default avatarZiran Sun <ziran.sun@samsung.com>
parent 6218e540
...@@ -206,7 +206,7 @@ namespace ...@@ -206,7 +206,7 @@ namespace
}; };
template< typename VARIANT, int POS > template< typename VARIANT, int POS >
constexpr inline std::vector< TypeInfo > getTypeInfo(Int2Type< POS >) noexcept inline std::vector< TypeInfo > getTypeInfo(Int2Type< POS >) noexcept
{ {
auto vec = getTypeInfo< VARIANT >(Int2Type< POS - 1 >{ }); auto vec = getTypeInfo< VARIANT >(Int2Type< POS - 1 >{ });
vec.push_back(TypeInfo::get< VARIANT, POS >()); vec.push_back(TypeInfo::get< VARIANT, POS >());
...@@ -214,7 +214,7 @@ namespace ...@@ -214,7 +214,7 @@ namespace
} }
template< typename VARIANT > template< typename VARIANT >
constexpr inline std::vector< TypeInfo > getTypeInfo(Int2Type< 0 >) noexcept inline std::vector< TypeInfo > getTypeInfo(Int2Type< 0 >) noexcept
{ {
return { TypeInfo::get< VARIANT, 0 >() }; return { TypeInfo::get< VARIANT, 0 >() };
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment