summaryrefslogtreecommitdiff
path: root/Examples
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2023-05-18 08:07:49 +1200
committerOlly Betts <olly@survex.com>2023-05-18 08:07:49 +1200
commitcee3d5b1efb121ccc02e7571eb286f1ca7473898 (patch)
treeb79b48e11bb236be799f0f7f3e128f0f7757539f /Examples
parentec1a29c72e828b3b6b2a0e7f85e0a91b9f7577ef (diff)
parentf26fa0ba9b8d90f2692343c69592fbb0ceea6205 (diff)
downloadswig-master.tar.gz
Merge branch 'arbitrary-decltype-expressions'HEADmaster
Diffstat (limited to 'Examples')
-rw-r--r--Examples/test-suite/cpp11_template_parameters_decltype.i7
1 files changed, 1 insertions, 6 deletions
diff --git a/Examples/test-suite/cpp11_template_parameters_decltype.i b/Examples/test-suite/cpp11_template_parameters_decltype.i
index 1d00124f1..257d1ec8d 100644
--- a/Examples/test-suite/cpp11_template_parameters_decltype.i
+++ b/Examples/test-suite/cpp11_template_parameters_decltype.i
@@ -6,14 +6,12 @@
#pragma SWIG nowarn=SWIGWARN_CPP11_DECLTYPE
-#if 0
-// to fix (non-template expression equivalent to template expression further down):
+// Non-template expression equivalent to template expression further down:
%inline %{
#include <utility>
#include <vector>
void f(bool c = std::is_constructible<std::string, decltype(std::declval<std::vector<std::pair<int, int>>>().begin()->first)>::value) {}
%}
-#endif
%inline %{
// Github issue #1590
@@ -26,14 +24,11 @@ struct Json {
Json(const T & t) : Json(t.to_json()) {}
// Github issue #1589
-// To fix
-#if !defined(SWIG)
// Implicit constructor: map-like objects (std::map, std::unordered_map, etc)
template <class M, typename std::enable_if<
std::is_constructible<std::string, decltype(std::declval<M>().begin()->first)>::value,
int>::type = 0>
Json(const M & m) : Json(object(m.begin(), m.end())) {}
-#endif
};
%}