我想用在GitHub上动作的复合运行步骤的动作,如所描述这里,为了重新使用他们在不同的工作流程。但是,我收到错误:
An action could not be found at the URI 'https://api.github.com/repos/scripts/build_ubuntu/tarball/v1
Run Code Online (Sandbox Code Playgroud)
我的主要工作流程(.github/workflows/BuildUbuntu.yml)如下:
[...]
jobs:
ubuntu_build_appimage:
name: Build MeshLab (Ubuntu - AppImage)
runs-on: ubuntu-16.04
steps:
- uses: scripts/build_ubuntu@v1
[...]
Run Code Online (Sandbox Code Playgroud)
复合步骤 ( .github/workflows/scripts/build_ubuntu/action.yml) 如下:
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
with:
submodules: true
[other steps...]
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
我正在对概念进行一些实验,并且我试图限制成员函数,只有在满足概念时才必须实例化这些函数:
template <typename T>
concept Fooable = requires(T o)
{
o.foo(uint());
};
template <typename T>
concept Barable = requires(T o)
{
o.bar(uint());
};
class Foo
{
public:
using FooType = int;
void foo(uint) {}
};
class Bar
{
public:
using BarType = double;
void bar(uint) {}
};
template <typename T>
class C
{
public:
void fun(typename T::FooType t) requires Fooable<T> {}
void fun(typename T::BarType t) requires Barable<T> {}
};
int main()
{
C<Foo> f;
}
Run Code Online (Sandbox Code Playgroud)
这段代码在 GCC 11.2 和 Clang …