Repository: metacall/core (language: rust)

Issue:
Building Metacall with Node v16 fails with `error: ‘remove_cv_t’ is not a member of ‘std’?`
## 🐛 Bug Report

<!--- A clear and concise description of what the bug is -->

When building metacall from source, the build scripts download and build Node v16.14.2. The build of nodejs succeeds but Metacall's build fails with the following error:
```
In file included from /nix/store/46g0dmf6rcpikbzs22y7w4amyg0ciksi-nodejs-16.14.2/include/node/v8.h:30,
                 from /nix/store/46g0dmf6rcpikbzs22y7w4amyg0ciksi-nodejs-16.14.2/include/node/node.h:63,
                 from /home/samyak/oss/metacall/core/source/loaders/node_loader/source/node_loader_impl.cpp:92:
/nix/store/46g0dmf6rcpikbzs22y7w4amyg0ciksi-nodejs-16.14.2/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
/nix/store/46g0dmf6rcpikbzs22y7w4amyg0ciksi-nodejs-16.14.2/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
  492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
      |                                      ^~~~~~~~~~~
      |                                      remove_cv
/nix/store/46g0dmf6rcpikbzs22y7w4amyg0ciksi-nodejs-16.14.2/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
  492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
      |                                      ^~~~~~~~~~~
      |                                      remove_cv
/nix/store/46g0dmf6rcpikbzs22y7w4amyg0ciksi-nodejs-16.14.2/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
  492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
      |                                                  ^
/nix/store/46g0dmf6rcpikbzs22y7w4amyg0ciksi-nodejs-16.14.2/include/node/v8-internal.h:492:63: error: ‘::Perform’ has not been declared
  492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
      |                                                               ^~~~~~~
```

### Expected Behavior

Should compile successfully.

### Current Behavior

Compilation error due to not enforcing C++14 and above.

### Possible Solution

Set C++ standard to 17 when building the Node loader.

### Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1. Build metacall with Node v16

### Context (Environment)
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

<!--- Provide a general summary of the issue in the Title above -->

### Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->

### Possible Implementation
<!--- Not obligatory, but suggest an idea for implementing addition or change -->



Discussion / hints:

Fix patch:
diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt
index aa41a0d35..297f486d9 100644
--- a/source/loaders/node_loader/CMakeLists.txt
+++ b/source/loaders/node_loader/CMakeLists.txt
@@ -236,3 +236,5 @@ install(FILES
 	DESTINATION ${INSTALL_LIB}
 	COMPONENT runtime
 )
+
+set_property(TARGET ${target} PROPERTY CXX_STANDARD 17)


Test patch: