Skip to content

如何添加支持其他容器? #14

@JaydenFish

Description

@JaydenFish

为了支持tsl::robin_map, 在ajson.hpp的158行,添加is_template_instant_of<tsl::robin_map, T>::value ||
编译报错:

src/ajson/ajson.hpp:158:47: error: type/value mismatch at argument 1 in template parameter list for ‘template<template<class ...> class U, class T> struct ajson::detail::is_template_instant_of’
  158 |       is_template_instant_of<tsl::robin_map, T>::value ||
      |                                               ^
src/ajson/ajson.hpp:158:47: note:   expected a template of type ‘template<class ...> class U’, got ‘template<class Key, class T, class Hash, class KeyEqual, class Allocator, bool StoreHash, class GrowthPolicy> class tsl::robin_map’

似乎是is_template_instant_of不支持模板里有非类型模板参数, 怎么办?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions