Skip to content

Commit

Permalink
Ignore .vscode configurations for git.
Browse files Browse the repository at this point in the history
This is a commonly generated directory for Visual Studio.

PiperOrigin-RevId: 710506423
  • Loading branch information
jwhpryor authored and copybara-github committed Jan 6, 2025
1 parent d855896 commit 3348ef2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
bazel*
.vscode
13 changes: 12 additions & 1 deletion implementation/class.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ namespace jni {

template <typename Extends_, typename Constructors_, typename Static_,
typename Methods_, typename Fields_>
struct Class {};
struct Class {
constexpr Class() = default;
constexpr Class(const char* name) {}
};

template <typename Extends_, typename... Constructors_,
typename... StaticMethods_, typename... StaticFields_,
Expand Down Expand Up @@ -70,6 +73,14 @@ struct Class<Extends_, std::tuple<Constructors_...>,
// provided where they are and aren't present.
////////////////////////////////////////////////////////////////////////////////

// To stifle a test failure.
constexpr Class()
: Object("__JNI_BIND__NO_CLASS__"),
constructors_(Constructor<>{}),
static_(),
methods_(),
fields_() {}

// Methods + Fields.
explicit constexpr Class(const char* class_name, Methods_... methods,
Fields_... fields)
Expand Down
4 changes: 2 additions & 2 deletions implementation/return.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct Return : ReturnBase {

using Raw = Raw_;

constexpr Return() = default;
constexpr Return() {}

template <typename Raw>
constexpr explicit Return(Raw raw) : raw_(raw) {}
Expand All @@ -42,7 +42,7 @@ struct Return<void> : ReturnBase {
using Raw = void;
const Void raw_{};

constexpr Return() = default;
constexpr Return() {}
};

Return() -> Return<void>;
Expand Down
4 changes: 2 additions & 2 deletions metaprogramming/string_literal.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ struct StringLiteral {
template <size_t N>
StringLiteral(const char (&str)[N]) -> StringLiteral<N>;

} // namespace jni::metaprogramming

#endif // __cplusplus >= 202002L
#endif // __cplusplus

} // namespace jni::metaprogramming

#endif // JNI_BIND_METAPROGRAMMING_STRING_LITERAL_H_

0 comments on commit 3348ef2

Please sign in to comment.