Skip to content

Commit

Permalink
Use template instead of typename
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzicheng1987 committed Dec 21, 2024
1 parent 5fd71ac commit 7ee36c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/rfl/parsing/Parser_shared_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct Parser<R, W, std::shared_ptr<T>, ProcessorsType> {
const P& _parent) noexcept {
if constexpr (schemaful::IsSchemafulWriter<W>) {
auto u = ParentType::add_union(_w, _parent);
auto p = typename ParentType::Union<decltype(u)>{.index_ = _s ? 0 : 1,
auto p = template ParentType::Union<decltype(u)>{.index_ = _s ? 0 : 1,

Check failure on line 51 in include/rfl/parsing/Parser_shared_ptr.hpp

View workflow job for this annotation

GitHub Actions / macos-clang (macos-latest)

expected expression

Check failure on line 51 in include/rfl/parsing/Parser_shared_ptr.hpp

View workflow job for this annotation

GitHub Actions / (llvm-18)

expected primary-expression before ‘template’

Check failure on line 51 in include/rfl/parsing/Parser_shared_ptr.hpp

View workflow job for this annotation

GitHub Actions / (llvm-16)

expected primary-expression before ‘template’

Check failure on line 51 in include/rfl/parsing/Parser_shared_ptr.hpp

View workflow job for this annotation

GitHub Actions / (gcc-12)

expected primary-expression before ‘template’

Check failure on line 51 in include/rfl/parsing/Parser_shared_ptr.hpp

View workflow job for this annotation

GitHub Actions / (gcc-14)

expected primary-expression before ‘template’

Check failure on line 51 in include/rfl/parsing/Parser_shared_ptr.hpp

View workflow job for this annotation

GitHub Actions / (gcc-11)

expected primary-expression before ‘template’

Check failure on line 51 in include/rfl/parsing/Parser_shared_ptr.hpp

View workflow job for this annotation

GitHub Actions / macos-clang (macos-13)

expected expression
.union_ = &u};
if (_s) {
Parser<R, W, std::remove_cvref_t<T>, ProcessorsType>::write(_w, *_s, p);
Expand Down
2 changes: 1 addition & 1 deletion include/rfl/parsing/Parser_unique_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct Parser<R, W, std::unique_ptr<T>, ProcessorsType> {
const P& _parent) noexcept {
if constexpr (schemaful::IsSchemafulWriter<W>) {
auto u = ParentType::add_union(_w, _parent);
auto p = typename ParentType::Union<decltype(u)>{.index_ = _s ? 0 : 1,
auto p = template ParentType::Union<decltype(u)>{.index_ = _s ? 0 : 1,

Check failure on line 52 in include/rfl/parsing/Parser_unique_ptr.hpp

View workflow job for this annotation

GitHub Actions / macos-clang (macos-latest)

expected expression

Check failure on line 52 in include/rfl/parsing/Parser_unique_ptr.hpp

View workflow job for this annotation

GitHub Actions / (llvm-18)

expected primary-expression before ‘template’

Check failure on line 52 in include/rfl/parsing/Parser_unique_ptr.hpp

View workflow job for this annotation

GitHub Actions / (llvm-16)

expected primary-expression before ‘template’

Check failure on line 52 in include/rfl/parsing/Parser_unique_ptr.hpp

View workflow job for this annotation

GitHub Actions / (gcc-12)

expected primary-expression before ‘template’

Check failure on line 52 in include/rfl/parsing/Parser_unique_ptr.hpp

View workflow job for this annotation

GitHub Actions / (gcc-14)

expected primary-expression before ‘template’

Check failure on line 52 in include/rfl/parsing/Parser_unique_ptr.hpp

View workflow job for this annotation

GitHub Actions / (gcc-11)

expected primary-expression before ‘template’

Check failure on line 52 in include/rfl/parsing/Parser_unique_ptr.hpp

View workflow job for this annotation

GitHub Actions / macos-clang (macos-13)

expected expression
.union_ = &u};
if (_s) {
Parser<R, W, std::remove_cvref_t<T>, ProcessorsType>::write(_w, *_s, p);
Expand Down

0 comments on commit 7ee36c9

Please sign in to comment.