Skip to content

Instantly share code, notes, and snippets.

@deltaluca
Created October 27, 2013 17:55
Show Gist options
  • Save deltaluca/7185704 to your computer and use it in GitHub Desktop.
Save deltaluca/7185704 to your computer and use it in GitHub Desktop.
...
const std::vector<Component> components;
template <typename C>
Product(
typename std::enable_if<
std::is_same<std::decay<C>::type, std::vector<Component>>::value,
C
>::type&& components):
components(std::forward<C>(components))
{
}
Product(Product<Dim>&&) = default;
Product(const Product<Dim>&) = default;
...
@deltaluca
Copy link
Author

In file included from ../include/v8interop/noise/product.h:5:0,
                 from ../v8interop/main.cc:10:
../include/noise/product.h:42:72: error: type/value mismatch at argument 1 in template parameter list for ‘template<class, class> struct std::is_same’
                 std::is_same<std::decay<C>::type, std::vector<Component>>::value,
                                                                        ^
../include/noise/product.h:42:72: error:   expected a type, got ‘std::decay<_Tp>::type’
../include/noise/product.h:44:13: error: template argument 1 is invalid
             >::type&& components):
             ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment